:root {
  --bg: #f4f6fa;
  --surface: #ffffff;
  --surface-2: #f8fafc;
  --border: #e5e8ef;
  --text: #1f2733;
  --muted: #6b7686;
  --primary: #c1272d;
  --primary-d: #9e1f24;
  --success: #16a34a;
  --danger: #dc2626;
  --warning: #d97706;
  /* نام مستعارِ --surface؛ چند بخش (وایندر، کنترل کیفیت، چاپ لیبل، پیش‌فاکتور)
     با نام --card نوشته شده بودند و بدون این تعریف، پس‌زمینه‌شان شفاف می‌شد */
  --card: #ffffff;
  --shadow: 0 1px 3px rgba(16, 24, 40, 0.08), 0 1px 2px rgba(16, 24, 40, 0.04);
  --radius: 12px;
  --sidebar-w-full: 260px;
  --sidebar-w-min: 64px;
  --sidebar-w: var(--sidebar-w-full);
  font-family: Vazirmatn, Tahoma, "Segoe UI", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body { background: var(--bg); color: var(--text); font-size: 14px; line-height: 1.7; }
.hidden { display: none !important; }
a { color: var(--primary); text-decoration: none; }

/* ── دکمه‌ها ─────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: 6px; justify-content: center;
  border: 1px solid var(--border); background: var(--surface); color: var(--text);
  padding: 8px 14px; border-radius: 8px; cursor: pointer; font-family: inherit;
  font-size: 13px; font-weight: 600; transition: all 0.15s; white-space: nowrap;
}
.btn:hover { background: var(--surface-2); }
.btn-primary { background: var(--primary); border-color: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-d); }
.btn-danger { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn-danger:hover { filter: brightness(0.95); }
.btn-ghost { border-color: transparent; background: transparent; color: var(--muted); }
.btn-ghost:hover { background: rgba(0,0,0,0.05); color: var(--text); }
.btn-sm { padding: 5px 10px; font-size: 12px; }
.btn-block { width: 100%; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.icon-btn { border: none; background: transparent; font-size: 20px; cursor: pointer; color: var(--muted); padding: 4px 8px; border-radius: 8px; }
.icon-btn:hover { background: rgba(0,0,0,0.05); }

/* ── ورود ────────────────────────────────────────────── */
.login-view { min-height: 100vh; display: grid; place-items: center; background:
  radial-gradient(1200px 600px at 100% -10%, #e8f0ff 0%, transparent 60%), var(--bg); padding: 20px; }
.login-card {
  width: 100%; max-width: 380px; background: var(--surface); border: 1px solid var(--border);
  border-radius: 16px; box-shadow: var(--shadow); padding: 32px; display: flex; flex-direction: column; gap: 16px;
}
.login-brand { text-align: center; margin-bottom: 8px; }
.login-logo { color: var(--primary); line-height: 0; }
.login-logo .brand-svg { width: 62px; height: 62px; display: inline-block; }
.login-brand h1 { font-size: 20px; margin: 8px 0 2px; }
.login-brand p { color: var(--muted); margin: 0; font-size: 13px; }
.login-card label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 600; color: var(--muted); }
.login-card input { padding: 10px 12px; border: 1px solid var(--border); border-radius: 8px; font-family: inherit; font-size: 14px; }
.login-card input:focus { outline: 2px solid var(--primary); outline-offset: -1px; border-color: var(--primary); }
.form-error { color: var(--danger); font-size: 13px; min-height: 18px; text-align: center; }

/* ── چیدمان اصلی ─────────────────────────────────────── */
.app-view { display: flex; min-height: 100vh; }
.sidebar {
  width: var(--sidebar-w); background: #101826; color: #cbd5e1; position: fixed; inset-inline-start: 0; top: 0;
  height: 100vh; display: flex; flex-direction: column; z-index: 40;
}
.sidebar-brand { display: flex; align-items: center; gap: 10px; padding: 18px 20px; font-weight: 800; font-size: 16px; color: #fff; border-bottom: 1px solid rgba(255,255,255,0.08); }
.brand-logo { line-height: 0; color: #e5484d; }
.brand-logo .brand-svg { width: 30px; height: 30px; display: block; }
.nav { flex: 1; overflow-y: auto; padding: 12px 10px; }
.nav-group { margin-bottom: 6px; }
.nav-group-title { font-size: 11px; color: #64748b; padding: 12px 12px 6px; font-weight: 700; letter-spacing: 0.02em; }
.nav-item {
  display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 8px; color: #cbd5e1;
  cursor: pointer; font-size: 13.5px; font-weight: 600; transition: background 0.15s;
}
.nav-item:hover { background: rgba(255,255,255,0.06); color: #fff; }
.nav-item.active { background: var(--primary); color: #fff; }
.nav-item .ico { width: 20px; text-align: center; }
/* منوی کلی + زیرمنو */
.nav-mod { margin-bottom: 2px; }
.nav-parent { user-select: none; }
.nav-parent-t { flex: 1; }
.nav-mod.cur > .nav-parent { color: #fff; }
.nav-caret { width: 0; height: 0; border-inline-start: 4px solid currentColor; border-top: 4px solid transparent;
  border-bottom: 4px solid transparent; opacity: .55; transition: transform .18s; margin-inline-start: 2px; }
.nav-mod.open > .nav-parent .nav-caret { transform: rotate(-90deg); }
.nav-sub { display: none; margin: 2px 0 6px; padding-inline-start: 10px;
  border-inline-start: 1px solid rgba(255,255,255,0.10); }
.nav-mod.open > .nav-sub { display: block; }
.nav-sub-item { font-size: 13px; font-weight: 500; padding: 7px 10px; }
.nav-sub-item .ico { width: 18px; opacity: .8; }
.sidebar-footer { padding: 12px 20px; font-size: 11px; color: #64748b; border-top: 1px solid rgba(255,255,255,0.08); }

.main { flex: 1; margin-inline-start: var(--sidebar-w); display: flex; flex-direction: column; min-width: 0; }
.topbar {
  height: 60px; background: var(--surface); border-bottom: 1px solid var(--border); display: flex; align-items: center;
  gap: 14px; padding: 0 20px; position: sticky; top: 0; z-index: 30;
}
#menu-toggle { display: block; }
.topbar-title { font-weight: 700; font-size: 16px; }
.topbar-user { margin-inline-start: auto; display: flex; align-items: center; gap: 6px; }
.user-name { font-weight: 700; font-size: 13px; margin-inline-end: 6px; }
.content { padding: 24px; flex: 1; }

/* ── کارت و شبکه ─────────────────────────────────────── */
.page-head { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
.page-head h2 { margin: 0; font-size: 18px; }
.page-head .spacer { flex: 1; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
.card-pad { padding: 18px; }

.widgets { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 16px; margin-bottom: 24px; }
.widget { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); display: flex; align-items: center; gap: 14px; }
.widget .w-icon { font-size: 30px; width: 52px; height: 52px; display: grid; place-items: center; background: var(--surface-2); border-radius: 12px; }
.widget .w-value { font-size: 24px; font-weight: 800; }
.widget .w-title { color: var(--muted); font-size: 13px; }
.widget .w-hint { color: var(--muted); font-size: 11px; }
.section-title { font-size: 14px; font-weight: 700; color: var(--muted); margin: 8px 0 12px; }

/* ── مشتریان: بازه، نمودار، پروفایل ─────────────────────────────────────── */
.range-bar { display: flex; gap: 8px; margin-bottom: 16px; flex-wrap: wrap; }
.range-btn { border: 1px solid var(--border); background: var(--surface); padding: 7px 15px; border-radius: 999px; cursor: pointer; font-family: inherit; font-size: 13px; font-weight: 700; color: var(--muted); transition: all 0.15s; }
.range-btn:hover { background: var(--surface-2); }
.range-btn.active { background: var(--primary); border-color: var(--primary); color: #fff; }
.charts-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.charts-grid.three { grid-template-columns: 1fr 1fr 1fr; }
.chart-card { padding: 0; overflow: hidden; }
.chart-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 13px 16px; border-bottom: 1px solid var(--border); font-weight: 800; font-size: 13.5px; }
.chart-head b { color: var(--primary); font-size: 12.5px; white-space: nowrap; }
.chart-body { padding: 12px 16px; max-height: 430px; overflow-y: auto; }
.hchart { display: flex; flex-direction: column; gap: 7px; }
.hbar-row { display: flex; align-items: center; gap: 10px; }
.hbar-label { width: 150px; flex-shrink: 0; text-align: right; font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hbar-track { flex: 1; height: 26px; background: var(--surface-2); border-radius: 6px; position: relative; overflow: hidden; }
.hbar-fill { position: absolute; inset-inline-start: 0; top: 0; bottom: 0; background: linear-gradient(90deg, #93c5fd, #3b82f6); border-radius: 6px; }
.hbar-val { position: absolute; inset-inline-start: 9px; top: 0; height: 26px; display: flex; align-items: center; font-size: 11.5px; font-weight: 800; color: #0b2e5c; }
.cust-link { font-weight: 700; cursor: pointer; color: var(--primary); }
.cust-link:hover { text-decoration: underline; }
.profile-info { display: flex; flex-wrap: wrap; gap: 16px 34px; margin-bottom: 18px; }
.prof-item { display: flex; flex-direction: column; gap: 3px; }
.prof-label { font-size: 11px; color: var(--muted); }
.prof-value { font-size: 14px; font-weight: 600; }
.permit-cell { max-width: 280px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; }
@media (max-width: 900px) { .charts-grid, .charts-grid.three { grid-template-columns: 1fr; } .hbar-label { width: 110px; } }
@media (prefers-color-scheme: dark) { .hbar-val { color: #dbeafe; } .hbar-fill { background: linear-gradient(90deg, #1e40af, #3b82f6); } }

/* پنل داشبورد (جدول/گزارش) */
.panel { margin-bottom: 24px; overflow: hidden; }
.panel-head { padding: 14px 18px; font-weight: 800; font-size: 15px; border-bottom: 1px solid var(--border); }
.panel .table-wrap { border: none; border-radius: 0; }
.panel-table td, .panel-table th { vertical-align: middle; }
.panel-total td { font-weight: 800; background: var(--surface-2); border-top: 2px solid var(--border); }
.bar-cell { position: relative; min-width: 170px; height: 24px; display: flex; align-items: center; }
.bar-fill { position: absolute; inset-inline-start: 0; top: 0; bottom: 0; background: linear-gradient(90deg, #93c5fd, #bfdbfe); border-radius: 6px; }
.bar-val { position: relative; padding: 0 9px; font-weight: 700; font-size: 13px; }
@media (prefers-color-scheme: dark) { .bar-fill { background: linear-gradient(90deg, #2b5a8a, #1e3a5f); } }

/* ── جدول ────────────────────────────────────────────── */
.table-tools { display: flex; gap: 10px; align-items: center; margin-bottom: 14px; flex-wrap: wrap; }
.filter-chips { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.active-chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 6px 4px 10px; background: #eff8ff; color: var(--primary); border: 1px solid #b2ddff; border-radius: 999px; font-size: 12.5px; font-weight: 600; }
.chip-x { border: none; background: rgba(0,0,0,0.08); color: inherit; width: 18px; height: 18px; border-radius: 50%; cursor: pointer; line-height: 1; font-size: 13px; padding: 0; }
.chip-x:hover { background: rgba(0,0,0,0.18); }
.range-row { display: flex; gap: 8px; }
.range-row input { width: 100%; }
@media (prefers-color-scheme: dark) { .active-chip { background: #0d1f2a; } }
.search-box { display: flex; align-items: center; gap: 6px; background: var(--surface); border: 1px solid var(--border); border-radius: 8px; padding: 6px 10px; }
.search-box input { border: none; outline: none; font-family: inherit; font-size: 13px; width: 200px; background: transparent; }
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
table.grid { width: 100%; border-collapse: collapse; font-size: 13px; }
table.grid th, table.grid td { padding: 11px 14px; text-align: right; border-bottom: 1px solid var(--border); white-space: nowrap; }
table.grid th { background: var(--surface-2); font-weight: 700; color: var(--muted); font-size: 12px; position: sticky; top: 0; }
table.grid tbody tr:hover { background: var(--surface-2); }
table.grid tr:last-child td { border-bottom: none; }
.row-actions { display: flex; gap: 6px; }
.act-btn { border: 1px solid var(--border); background: var(--surface); border-radius: 7px; width: 30px; height: 28px; display: inline-grid; place-items: center; cursor: pointer; font-size: 14px; line-height: 1; padding: 0; transition: background 0.15s, border-color 0.15s; }
.act-btn:hover { background: var(--surface-2); }
.act-danger:hover { background: #fef3f2; border-color: #fecdca; }
@media (prefers-color-scheme: dark) { .act-danger:hover { background: #2a1414; } }
.empty { text-align: center; color: var(--muted); padding: 40px; }
.pager { display: flex; align-items: center; gap: 10px; justify-content: center; margin-top: 14px; }
.pager .info { color: var(--muted); font-size: 13px; }

.badge { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: 11.5px; font-weight: 700; background: var(--surface-2); border: 1px solid var(--border); color: var(--muted); }
.badge.ok { background: #ecfdf3; color: var(--success); border-color: #abefc6; }
.badge.warn { background: #fffaeb; color: var(--warning); border-color: #fedf89; }
.badge.err { background: #fef3f2; color: var(--danger); border-color: #fecdca; }
.badge.info { background: #eff8ff; color: var(--primary); border-color: #b2ddff; }

/* ── فرم/مودال ───────────────────────────────────────── */
.modal-overlay { position: fixed; inset: 0; background: rgba(16,24,40,0.5); display: grid; place-items: center; z-index: 60; padding: 20px; }
.modal { background: var(--surface); border-radius: 16px; box-shadow: 0 20px 40px rgba(0,0,0,0.2); width: 100%; max-width: 560px; max-height: 90vh; display: flex; flex-direction: column; }
.modal.wide { max-width: 820px; }
.modal-head { padding: 16px 20px; border-bottom: 1px solid var(--border); display: flex; align-items: center; }
.modal-head h3 { margin: 0; font-size: 16px; }
.modal-body { padding: 20px; overflow-y: auto; }
.modal-foot { padding: 14px 20px; border-top: 1px solid var(--border); display: flex; gap: 10px; justify-content: flex-start; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.field { display: flex; flex-direction: column; gap: 5px; }
.field.full { grid-column: 1 / -1; }
.form-section { grid-column: 1 / -1; font-weight: 800; font-size: 13px; color: var(--primary); padding: 8px 0 4px; margin-top: 6px; border-bottom: 2px solid var(--border); }
.form-section:first-child { margin-top: 0; }
.detail-value { padding: 8px 11px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 8px; min-height: 37px; font-size: 14px; word-break: break-word; }
.result-grid { display: flex; flex-direction: column; gap: 8px; }
.result-row { display: flex; justify-content: space-between; align-items: center; padding: 10px 14px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 8px; }
.result-row b { font-size: 16px; color: var(--primary); }
.field label { font-size: 13px; font-weight: 600; color: var(--muted); }
.field .req { color: var(--danger); }
/* اندازه و گردیِ یکسان با قاعده‌ی پایه‌ی کنترل‌های فرم (انتهای فایل) */
.field input, .field select, .field textarea {
  padding: 9px 11px; border: 1px solid var(--border); border-radius: 9px; font-family: inherit; font-size: 13px; background: var(--surface); color: var(--text);
}
.field input:focus, .field select:focus, .field textarea:focus { outline: 2px solid var(--primary); outline-offset: -1px; border-color: var(--primary); }
.field .help { font-size: 11px; color: var(--muted); }
.checkbox-row { display: flex; align-items: center; gap: 8px; }
.checkbox-row input { width: 18px; height: 18px; }

/* ماتریس دسترسی */
.perm-matrix { width: 100%; border-collapse: collapse; font-size: 13px; }
.perm-matrix th, .perm-matrix td { padding: 8px 10px; border: 1px solid var(--border); text-align: center; }
.perm-matrix th:first-child, .perm-matrix td:first-child { text-align: right; font-weight: 600; }
.perm-matrix input { width: 18px; height: 18px; cursor: pointer; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border: 1px solid var(--border); border-radius: 8px; font-size: 12.5px; cursor: pointer; user-select: none; }
.chip input { margin: 0; }

/* منوهای کاربر (فرم کاربر) — گروه‌ها کنار هم، نه زیر هم */
.um-tree { display: grid; grid-template-columns: repeat(auto-fill, minmax(215px, 1fr)); gap: 8px; align-items: start; }
.um-tree .um-group { border: 1px solid var(--border); border-radius: 9px; padding: 5px 9px 6px; }
.um-tree .um-head { display: flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 700; color: var(--text); cursor: pointer; padding: 2px 0 5px; margin-bottom: 3px; border-bottom: 1px solid var(--border); user-select: none; }
.um-tree .um-item { display: flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 500; color: var(--text); cursor: pointer; padding: 2px 0; user-select: none; }
.um-tree input { margin: 0; width: 15px; height: 15px; cursor: pointer; }
.um-tree .um-item:has(input:not(:checked)) span { opacity: 0.5; text-decoration: line-through; }
.um-tree .um-empty { grid-column: 1 / -1; color: var(--muted); font-size: 12.5px; padding: 4px 0; }
.field .um-note { font-weight: 400; font-size: 12px; }

/* ── اعلان ───────────────────────────────────────────── */
.toast-root { position: fixed; bottom: 20px; inset-inline-start: 20px; display: flex; flex-direction: column; gap: 8px; z-index: 80; }
.toast { padding: 12px 16px; border-radius: 10px; color: #fff; box-shadow: var(--shadow); font-size: 13px; font-weight: 600; animation: slidein 0.2s; }
.toast.success { background: var(--success); }
.toast.error { background: var(--danger); }
.toast.info { background: var(--primary); }
.toast.warn { background: var(--warning); }
@keyframes slidein { from { transform: translateY(10px); opacity: 0; } to { transform: none; opacity: 1; } }

.spinner { display: inline-block; width: 18px; height: 18px; border: 2px solid var(--border); border-top-color: var(--primary); border-radius: 50%; animation: spin 0.7s linear infinite; }
.loading { display: grid; place-items: center; padding: 60px; color: var(--muted); }
@keyframes spin { to { transform: rotate(360deg); } }

/* ── واکنش‌گرا ────────────────────────────────────────── */
@media (max-width: 860px) {
  /* منوی کشویی وقتی بسته است نباید عرض صفحه را بکشد */
  html, body { overflow-x: hidden; }
  .app-view { max-width: 100vw; }
  .sidebar { transform: translateX(100%); transition: transform 0.2s; }
  .sidebar.open { transform: none; }
  .main { margin-inline-start: 0; }
  #menu-toggle { display: block; }
  .form-grid { grid-template-columns: 1fr; }
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f141b; --surface: #171e28; --card: #171e28; --surface-2: #1e2732; --border: #2a3542;
    --text: #e5eaf0; --muted: #93a1b3; --shadow: 0 1px 3px rgba(0,0,0,0.3);
    --primary: #ef4d54; --primary-d: #c1272d;
  }
  .badge.ok { background: #0d2a1a; } .badge.warn { background: #2a220d; }
  .badge.err { background: #2a1414; } .badge.info { background: #0d1f2a; }
}

/* تاریخچه‌ی خرید: گروه‌بندی بر اساس «بار ارسالی» (فاکتور) با ردیف بازشونده */
.ship-grid .ship-row { cursor: pointer; }
.ship-grid .ship-row.open { background: var(--surface-2); }
.ship-grid .exp-cell { color: var(--muted); width: 26px; text-align: center; }
.ship-grid .detail-row:hover { background: transparent; }
.ship-grid .detail-row > td { padding: 2px 10px 12px 34px; background: var(--surface-2); white-space: normal; }
.sub-grid { width: 100%; border: 1px solid var(--border); border-radius: 8px; overflow: hidden; background: var(--surface); }
.sub-grid th { background: transparent; font-size: 11px; position: static; }
.sub-grid th, .sub-grid td { padding: 7px 12px; }

/* ── آیکون‌های خطی (curved) — جایگزین ایموجی‌ها ─────────────────────── */
.ic-svg { flex: 0 0 auto; vertical-align: middle; }
.btn svg { flex: 0 0 auto; }
.nav-item .ico { display: inline-flex; align-items: center; justify-content: center; }
.page-head h2 { display: inline-flex; align-items: center; gap: 8px; }
.panel-head { display: flex; align-items: center; gap: 8px; }
.chart-head > span { display: inline-flex; align-items: center; gap: 6px; }
.search-ic { display: inline-flex; align-items: center; color: var(--muted); }
.act-btn.act-danger { color: var(--danger); }

/* ── دلیلِ وضعیت کنترل کیفیت (کلیک روی وضعیت) ─────────────── */
.explain-link { cursor: pointer; display: inline-flex; align-items: center; gap: 4px; }
.explain-q { display: inline-flex; align-items: center; justify-content: center; width: 15px; height: 15px; border-radius: 50%; background: var(--surface-2); border: 1px solid var(--border); color: var(--muted); font-size: 10px; font-weight: 800; }
.explain-link:hover .explain-q { background: var(--primary); color: #fff; border-color: var(--primary); }
.qc-x-head { font-size: 12.5px; color: var(--muted); margin-bottom: 12px; line-height: 1.7; }
.qc-x-head b { color: var(--text); }
.qc-x-note { padding: 8px 12px; border-radius: 8px; font-size: 12.5px; font-weight: 600; margin-bottom: 8px; }
.qc-x-note.missing { background: rgba(217,119,6,0.12); color: var(--warning); border: 1px solid rgba(217,119,6,0.32); }
.qc-x-note.fail { background: rgba(220,38,38,0.10); color: var(--danger); border: 1px solid rgba(220,38,38,0.32); }
.qc-x-list { display: flex; flex-direction: column; gap: 2px; margin-top: 6px; }
.qc-x-row { display: flex; gap: 10px; align-items: flex-start; padding: 8px 10px; border-radius: 8px; }
.qc-x-row.ok { opacity: 0.6; }
.qc-x-row.fail { background: rgba(220,38,38,0.06); }
.qc-x-row.missing { background: rgba(217,119,6,0.07); }
.qc-x-ic { width: 20px; height: 20px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 800; flex: none; color: #fff; }
.qc-x-row.ok .qc-x-ic { background: var(--success); }
.qc-x-row.fail .qc-x-ic { background: var(--danger); }
.qc-x-row.missing .qc-x-ic { background: var(--warning); }
.qc-x-label { font-weight: 700; font-size: 13px; }
.qc-x-detail { font-size: 12px; color: var(--muted); margin-top: 2px; }

/* ── موجودی محصول در انبار (نمای گرافیکیِ هرمی) ─────────────── */
.inv-total { color: var(--muted); font-size: 13px; margin-bottom: 14px; }
.inv-total b { color: var(--text); }
.inv-types { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.inv-chip { cursor: pointer; border: 1px solid var(--border); border-radius: 11px; padding: 8px 12px; background: var(--surface); display: flex; flex-direction: column; gap: 3px; min-width: 92px; transition: border-color .15s, box-shadow .15s; }
.inv-chip:hover { border-color: var(--c); }
.inv-chip.active { border-color: var(--c); box-shadow: 0 0 0 1.5px var(--c) inset; }
.inv-cn { font-weight: 700; font-size: 13px; display: flex; align-items: center; gap: 6px; }
.inv-cdot { width: 11px; height: 11px; border-radius: 50%; border: 2px solid var(--c); box-sizing: border-box; flex: none; display: inline-block; }
.inv-cm { font-size: 11px; color: var(--muted); }
.inv-stackhead { font-weight: 700; font-size: 14px; margin-bottom: 12px; }
.inv-stack { display: flex; flex-wrap: wrap; gap: 15px 12px; align-content: flex-start; min-height: 60px; }
.inv-pyramid { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.inv-prow { display: flex; gap: 2px; }
.inv-roll { width: 12px; height: 12px; border-radius: 50%; border: 2px solid var(--c); position: relative; box-sizing: border-box; animation: invpop .3s cubic-bezier(.34,1.56,.64,1) both; }
.inv-roll::after { content: ""; position: absolute; inset: 2.5px; border-radius: 50%; background: var(--c); }
@keyframes invpop { from { opacity: 0; transform: scale(.15); } to { opacity: 1; transform: scale(1); } }
.inv-note { margin: 12px 0 22px; font-size: 11px; color: var(--muted); }
.inv-dethead { font-weight: 700; font-size: 14px; margin-bottom: 10px; }
.inv-drow { display: grid; grid-template-columns: 165px 1fr auto; gap: 10px; align-items: center; padding: 6px 0; font-size: 12px; border-bottom: 1px solid var(--border); }
.inv-dspec { white-space: nowrap; display: flex; align-items: center; gap: 6px; }
.inv-dbar { height: 9px; background: var(--border); border-radius: 5px; overflow: hidden; }
.inv-dbar > i { display: block; height: 100%; background: var(--c); border-radius: 5px; transform-origin: right; animation: invgrow .5s ease both; }
@keyframes invgrow { from { transform: scaleX(0); } to { transform: scaleX(1); } }
.inv-dn { color: var(--muted); white-space: nowrap; text-align: left; }
.inv-dn b { color: var(--text); }
.inv-filter { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 16px; }
.inv-filter-lbl { font-size: 12px; color: var(--muted); font-weight: 600; }
.inv-fchip { cursor: pointer; border: 1px solid var(--border); background: var(--surface); color: var(--text); border-radius: 20px; padding: 5px 14px; font-family: inherit; font-size: 12px; font-weight: 600; transition: all .15s; }
.inv-fchip:hover { border-color: var(--primary); }
.inv-fchip.on { background: var(--primary); color: #fff; border-color: var(--primary); }

/* پرکردنِ درجای نقص داده در پنجره‌ی «؟» */
.qc-fill { background: rgba(217,119,6,0.07); border: 1px solid rgba(217,119,6,0.28); border-radius: 10px; padding: 12px; margin: 6px 0 14px; }
.qc-fill-head { font-size: 12.5px; font-weight: 700; color: var(--warning); margin-bottom: 10px; }
.qc-fill-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.qc-fill-field { display: flex; flex-direction: column; gap: 4px; font-size: 12px; font-weight: 600; color: var(--muted); }
.qc-fill-field input, .qc-fill-field select { padding: 9px 11px; border: 1px solid var(--border); border-radius: 9px; font-family: inherit; font-size: 13px; background: var(--surface); color: var(--text); }
.qc-fill-foot { margin-top: 12px; }
.qc-x-listhead { font-size: 12px; font-weight: 700; color: var(--muted); margin: 14px 0 6px; }

/* ── ایستگاه وایندر ─────────────────────────────────────────────────────── */
.wd-lines { display: flex; gap: 6px; }
.wd-line.active { background: var(--primary); color: #fff; border-color: var(--primary); }
.wd-runbar { margin: 10px 0 14px; }
.wd-run { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 10px 14px; border: 1px solid var(--border); border-radius: 10px; background: var(--card); }
.wd-run-t { font-size: 12px; color: var(--muted); }
.wd-run-s { font-size: 13px; color: var(--muted); }
.wd-run-next { font-size: 12px; color: var(--muted); }
.wd-run-none { padding: 12px 14px; border: 1px dashed var(--border); border-radius: 10px; color: var(--muted); }
.wd-actions { margin-bottom: 14px; }
.wd-new { font-size: 16px; padding: 12px 22px; }
.wd-board { display: grid; gap: 10px; }
.wd-card { border: 1px solid var(--border); border-radius: 10px; padding: 12px 14px; background: var(--card); }
.wd-card.st-stored { opacity: .62; }
.wd-c-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.wd-no { font-size: 17px; letter-spacing: .5px; }
.wd-c-meta { font-size: 13px; color: var(--muted); }
.wd-badge { font-size: 12px; padding: 3px 9px; border-radius: 20px; border: 1px solid var(--border); color: var(--muted); }
.wd-badge.ok { background: rgba(34,160,90,.13); border-color: rgba(34,160,90,.4); color: #1e8f52; }
.wd-c-info { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 7px; font-size: 13px; color: var(--muted); }
.wd-late { color: var(--danger); }
.wd-missing { margin-top: 8px; font-size: 13px; padding: 7px 10px; border-radius: 8px; background: rgba(200,140,20,.12); color: #a9740a; }
.wd-c-btns { display: flex; gap: 8px; margin-top: 10px; }
@media (prefers-color-scheme: dark) {
  .wd-badge.ok { color: #57d08a; }
  .wd-missing { color: #e0a944; }
}
.wd-grid th, .wd-grid td { white-space: nowrap; font-size: 13px; }
.wd-grid .wd-no { font-size: 15px; letter-spacing: .4px; }
.wd-dim { color: var(--muted); opacity: .65; }
.wd-subrow td { background: transparent; border-top: 0; padding-top: 0; }
.wd-sub { display: flex; flex-direction: column; gap: 6px; padding: 2px 0 10px; }
.wd-chart { width: 100%; max-width: 520px; height: 90px; }
.wd-chart svg { width: 100%; height: 90px; overflow: visible; }
.wd-line { fill: none; stroke: var(--primary); stroke-width: 1.6; stroke-linejoin: round; }
.wd-dots circle { fill: var(--primary); }
.wd-nom { stroke: var(--muted); stroke-width: 1; stroke-dasharray: 4 3; opacity: .7; }
.wd-pstats { display: flex; gap: 12px; flex-wrap: wrap; font-size: 12px; color: var(--muted); }
.wd-pnums { font-size: 12px; color: var(--muted); direction: ltr; text-align: right; letter-spacing: .3px; }
.wd-actions { display: flex; align-items: center; gap: 12px; }
.wd-hint { font-size: 13px; color: var(--danger); }
.wd-new:disabled { opacity: .5; cursor: not-allowed; }
.wd-row.st-cancelled { opacity: .5; text-decoration: line-through; }
.wd-live { font-size: 12px; padding: 3px 10px; border-radius: 20px; background: rgba(34,160,90,.14); color: #1e8f52; border: 1px solid rgba(34,160,90,.35); }
.wd-live.off { background: rgba(150,150,150,.14); color: var(--muted); border-color: var(--border); }
@media (prefers-color-scheme: dark) { .wd-live { color: #57d08a; } }

/* ── ایستگاه وایندر: پنل دستور تولید ─────────────────────────────────────── */
.wd-order { border: 1px solid var(--border); border-radius: 12px; padding: 14px 16px; background: var(--card); }
.wd-o-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.wd-o-tag { font-size: 11px; padding: 2px 8px; border-radius: 20px; background: var(--primary); color: #fff; }
.wd-o-title { font-size: 17px; }
.wd-o-spec, .wd-o-shift { font-size: 13px; color: var(--muted); }
.wd-bar { display: flex; height: 12px; border-radius: 20px; overflow: hidden; background: color-mix(in srgb, var(--muted) 18%, transparent); margin: 12px 0 10px; }
.wd-seg.ok { background: #22a05a; }
.wd-seg.pend { background: #d99320; }
.wd-seg.und { background: color-mix(in srgb, var(--muted) 55%, transparent); }
.wd-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 10px; }
.wd-stat { display: flex; flex-direction: column; gap: 2px; padding: 8px 10px; border-radius: 9px; background: color-mix(in srgb, var(--muted) 8%, transparent); border-inline-start: 3px solid transparent; }
.wd-stat.ok { border-inline-start-color: #22a05a; }
.wd-stat.pend { border-inline-start-color: #d99320; }
.wd-stat.und { border-inline-start-color: color-mix(in srgb, var(--muted) 55%, transparent); }
.wd-st-l { font-size: 11px; color: var(--muted); }
.wd-st-v { font-size: 17px; }
.wd-st-s { font-size: 11px; color: var(--muted); }
.wd-o-next { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--border); }
.wd-chip { font-size: 12px; padding: 3px 9px; border-radius: 20px; border: 1px solid var(--border); color: var(--muted); }
.wd-new.off { background: color-mix(in srgb, var(--muted) 25%, transparent); border-color: var(--border); color: var(--muted); box-shadow: none; }

/* ── رول در حال تولید ───────────────────────────────────────────────────── */
.wd-cur { border: 1px solid var(--border); border-radius: 12px; padding: 14px 16px; background: var(--card); }
.wd-cur-empty { padding: 18px; text-align: center; color: var(--muted); }
.wd-cur-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.wd-cur-lbl { font-size: 11px; color: var(--muted); }
.wd-cur-no { font-size: 24px; letter-spacing: 1px; }
.wd-badge.pend { background: rgba(217,147,32,.14); border-color: rgba(217,147,32,.4); color: #a9740a; }
.wd-badge.und { background: color-mix(in srgb, var(--muted) 12%, transparent); }
.wd-ok-txt { color: #1e8f52; }
.wd-prog { display: flex; align-items: flex-start; margin: 14px 0; gap: 0; }
.wd-pstep { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 5px; position: relative; }
.wd-pstep::before { content: ''; position: absolute; top: 6px; inset-inline: 50% -50%; height: 2px; background: var(--border); }
.wd-pstep:last-child::before { display: none; }
.wd-pstep.done::before { background: #22a05a; }
.wd-pdot { width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--border); background: var(--card); z-index: 1; }
.wd-pstep.done .wd-pdot { background: #22a05a; border-color: #22a05a; }
.wd-pstep.now .wd-pdot { background: var(--primary); border-color: var(--primary); box-shadow: 0 0 0 4px color-mix(in srgb, var(--primary) 22%, transparent); }
.wd-plabel { font-size: 11px; color: var(--muted); text-align: center; }
.wd-pstep.now .wd-plabel { color: var(--text); }

/* ── پروفایل عرضی (افقی، در امتداد عرض رول) ─────────────────────────────── */
.wd-prof { margin: 14px 0; }
.wd-prof-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 6px; font-size: 13px; }
.wd-strip { display: flex; gap: 2px; direction: rtl; }
.wd-cell { flex: 1; min-width: 26px; height: 46px; border-radius: 4px; display: grid; place-items: center; }
.wd-cell span { font-size: 11px; color: #fff; }
.wd-prof-foot { display: flex; margin-top: 4px; font-size: 11px; color: var(--muted); }

/* ── فاکتورهای لازم ─────────────────────────────────────────────────────── */
.wd-fgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 7px; margin: 14px 0 10px; }
.wd-fcell { padding: 7px 9px; border-radius: 8px; border: 1px dashed var(--border); display: flex; flex-direction: column; gap: 1px; }
.wd-fcell.filled { border-style: solid; background: color-mix(in srgb, var(--muted) 7%, transparent); }
.wd-fl { font-size: 11px; color: var(--muted); }
.wd-fv { font-size: 15px; }
.wd-fcell:not(.filled) .wd-fv { color: var(--muted); opacity: .5; }
.wd-fp { font-size: 10px; color: var(--muted); opacity: .7; }

/* ── تولیدات این شیفت ───────────────────────────────────────────────────── */
.wd-shift { border: 1px solid var(--border); border-radius: 12px; padding: 12px 14px; background: var(--card); }
.wd-sh-head { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.wd-live { font-size: 11px; padding: 3px 9px; border-radius: 20px; background: rgba(34,160,90,.14); color: #1e8f52; }
.wd-live.off { background: color-mix(in srgb, var(--muted) 14%, transparent); color: var(--muted); }

/* ── ثبت پروفایل عرضی ───────────────────────────────────────────────────── */
.pf-wrap { display: flex; flex-direction: column; gap: 10px; }
.pf-head { display: flex; align-items: center; gap: 10px; }
.pf-hint { font-size: 12px; color: var(--muted); }
.pf-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(76px, 1fr)); gap: 7px; }
.pf-cell { display: flex; flex-direction: column; gap: 3px; }
.pf-i { font-size: 11px; color: var(--muted); text-align: center; }
.pf-cell input { padding: 9px 6px; border: 2px solid var(--border); border-radius: 8px; font-family: inherit; font-size: 15px; text-align: center; background: var(--surface); color: var(--text); }
.pf-sum { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 9px; background: color-mix(in srgb, var(--muted) 9%, transparent); }
.pf-sum b { font-size: 20px; }

/* ── زنگوله و صف آزمایشگاه ──────────────────────────────────────────────── */
.btn.bell { position: relative; }
.bell-count { font-size: 12px; min-width: 20px; padding: 0 5px; border-radius: 20px; background: color-mix(in srgb, var(--muted) 22%, transparent); }
.btn.bell.ring { border-color: var(--danger); color: var(--danger); }
.btn.bell.ring .bell-count { background: var(--danger); color: #fff; }
@keyframes bellPulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.07); } }
.btn.bell.ring { animation: bellPulse 1.8s ease-in-out infinite; }
.lp-sec { display: flex; align-items: center; gap: 10px; font-size: 12px; font-weight: 700; color: var(--muted); margin: 14px 0 6px; }
.lp-sec:first-child { margin-top: 0; }
.lp-alert { border: 1px solid var(--border); border-inline-start: 3px solid var(--muted); border-radius: 9px; padding: 9px 11px; margin-bottom: 7px; }
.lp-alert.t-retest { border-inline-start-color: #d99320; }
.lp-alert.t-cancelled { border-inline-start-color: var(--danger); }
.lp-alert.t-next_phase { border-inline-start-color: #22a05a; }
.lp-a-head { display: flex; align-items: center; gap: 8px; }
.lp-a-msg { font-size: 13px; color: var(--muted); margin-top: 4px; }
.lp-row { border: 1px solid var(--border); border-radius: 9px; padding: 10px 12px; margin-bottom: 8px; }
.lp-main { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.lp-need { font-size: 13px; color: var(--muted); margin: 6px 0 8px; }
.lp-btns { display: flex; gap: 8px; }

/* ── ایستگاه لیفتراک ─────────────────────────────────────────────────────
 * دکمه‌های درشت و تک‌ستونی: کاربر با دستکش، روی لیفتراک، زیر آفتاب. */
.fk-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px; margin-bottom: 14px; box-shadow: var(--shadow); }
.fk-step { font-size: 12px; font-weight: 700; color: var(--muted); margin-bottom: 10px; }
.fk-row { display: flex; gap: 8px; align-items: stretch; flex-wrap: wrap; }
.fk-input { flex: 1; min-width: 150px; padding: 12px 14px; font-size: 17px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface-2); color: var(--text); }
.btn-lg { padding: 14px 20px; font-size: 17px; border-radius: 10px; }
.fk-wide { width: 100%; justify-content: center; margin-top: 8px; }
.fk-ghost { background: var(--surface-2); }
.fk-scan { flex: 0 0 auto; gap: 8px; }
.fk-box { margin-top: 12px; min-height: 62px; padding: 12px; border-radius: 10px; background: var(--surface-2); border: 1px dashed var(--border); }
.fk-empty { color: var(--muted); font-size: 14px; }
.fk-rollno { font-size: 24px; font-weight: 800; letter-spacing: .5px; }
.fk-meta { font-size: 13px; color: var(--muted); margin-top: 5px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.fk-warn { color: var(--warning); }
.fk-badge { font-size: 12px; padding: 3px 9px; border-radius: 999px; background: color-mix(in srgb, var(--muted) 16%, transparent); }
.fk-badge.ok { background: color-mix(in srgb, var(--success) 20%, transparent); color: var(--success); }
.fk-badge.warn { background: color-mix(in srgb, var(--warning) 20%, transparent); color: var(--warning); }
.fk-badge.bad { background: color-mix(in srgb, var(--danger) 18%, transparent); color: var(--danger); }
.fk-tiers { display: flex; gap: 8px; margin-top: 12px; }
.fk-tier { flex: 1; padding: 16px 8px; font-size: 16px; font-weight: 700; border: 1px solid var(--border); border-radius: 10px; background: var(--surface-2); color: var(--text); cursor: pointer; }
.fk-tier.active { background: var(--primary); border-color: var(--primary); color: #fff; }
.fk-net { font-size: 11px; padding: 3px 10px; border-radius: 999px; }
.fk-net.on { background: color-mix(in srgb, var(--success) 18%, transparent); color: var(--success); }
.fk-net.off { background: color-mix(in srgb, var(--danger) 16%, transparent); color: var(--danger); }
.fk-queue, .fk-dev { font-size: 11px; padding: 4px 10px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface-2); color: var(--muted); cursor: pointer; }
.fk-queue.has { background: color-mix(in srgb, var(--warning) 20%, transparent); color: var(--warning); border-color: transparent; }
.fk-dev.unset { color: var(--danger); border-color: var(--danger); }
.fk-log { display: flex; flex-direction: column; gap: 6px; }
.fk-logrow { display: flex; gap: 10px; font-size: 13px; padding: 6px 8px; border-radius: 8px; background: var(--surface-2); }
.fk-logrow.ok { border-inline-start: 3px solid var(--success); }
.fk-logrow.warn { border-inline-start: 3px solid var(--warning); }
.fk-logrow.bad { border-inline-start: 3px solid var(--danger); }
.fk-logtime { color: var(--muted); font-size: 12px; min-width: 62px; }

/* پوشش اسکنر دوربین */
.scan-overlay { position: fixed; inset: 0; z-index: 3000; background: rgba(0,0,0,.9); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px; padding: 20px; }
.scan-stage { position: relative; width: min(92vw, 420px); aspect-ratio: 1; border-radius: 14px; overflow: hidden; }
.scan-video { width: 100%; height: 100%; object-fit: cover; }
.scan-frame { position: absolute; inset: 16%; border: 3px solid rgba(255,255,255,.85); border-radius: 12px; }
.scan-overlay .btn { max-width: 420px; }

/* ── نقشه انبار (یکپارچه: زون + دهانه + موجودی) ─────────────────────────── */
.smap-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(132px, 1fr)); gap: 10px; margin-bottom: 18px; }
.smap-tile { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 13px 15px; box-shadow: var(--shadow); }
.smap-tv { font-size: 22px; font-weight: 800; line-height: 1.15; }
.smap-tl { font-size: 12px; color: var(--muted); margin-top: 3px; }
.smap-th { font-size: 11px; color: var(--muted); opacity: .75; margin-top: 2px; }
.smap-tile.warn .smap-tv { color: var(--warning); }
.smap-tile.bad  .smap-tv { color: var(--danger); }
.smap-tile.ok   .smap-tv { color: var(--success); }

.smap-zone { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 15px 17px; margin-bottom: 14px; box-shadow: var(--shadow); }
.smap-head { display: flex; gap: 9px; align-items: center; flex-wrap: wrap; margin-bottom: 13px; }
.smap-head .spacer { flex: 1; }
.smap-head strong { font-size: 15px; }
.smap-zcode { font-size: 11.5px; color: var(--muted); background: var(--surface-2); border: 1px solid var(--border); border-radius: 5px; padding: 2px 7px; direction: ltr; }
.smap-sum { font-size: 12.5px; color: var(--muted); }
.smap-dot { width: 9px; height: 9px; border-radius: 50%; flex: 0 0 auto; }
.smap-dot.ind { background: #1D9E75; }
.smap-dot.out { background: #D85A30; }
.smap-dot.tmp { background: #EF9F27; }

.smap-rows { display: flex; flex-direction: column; gap: 10px; }
.smap-row { display: flex; align-items: flex-start; gap: 10px; }
.smap-rlabel { flex: 0 0 auto; min-width: 62px; font-size: 11.5px; color: var(--muted); background: var(--surface-2);
  border: 1px solid var(--border); border-radius: 6px; padding: 4px 8px; direction: ltr; text-align: center; margin-top: 16px; }
.smap-norow { font-size: 13px; color: var(--muted); padding: 6px 2px; }
.smap-grid { display: flex; flex-wrap: wrap; gap: 7px; }

.smap-bay { position: relative; width: 62px; height: 56px; padding: 0; overflow: hidden; cursor: pointer;
  border: 1px solid var(--border); border-radius: 9px; background: var(--surface-2); color: var(--text);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; transition: transform .09s, box-shadow .09s; }
.smap-bay:hover { transform: translateY(-2px); box-shadow: 0 3px 10px rgba(16,24,40,.13); }
.smap-bay.empty { border-style: dashed; }
.smap-bay.mixed { border-color: var(--warning); border-width: 2px; }
.smap-bay.locked::after { content: ''; position: absolute; top: 5px; inset-inline-end: 5px; width: 5px; height: 5px; border-radius: 50%; background: var(--primary); }
.smap-fill { position: absolute; inset-inline: 0; bottom: 0; pointer-events: none; }
.smap-bay.ind .smap-fill { background: color-mix(in srgb, #1D9E75 26%, transparent); }
.smap-bay.out .smap-fill { background: color-mix(in srgb, #D85A30 26%, transparent); }
.smap-bay.tmp .smap-fill { background: color-mix(in srgb, #EF9F27 30%, transparent); }
.smap-no { position: relative; font-size: 11px; color: var(--muted); direction: ltr; }
.smap-c  { position: relative; font-size: 17px; font-weight: 800; }
.smap-bay.empty .smap-c { color: var(--muted); opacity: .55; font-weight: 500; }

.smap-panel { display: flex; flex-direction: column; gap: 13px; }
.smap-pstats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 9px; }
.smap-pstats .smap-tile { padding: 10px 12px; box-shadow: none; }
.smap-pstats .smap-tv { font-size: 18px; }
.smap-lock { font-size: 12.5px; padding: 9px 12px; border-radius: 8px; background: color-mix(in srgb, var(--primary) 9%, transparent);
  border: 1px solid color-mix(in srgb, var(--primary) 26%, transparent); color: var(--primary); }
.smap-lock.off { background: var(--surface-2); border-color: var(--border); color: var(--muted); }
.smap-ask { font-size: 14px; line-height: 1.9; }
@media (max-width: 640px) {
  .smap-pstats { grid-template-columns: repeat(2, 1fr); }
  .smap-row { flex-direction: column; gap: 6px; }
  .smap-rlabel { margin-top: 0; }
}

/* ═══════════════════════════════════════════════════════════════════════════
   بخش‌های بازرگانی / برنامه‌ریزی / انبار — پیش‌فاکتور، پوشش انبار، سفارش‌ها،
   نیاز سفارش‌های قطعی و ایستگاه بارگیری.
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── مقایسه‌ی «قیمت سیستم» با «قیمت پیشنهادی/نهایی» ───────────────────────── */
.pfc-host { margin: 4px 0 2px; }
.pfc { display: flex; flex-direction: column; gap: 8px; }
.pfc-band { display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px 15px; border-radius: 11px; border: 1px solid var(--border); background: var(--surface-2); }
.pfc-band.sys { border-right: 4px solid #8a8f98; }
.pfc-band.low { border-right: 4px solid var(--warning); background: rgba(217,119,6,.07); }
.pfc-band.high { border-right: 4px solid var(--success); background: rgba(22,163,74,.07); }
.pfc-bl { display: flex; flex-direction: column; gap: 2px; }
.pfc-bl b { font-size: 13px; }
.pfc-bl span { font-size: 11px; color: var(--muted); }
.pfc-bv { display: flex; flex-direction: column; gap: 2px; text-align: left; }
.pfc-bv b { font-size: 17px; }
.pfc-bv span { font-size: 11px; color: var(--muted); }
.pfc-delta { display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 11px 15px; border-radius: 11px; font-size: 13px; border: 1px dashed; }
.pfc-delta.loss { color: var(--warning); border-color: rgba(217,119,6,.5); background: rgba(217,119,6,.06); }
.pfc-delta.gain { color: var(--success); border-color: rgba(22,163,74,.5); background: rgba(22,163,74,.06); }
.pfc-delta b { font-size: 13px; }
.pfc-amt { font-size: 17px; font-weight: 800; }
.pfc-pct { padding: 2px 9px; border-radius: 999px; border: 1px solid currentColor; font-size: 12px; }
.pfc-kg { color: var(--muted); font-size: 11.5px; margin-inline-start: auto; }
.pfc-tbl th { font-size: 11.5px; }
.pfc-neg { color: var(--warning); font-weight: 600; }
.pfc-pos { color: var(--success); font-weight: 600; }

/* ── تأمین سفارش: انبار در برابر تولید ───────────────────────────────────── */
.sc-bar { display: flex; height: 24px; border-radius: 8px; overflow: hidden; margin: 4px 0 14px;
  border: 1px solid var(--border); background: var(--surface-2); }
.sc-seg { display: flex; align-items: center; justify-content: center; font-size: 11.5px;
  font-weight: 700; color: #fff; transition: width .3s ease; }
.sc-stock { background: #16a34a; }
.sc-make { background: repeating-linear-gradient(45deg, #c1272d, #c1272d 7px, #a81f25 7px, #a81f25 14px); }
.sc-bar.sm { height: 12px; margin: 0 0 8px; border-radius: 6px; }
.pc-cap.sc-ok b { color: var(--success); }
.pc-cap.sc-need b { color: var(--primary); }
td.sc-ok, .sc-ok { color: var(--success); font-weight: 600; }
td.sc-need, .sc-need { color: var(--primary); font-weight: 600; }
.sc-row { margin-top: 10px; padding: 11px 13px; border-radius: 11px;
  border: 1px solid var(--border); background: var(--surface-2); }
.sc-row.none { border-color: rgba(193,39,45,.3); background: rgba(193,39,45,.05); }
.sc-row-h { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; margin-bottom: 8px; }
.sc-spec { font-size: 11.5px; color: var(--muted); }
.sc-order { margin-inline-start: auto; font-size: 12px; font-weight: 700; }
.sc-row-f { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; font-size: 12px; }
.sc-have { display: inline-flex; align-items: center; gap: 5px; color: var(--text); }
.sc-have span { color: var(--muted); font-size: 11.5px; }
.sc-take.ok { color: var(--success); font-weight: 600; }
.sc-mk.need { color: var(--primary); font-weight: 600; }
.sc-take.dim, .sc-mk.dim { color: var(--muted); }
.sc-pct { margin-inline-start: auto; padding: 2px 9px; border-radius: 999px;
  border: 1px solid var(--border); font-size: 11.5px; color: var(--muted); }
.sc-sub { margin-top: 7px; font-size: 11.5px; color: var(--warning); }

/* نوار تأمین داخل ردیف‌های پیش‌فاکتور */
td.pf-cover { min-width: 130px; }
.pf-cov { display: flex; flex-direction: column; gap: 3px; }
.pf-cov .sc-bar { margin: 0; height: 10px; border-radius: 5px; }
.pf-cov-t { font-size: 10.5px; color: var(--muted); white-space: nowrap; }
.pf-cov-t.none { color: var(--primary); }

/* ── سفارش‌های در جریان / ایستگاه بارگیری (کارت سفارش) ───────────────────── */
.lo-card { margin-bottom: 14px; padding: 14px 16px; border-radius: 13px;
  border: 1px solid var(--border); background: var(--surface); }
.lo-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.lo-no { font-size: 15px; letter-spacing: .3px; }
.lo-badge { padding: 2px 10px; border-radius: 999px; font-size: 11.5px; font-weight: 700;
  color: var(--c); background: color-mix(in srgb, var(--c) 12%, transparent);
  border: 1px solid color-mix(in srgb, var(--c) 40%, transparent); }
.lo-cust { font-size: 13px; color: var(--text); }
/* یادداشتِ ثبت سفارش روی کارت انبار — معمولاً زمان بارگیریِ موردنظر مشتری،
   پس باید از بقیه‌ی کارت جدا و زودخوان باشد */
.lo-note { display: flex; align-items: baseline; gap: 9px; flex-wrap: wrap; margin-bottom: 10px;
  padding: 8px 12px; border-radius: 10px; background: rgba(217,119,6,.09);
  border: 1px solid rgba(217,119,6,.32); border-inline-start: 3px solid var(--warning); }
.lo-note-l { font-size: 11.5px; font-weight: 700; color: var(--warning); flex: none; }
.lo-note b { font-size: 13.5px; font-weight: 600; line-height: 1.8; white-space: pre-line; }

.lo-date { font-size: 11.5px; color: var(--muted); }
.lo-link { display: inline-flex; align-items: center; gap: 4px; padding: 3px 9px; cursor: pointer;
  border-radius: 8px; border: 1px solid var(--border); background: var(--surface-2);
  color: var(--muted); font-size: 11.5px; font-family: inherit; }
.lo-link:hover { color: var(--primary); border-color: var(--primary); }
.lo-cancel { color: var(--danger) !important; }
.lo-cancel:hover { border-color: var(--danger) !important; }
.lo-deliver { color: var(--success) !important; }
.lo-deliver:hover { border-color: var(--success) !important; }
.lo-cancelled { display: flex; align-items: flex-start; gap: 7px; margin: 8px 0 2px; padding: 9px 12px;
  border-radius: 9px; background: rgba(193,39,45,.07); border: 1px solid rgba(193,39,45,.3);
  font-size: 12px; line-height: 1.8; }
.lo-cancelled svg { flex: none; margin-top: 2px; color: var(--danger); }
.lo-cancelled b { color: var(--danger); }
.lo-by { color: var(--muted); }
.lo-prog { height: 8px; border-radius: 4px; background: var(--surface-2);
  border: 1px solid var(--border); overflow: hidden; }
.lo-prog-in { height: 100%; background: #16a34a; transition: width .3s ease; }
.lo-nums { display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  margin: 8px 0 4px; font-size: 12px; color: var(--muted); }
.lo-nums b { color: var(--text); }
.lo-ok b { color: var(--success); }
.lo-rem b { color: var(--primary); }
.lo-pct { padding: 2px 9px; border-radius: 999px; border: 1px solid var(--border); font-size: 11.5px; }
.lo-tbl { margin-top: 8px; }
.lo-tbl th { font-size: 11.5px; }

/* ── ایستگاه بارگیری: پنل انتخاب رول ─────────────────────────────────────── */
.ld-page { display: flex; flex-direction: column; gap: 14px; }
.ld-dim { color: var(--muted); font-size: 11.5px; }
.ld-chip { padding: 2px 9px; border-radius: 999px; border: 1px solid var(--border);
  background: var(--surface-2); font-size: 11px; color: var(--muted); }
.ld-acts { display: flex; gap: 9px; flex-wrap: wrap; margin-top: 10px; }
.ld-body:empty { display: none; }
.ld-scanbar { display: flex; align-items: center; gap: 8px; margin: 12px 0 10px;
  padding: 9px 12px; border-radius: 10px; border: 1px solid var(--primary); background: var(--surface-2); }
.ld-scan { flex: 1; min-width: 0; border: none; background: transparent; color: var(--text);
  font-family: inherit; font-size: 13px; outline: none; }
.ld-scanbar .btn { flex: none; }
.ld-hint { display: flex; align-items: center; gap: 6px; margin: -4px 0 10px; padding: 0 4px;
  font-size: 11.5px; color: var(--primary); line-height: 1.7; }
.ld-hint:empty { display: none; }
.ld-hint svg { flex: none; }
.ld-sect { margin: 14px 0 7px; font-size: 12.5px; }
.ld-tbl th { font-size: 11.5px; }
.ld-qc { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; color: var(--muted); }
.ld-qc i { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.ld-loaded { display: flex; flex-direction: column; gap: 6px; }
.ld-lr { display: flex; align-items: center; gap: 11px; padding: 7px 11px; border-radius: 9px;
  background: rgba(22,163,74,.07); border: 1px solid rgba(22,163,74,.28); font-size: 12px; }
.ld-lr.bad { background: rgba(217,119,6,.08); border-color: rgba(217,119,6,.35); }
.ld-bad { color: var(--warning); font-weight: 700; font-size: 11.5px; }
.ld-rollhead { display: flex; align-items: center; gap: 11px; flex-wrap: wrap; padding-bottom: 9px;
  border-bottom: 1px solid var(--border); margin-bottom: 4px; }
.ld-rollhead b { font-size: 17px; }
.ld-apps { display: flex; gap: 9px; margin: 4px 0 9px; }
.ld-app { flex: 1; padding: 11px; border-radius: 10px; cursor: pointer; font-family: inherit; font-size: 13px;
  border: 1px solid var(--border); background: var(--surface-2); color: var(--muted); }
.ld-app.on { border-color: var(--primary); color: var(--primary); font-weight: 700;
  background: color-mix(in srgb, var(--primary) 10%, transparent); }

/* ── میزکار برنامه‌ریزی: ستون اصلی + ساید‌بارِ نیاز سفارش‌ها ─────────────── */
.pl-wrap { display: grid; grid-template-columns: 1fr; gap: 16px; align-items: start; }
.pl-main { min-width: 0; }
.pl-side { position: sticky; top: 12px; display: flex; flex-direction: column; gap: 10px;
  padding: 13px 14px; border-radius: 13px; border: 1px solid var(--border);
  background: var(--surface); max-height: calc(100vh - 90px); overflow-y: auto; }
.pl-side-h { display: flex; flex-direction: column; gap: 3px; font-size: 13px; font-weight: 700;
  padding-bottom: 9px; border-bottom: 1px solid var(--border); }
.pl-side-h .pl-note { font-weight: 400; font-size: 11px; color: var(--muted); }
.pl-dem { display: flex; flex-direction: column; gap: 10px; }
.pl-dem-row { display: flex; flex-direction: column; align-items: stretch; gap: 7px;
  padding: 11px 13px; border-radius: 11px; border: 1px solid rgba(193,39,45,.3);
  background: rgba(193,39,45,.05); }
.pl-dem-row.off { border-color: var(--border); background: var(--surface-2); opacity: .72; }
.pl-dem-t { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; font-size: 12.5px; }
.pl-dem-chip { padding: 1px 7px; border-radius: 6px; color: #fff; font-size: 10.5px; font-weight: 700; }
.pl-dem-spec { color: var(--muted); font-size: 11.5px; }
.pl-dem-n { display: flex; align-items: center; gap: 4px 10px; flex-wrap: wrap;
  font-size: 11.5px; color: var(--muted); }
.pl-dem-n b { color: var(--text); }
.pl-dem-n .pl-ok { color: var(--success); }
.pl-dem-short b { color: var(--primary); }
.pl-dem-days { margin-inline-start: auto; }
.pl-dem-who { display: flex; align-items: center; gap: 5px; font-size: 11.5px; color: var(--muted); }
.pl-dem-add { display: inline-flex; align-items: center; justify-content: center; gap: 5px; width: 100%;
  padding: 8px 12px; border-radius: 9px; cursor: pointer; font-family: inherit; font-size: 12px;
  border: none; background: var(--primary); color: #fff; }
.pl-dem-add:hover { filter: brightness(1.08); }
.pl-dem-add.dim { background: transparent; color: var(--muted); border: 1px solid var(--border); cursor: default; }
.pl-dem-add.done { background: transparent; color: var(--success); border: 1px solid rgba(22,163,74,.45); }
.pl-dem-add.done:hover { background: rgba(22,163,74,.08); filter: none; }
.pl-dem-none { display: flex; align-items: center; gap: 7px; padding: 14px 4px;
  font-size: 12px; color: var(--muted); line-height: 1.8; }
.pl-dem-none svg { flex: none; }
/* ساید‌بارِ نیاز سفارش‌ها فقط وقتی کنار می‌نشیند که عرض واقعاً برسد؛
   وگرنه تایم‌لاین و نمودار توزیع فشرده و ناخوانا می‌شوند. */
@media (min-width: 1400px) {
  .pl-wrap { grid-template-columns: 1fr 330px; }
  .pl-side { position: sticky; top: 12px; max-height: calc(100vh - 90px); }
}
@media (max-width: 1399px) {
  /* زیرِ ستون اصلی می‌نشیند؛ کشیده‌شدن به تمام عرض بدقواره است */
  .pl-side { position: static; max-height: none; max-width: 560px; }
}

/* کمپینِ سفارش قطعی داخل نوار پیشنهاد سیستم */
.pl-blk.ord { outline: 2px solid var(--warning); outline-offset: -2px; }
.pl-blk.ord::after { content: '★'; position: absolute; top: 2px; inset-inline-end: 4px;
  font-size: 10px; color: var(--warning); }

/* ── صف تولید: نوار کسری سفارش‌ها + کارت خاموشِ منتظر تأیید ──────────────── */
.q-demand:empty { display: none; }
.q-dem { display: flex; flex-direction: column; align-items: stretch; gap: 10px;
  margin-bottom: 14px; padding: 12px 14px; border-radius: 12px;
  border: 1px solid rgba(193,39,45,.35); background: rgba(193,39,45,.06); }
.q-dem-h { display: flex; align-items: center; gap: 9px; }
.q-dem-h > svg { color: var(--primary); flex: none; }
.q-dem-h b { font-size: 13px; color: var(--primary); }
.q-dem-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  padding: 10px 12px; border-radius: 10px; background: var(--surface); border: 1px solid var(--border); }
.q-dem-row .btn { margin-inline-start: auto; flex: none; }
.q-dem-txt { display: flex; flex-direction: column; gap: 3px; font-size: 12px; color: var(--muted); }
.q-dem-txt b { color: var(--text); font-size: 12.5px; }
.q-dem-all { align-self: flex-start; }
.q-card.q-wait { opacity: .55; filter: grayscale(.55); cursor: default;
  border-style: dashed; background: var(--surface-2); }
.q-card.q-wait:hover { transform: none; box-shadow: none; }
.q-card.q-wait .q-rank { background: transparent; border: 1px dashed var(--border); color: var(--muted); }
.q-st-wait { color: var(--warning); font-weight: 700; }
.q-wait { padding: 12px 14px; border-radius: 12px; border: 1px dashed var(--border); background: var(--surface-2); }

/* کارت «کمپین جدید» در داشبورد مدیرعامل — عمداً کم‌حرف */
.ceo-add-t { font-size: 14px; font-weight: 700; line-height: 1.8; margin-top: 6px; }
.ceo-add-s { font-size: 12px; color: var(--muted); line-height: 1.8; margin-top: 3px; }

/* آلارم بارگیری در داشبورد بازرگانی */
.cd-alert.ready { border-color: rgba(22,163,74,.45); background: rgba(22,163,74,.08); }
.cd-alert.ready > svg { color: var(--success); }
.cd-alert.ready b { color: var(--success); }
.cd-alert.soon { border-color: rgba(217,119,6,.45); background: rgba(217,119,6,.07); }
.cd-alert.soon > svg { color: var(--warning); }
.cd-alert.soon b { color: var(--warning); }

/* پیام «ذخیره شد» زیر پیش‌فاکتور */
.pf-saved { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 12px;
  padding: 11px 14px; border-radius: 10px; background: rgba(22,163,74,.08);
  border: 1px solid rgba(22,163,74,.32); font-size: 12.5px; }

.toast.warn { background: var(--warning); }
.smap-legend { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; padding: 10px 14px; margin-bottom: 14px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); font-size: 12px; color: var(--muted); }
.smap-legend span { display: inline-flex; align-items: center; gap: 6px; }
.smap-legend i { flex: 0 0 auto; }
.smap-key { width: 16px; height: 14px; border-radius: 4px; background: var(--surface-2); }
.smap-key.mixed { border: 2px solid var(--warning); }
.smap-key.locked { border: 1px solid var(--border); position: relative; }
.smap-key.locked::after { content: ''; position: absolute; top: 2px; inset-inline-end: 2px; width: 4px; height: 4px; border-radius: 50%; background: var(--primary); }
.smap-lhint { margin-inline-start: auto; opacity: .8; }
.btn.btn-quiet-danger { background: transparent; color: var(--danger); border: 1px solid color-mix(in srgb, var(--danger) 40%, transparent); }
.btn.btn-quiet-danger:hover { background: color-mix(in srgb, var(--danger) 10%, transparent); border-color: var(--danger); }

/* ═══════════════════════════════════════════════════════════════════════════
   بازسازی استایل صفحه‌های برنامه‌ریزی، صف تولید، داشبوردها، پیش‌فاکتور،
   ایستگاه وایندر، لیبل و اعلان‌ها.
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── عمومی و کمکی ────────────────────────────────────────────────────────── */
.muted { color: var(--muted); }
.hint { font-size: 11.5px; color: var(--muted); line-height: 1.8; }
.meta { font-size: 11.5px; color: var(--muted); }
.tiny { font-size: 10.5px; }
.big { font-size: 17px; font-weight: 700; }
.mid { font-size: 13px; }
.crit { color: var(--danger); }
.free { color: var(--success); }
.fresh { color: var(--primary); }
.field-help { font-size: 11px; color: var(--muted); margin-top: 4px; line-height: 1.7; }
.color-input { width: 46px; height: 32px; padding: 2px; border-radius: 8px;
  border: 1px solid var(--border); background: var(--surface-2); cursor: pointer; }
.sec-h { display: flex; align-items: center; gap: 8px; font-size: 13.5px; font-weight: 700; margin-bottom: 10px; }
.cust-sum { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12px; color: var(--muted); margin-bottom: 10px; }

/* ── میزکار برنامه‌ریزی ──────────────────────────────────────────────────── */
.pl-page { display: flex; flex-direction: column; gap: 12px; }
.pl-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 10px 12px;
  border-radius: 12px; border: 1px solid var(--border); background: var(--surface); }
.pl-spacer { flex: 1; }
.pl-vsep { width: 1px; align-self: stretch; background: var(--border); margin: 0 4px; }
.pl-tabs, .pl-pills, .pl-acts, .pl-tools { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.pl-tab, .pl-pill, .pl-tbtn {
  padding: 7px 13px; border-radius: 9px; cursor: pointer; font-family: inherit; font-size: 12px;
  border: 1px solid var(--border); background: var(--surface-2); color: var(--muted); }
.pl-tab:hover, .pl-pill:hover, .pl-tbtn:hover { color: var(--text); border-color: var(--muted); }
.pl-tab.on, .pl-pill.on { border-color: var(--primary); color: var(--primary); font-weight: 700;
  background: color-mix(in srgb, var(--primary) 10%, transparent); }
.pl-tab.off, .pl-tbtn.off { opacity: .45; cursor: not-allowed; }
.pl-tbtn.on { border-color: var(--primary); color: var(--primary); }
.pl-add { color: var(--primary); border-color: var(--primary); }
.pl-tbtn.dirty, .pl-save.dirty { border-color: var(--warning); color: var(--warning); font-weight: 700; }
.pl-cycleinfo, .pl-plinfo { font-size: 11.5px; color: var(--muted); }
.pl-nocycle { font-size: 12px; color: var(--warning); }
.pl-select { padding: 6px 10px; border-radius: 9px; border: 1px solid var(--border);
  background: var(--surface-2); color: var(--text); font-family: inherit; font-size: 12px; }
.pl-sect-h { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 700; margin: 6px 0 2px; }
.pl-note { font-weight: 400; font-size: 11px; color: var(--muted); }
.pl-hint { font-size: 11px; color: var(--muted); }
.pl-panel { padding: 12px 14px; border-radius: 12px; border: 1px solid var(--border); background: var(--surface); }
.pl-panel + .pl-panel { margin-top: 12px; }
.pl-panel-sys { background: var(--surface-2); }
.pl-panel-h { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; margin-bottom: 9px; }
.pl-panel-t { font-size: 12.5px; font-weight: 700; }
.pl-sysh { color: var(--muted); }

/* توزیع فروش */
.pl-dist { display: flex; gap: 16px; flex-wrap: wrap; align-items: flex-start;
  padding: 12px 14px; border-radius: 12px; border: 1px solid var(--border); background: var(--surface); }
.pl-dwrap { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.pl-dchart { flex: none; }
.pl-dctr { font-size: 12px; text-align: center; }
.pl-dfoot { width: 100%; font-size: 11.5px; color: var(--muted); }
.pl-legend { display: flex; flex-direction: column; gap: 5px; min-width: 240px; flex: 1; }
.pl-lrow { display: flex; align-items: center; gap: 8px; font-size: 11.5px; }
.pl-lsw, .pl-lchip { width: 11px; height: 11px; border-radius: 3px; flex: none; }
.pl-lname { flex: 1; min-width: 0; }
.pl-lshare, .pl-lalloc { color: var(--muted); }
.pl-lbar { height: 6px; border-radius: 3px; background: var(--surface-2); overflow: hidden; flex: 1; }
.pl-lh { font-weight: 700; }
.pl-lt { font-size: 11px; color: var(--muted); }

/* تایم‌لاین طرح */
.pl-tl { display: flex; flex-direction: column; gap: 10px; }
.pl-track { display: flex; align-items: stretch; gap: 3px; min-height: 62px; padding: 6px;
  border-radius: 10px; border: 1px solid var(--border); background: var(--surface-2); }
.pl-mine { border-style: solid; }
.pl-sys { opacity: .95; }
.pl-empty-track { display: flex; align-items: center; justify-content: center; width: 100%;
  font-size: 12px; color: var(--muted); }
.pl-blk { --c: #8a8f98; position: relative; overflow: hidden; border-radius: 5px; padding: 2px 4px;
  background: color-mix(in srgb, var(--c) 22%, transparent); border: 1px solid var(--c);
  display: flex; flex-direction: column; justify-content: center; gap: 0; min-width: 0; }
.pl-blk.nb { border-inline-start-width: 3px; }
.pl-blk.ed { cursor: grab; }
.pl-blk.drag { opacity: .5; }
.pl-blk-t { font-size: 10px; font-weight: 800; letter-spacing: .3px; }
.pl-blk-g, .pl-blk-w, .pl-blk-n { font-size: 9.5px; color: var(--muted); white-space: nowrap; }
.pl-grip { position: absolute; inset-inline-start: 0; top: 0; bottom: 0; width: 6px; cursor: col-resize; }
.pl-x { position: absolute; top: 1px; inset-inline-start: 2px; width: 15px; height: 15px; line-height: 13px;
  text-align: center; border-radius: 4px; border: none; cursor: pointer; font-size: 12px;
  background: transparent; color: var(--muted); }
.pl-x:hover { background: var(--danger); color: #fff; }
.pl-axis { display: flex; gap: 3px; padding: 0 6px; }
.pl-tick { flex: 1; text-align: center; font-size: 10px; color: var(--muted); }
.pl-tick.buf { color: var(--warning); }
.pl-crow { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; font-size: 12px; }
.pl-calc { font-size: 12px; color: var(--muted); line-height: 1.9; }
.pl-wait { font-size: 12px; color: var(--warning); }
.pl-ok { color: var(--success); }

/* ── صف تولید ────────────────────────────────────────────────────────────── */
.q-wrap { display: grid; grid-template-columns: 1fr 320px; gap: 14px; align-items: start; }
.q-col { min-width: 0; }
.q-side { display: flex; flex-direction: column; gap: 12px; }
.q-sum { font-size: 11.5px; color: var(--muted); margin-inline-start: auto; }
.q-cards { display: flex; flex-direction: column; gap: 8px; }
.q-card { --c: #8a8f98; display: flex; align-items: center; gap: 11px; padding: 10px 12px;
  border-radius: 11px; border: 1px solid var(--border); background: var(--surface);
  border-inline-start: 4px solid var(--c); cursor: pointer; transition: transform .12s ease; }
.q-card:hover { transform: translateX(-2px); }
.q-card.act { border-color: var(--success); background: rgba(22,163,74,.06); }
.q-card.locked { border-style: dashed; }
.q-card.drag { opacity: .5; }
.q-card.over { outline: 2px dashed var(--primary); outline-offset: 2px; }
.q-rank { width: 26px; height: 26px; flex: none; display: grid; place-items: center;
  border-radius: 50%; background: var(--surface-2); font-size: 11.5px; font-weight: 700; }
.q-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.q-t { font-size: 12.5px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.q-abbr { padding: 1px 6px; border-radius: 5px; background: var(--c); color: #fff;
  font-size: 10px; font-weight: 700; }
.q-m { font-size: 11.5px; color: var(--muted); }
.q-n { font-size: 10.5px; color: var(--muted); }
.q-st { flex: none; font-size: 11px; color: var(--muted); }
.q-plans { display: flex; flex-direction: column; gap: 8px; }
.q-plan { padding: 10px 12px; border-radius: 11px; border: 1px solid var(--border); background: var(--surface); }
.q-plan-h { display: flex; align-items: center; gap: 8px; font-size: 12.5px; font-weight: 700; }
.q-plan-m { font-size: 11.5px; color: var(--muted); margin: 4px 0; }
.q-plan-n { font-size: 11px; color: var(--muted); }
.q-plan-a { display: flex; gap: 7px; flex-wrap: wrap; margin-top: 8px; }
/* نمودار پیش‌بینی صف */
.q-proj { padding: 12px 14px; border-radius: 12px; border: 1px solid var(--border); background: var(--surface); }
.q-proj-h { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 9px; }
.q-proj-t { font-size: 12.5px; font-weight: 700; }
.q-proj-k { font-size: 11.5px; color: var(--muted); }
.q-proj-c { display: flex; align-items: center; gap: 6px; font-size: 11.5px; }
.q-proj-bar { display: flex; height: 26px; border-radius: 7px; overflow: hidden;
  border: 1px solid var(--border); background: var(--surface-2); }
.q-proj-axis { display: flex; margin-top: 5px; }
.q-ptick { flex: 1; text-align: center; font-size: 10px; color: var(--muted); }
.q-proj-alert { margin-top: 9px; padding: 9px 12px; border-radius: 9px; font-size: 12px;
  background: rgba(217,119,6,.08); border: 1px solid rgba(217,119,6,.35); color: var(--warning); }
.q-seg { --c: #8a8f98; position: relative; display: flex; align-items: center; justify-content: center;
  background: color-mix(in srgb, var(--c) 30%, transparent); border-inline-end: 1px solid var(--border); }
.q-seg-t { font-size: 10px; white-space: nowrap; }
.q-seg-grip { position: absolute; inset-inline-start: 0; top: 0; bottom: 0; width: 6px; cursor: col-resize; }
.q-seg-x { position: absolute; top: 1px; inset-inline-end: 2px; border: none; background: transparent;
  color: var(--muted); cursor: pointer; font-size: 11px; }
.q-pcap { font-size: 11px; color: var(--muted); }
@media (max-width: 1000px) { .q-wrap { grid-template-columns: 1fr; } }

/* ── داشبوردها ───────────────────────────────────────────────────────────── */
.cd-page { display: flex; flex-direction: column; gap: 14px; }
.cd-alerts { display: flex; flex-direction: column; gap: 9px; }
.cd-alert { display: flex; align-items: center; gap: 11px; padding: 12px 14px; border-radius: 11px;
  border: 1px solid var(--border); background: var(--surface); font-size: 12.5px; }
.cd-alert > svg { flex: none; }
.cd-alert .btn { margin-inline-start: auto; flex: none; }
.cd-alert.critical { border-color: rgba(193,39,45,.45); background: rgba(193,39,45,.07); }
.cd-alert.critical > svg, .cd-alert.critical b { color: var(--danger); }
.cd-alert.warning, .cd-alert.warn { border-color: rgba(217,119,6,.45); background: rgba(217,119,6,.07); }
.cd-alert.warning > svg, .cd-alert.warning b { color: var(--warning); }
.cd-alert.ok { border-color: rgba(22,163,74,.4); background: rgba(22,163,74,.06); }
.cd-alert.ok > svg, .cd-alert.ok b { color: var(--success); }
.cd-alert.approval { border-color: rgba(78,121,167,.5); background: rgba(78,121,167,.08); }
.cd-alert-s { font-size: 11.5px; color: var(--muted); margin-top: 2px; }
.cd-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; align-items: start; }
.cd-col { min-width: 0; display: flex; flex-direction: column; gap: 9px; }
.cd-colh { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 700;
  padding-bottom: 8px; border-bottom: 1px solid var(--border); }
.cd-colh .spacer { flex: 1; }
.cd-cnt { padding: 1px 8px; border-radius: 999px; background: var(--surface-2);
  border: 1px solid var(--border); font-size: 11px; font-weight: 400; }
.cd-cnt.fresh { background: var(--primary); color: #fff; border-color: var(--primary); }
.cd-note { font-size: 11.5px; color: var(--muted); line-height: 1.8; margin: 0; }
.cd-sect { font-size: 12.5px; font-weight: 700; margin-top: 6px; }
.cd-seen { font-size: 11px; }
.cd-one { display: flex; flex-direction: column; gap: 3px; }
.cd-empty { display: flex; flex-direction: column; align-items: center; gap: 9px; padding: 40px 20px;
  border-radius: 13px; border: 1px dashed var(--border); text-align: center; color: var(--muted); }
.cd-empty-i { opacity: .5; }
.cd-pfwrap { display: flex; flex-direction: column; gap: 9px; margin-bottom: 6px; }
.cd-pf { border-color: rgba(217,119,6,.4); }
.cd-pfb { display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  font-size: 12px; color: var(--muted); margin: 6px 0; }
.cd-pfw { margin-inline-start: auto; }
@media (max-width: 1000px) { .cd-cols { grid-template-columns: 1fr; } }

/* کارت تصمیم مدیرعامل */
.ceo-card { padding: 12px 14px; border-radius: 12px; border: 1px solid var(--border); background: var(--surface); }
.ceo-card.pend { border-color: rgba(217,119,6,.45); }
.ceo-card.approved { border-color: rgba(22,163,74,.35); }
.ceo-card.rejected { border-color: rgba(193,39,45,.35); }
.ceo-h { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }
.ceo-line { font-size: 11.5px; color: var(--muted); }
.ceo-badge { padding: 2px 9px; border-radius: 999px; font-size: 11px; font-weight: 700;
  background: rgba(217,119,6,.12); color: var(--warning); border: 1px solid rgba(217,119,6,.4); }
.ceo-badge.lock { background: rgba(78,121,167,.12); color: #4e79a7; border-color: rgba(78,121,167,.4); }
.ceo-m { font-size: 11.5px; color: var(--muted); margin-top: 6px; }
.ceo-r { margin-top: 6px; padding: 8px 11px; border-radius: 9px; background: var(--surface-2);
  border: 1px solid var(--border); font-size: 11.5px; line-height: 1.8; }
.ceo-r.lock { color: var(--warning); border-color: rgba(217,119,6,.35); }
.ceo-d { margin-top: 8px; font-size: 11.5px; color: var(--muted); }
.ceo-a { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; align-items: center; }
.ceo-note { flex: 1; min-width: 150px; padding: 7px 10px; border-radius: 9px;
  border: 1px solid var(--border); background: var(--surface-2); color: var(--text);
  font-family: inherit; font-size: 12px; }
.ceo-pvbar { margin-top: 9px; }
.ceo-done { display: flex; align-items: center; gap: 9px; padding: 7px 10px; border-radius: 9px;
  background: var(--surface-2); border: 1px solid var(--border); font-size: 11.5px; }
.ceo-done.approved .ceo-done-k { color: var(--success); }
.ceo-done.rejected .ceo-done-k { color: var(--danger); }
.ceo-done-k { flex: none; font-weight: 700; }
.ceo-done-b { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ceo-done-w { flex: none; color: var(--muted); }

/* اعلان‌های تغییر صف */
.nt-feed { display: flex; flex-direction: column; gap: 8px; }
.nt-row { padding: 10px 12px; border-radius: 11px; border: 1px solid var(--border);
  background: var(--surface); border-inline-start: 3px solid var(--muted); }
.nt-row.k-remove { border-inline-start-color: var(--danger); }
.nt-row.k-add { border-inline-start-color: var(--success); }
.nt-row.k-reorder { border-inline-start-color: #4e79a7; }
.nt-row.nt-new { background: color-mix(in srgb, var(--primary) 5%, var(--surface)); }
.nt-top { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }
.nt-k { font-size: 11.5px; font-weight: 700; }
.nt-w { margin-inline-start: auto; font-size: 11px; color: var(--muted); }
.nt-b { font-size: 12.5px; line-height: 1.8; margin-top: 4px; }
.nt-why { font-size: 11.5px; color: var(--muted); margin-top: 4px; line-height: 1.8; }
.nt-reason { display: flex; align-items: flex-start; gap: 6px; margin-top: 5px;
  font-size: 11.5px; color: var(--text); line-height: 1.8; }
.nt-reason svg { flex: none; margin-top: 3px; color: var(--muted); }
.nt-by { font-size: 11px; color: var(--muted); margin-top: 4px; }

/* ── پیش‌نمایش تغییر صف ──────────────────────────────────────────────────── */
.pv-wrap { margin-top: 9px; }
.pv-head { display: flex; align-items: center; gap: 9px; font-size: 12px; margin-bottom: 7px; }
.pv-k { font-weight: 700; }
.pv-no { color: var(--muted); }
.pv-note { font-size: 11.5px; color: var(--muted); line-height: 1.8; margin: 6px 0; }
.pv-strip { display: flex; gap: 3px; padding: 5px; border-radius: 9px;
  border: 1px solid var(--border); background: var(--surface-2); min-height: 40px; }
.pv-mv { --c: #8a8f98; flex: 1; min-width: 0; border-radius: 5px; padding: 2px 4px;
  background: color-mix(in srgb, var(--c) 25%, transparent); border: 1px solid var(--c); font-size: 10px; }
.pv-mv.moved { outline: 2px solid var(--warning); outline-offset: -2px; }
.pv-ab { display: flex; flex-direction: column; gap: 7px; }
.pv-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.pv-chip { padding: 1px 7px; border-radius: 999px; font-size: 10.5px; border: 1px solid var(--border); }
.pv-gm, .pv-dy, .pv-lg, .pv-lgt, .pv-sw { font-size: 11px; color: var(--muted); }
.pv-legend, .pv-moves { display: flex; gap: 9px; flex-wrap: wrap; font-size: 11px; color: var(--muted); margin-top: 6px; }
.pv-state { font-size: 11.5px; color: var(--muted); }
.pv-play { display: flex; gap: 7px; align-items: center; margin-top: 7px; }
.pv-open.on { border-color: var(--primary); color: var(--primary); }

/* ── پرونده‌ی پیش‌فاکتور ─────────────────────────────────────────────────── */
.pff-page { display: flex; flex-direction: column; gap: 14px; }
.pff-head { display: flex; align-items: center; gap: 11px; flex-wrap: wrap; }
.pff-title { font-size: 17px; font-weight: 800; }
.pff-sub { font-size: 12px; color: var(--muted); }
.pff-back { display: inline-flex; align-items: center; gap: 5px; padding: 5px 10px; cursor: pointer;
  border-radius: 8px; border: 1px solid var(--border); background: var(--surface-2);
  color: var(--muted); font-family: inherit; font-size: 12px; }
.pff-back:hover { color: var(--primary); border-color: var(--primary); }
.pff-grid { display: grid; grid-template-columns: 1fr 300px; gap: 14px; align-items: start; }
.pff-main { min-width: 0; display: flex; flex-direction: column; gap: 12px; }
.pff-side { display: flex; flex-direction: column; gap: 12px; }
.pff-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 9px; margin: 8px 0; }
.pff-stat { display: flex; flex-direction: column; gap: 3px; padding: 9px 11px; border-radius: 10px;
  border: 1px solid var(--border); background: var(--surface-2); }
.pff-stat span { font-size: 11px; color: var(--muted); }
.pff-stat b { font-size: 13px; }
.pff-det { display: flex; gap: 12px; flex-wrap: wrap; font-size: 12px; color: var(--muted); }
.pff-dim { color: var(--muted); }
.pff-acts { display: flex; gap: 9px; flex-wrap: wrap; margin-top: 4px; }
.pff-modal { display: flex; flex-direction: column; gap: 11px; min-width: 0; }
.pff-modal textarea, .pff-modal input[type=text] { width: 100%; padding: 9px 11px; border-radius: 9px;
  border: 1px solid var(--border); background: var(--surface-2); color: var(--text);
  font-family: inherit; font-size: 12.5px; resize: vertical; }
.pff-warn { padding: 9px 12px; border-radius: 9px; font-size: 12px;
  background: rgba(217,119,6,.09); border: 1px solid rgba(217,119,6,.4); color: var(--warning); }
.pff-wait { font-size: 12px; color: var(--warning); }
.pff-tl { display: flex; flex-direction: column; gap: 0; }
.pff-tlbox { padding: 12px 14px; border-radius: 12px; border: 1px solid var(--border); background: var(--surface); }
.pff-ev { display: flex; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--border); }
.pff-ev:last-child { border-bottom: none; }
.pff-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--muted); flex: none; margin-top: 5px; }
.pff-evb { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.pff-who { font-size: 11px; color: var(--muted); }
.pff-cm { margin-top: 4px; padding: 8px 11px; border-radius: 9px; background: var(--surface-2);
  border: 1px solid var(--border); font-size: 11.5px; line-height: 1.8; }
.pff-cmrow { display: flex; gap: 8px; align-items: flex-start; margin-top: 9px; }
.pff-cmrow textarea { flex: 1; }
@media (max-width: 1000px) { .pff-grid { grid-template-columns: 1fr; } }

/* نشان‌ها و ردیف‌های فهرست پیش‌فاکتور */
.pf-badge { padding: 2px 10px; border-radius: 999px; font-size: 11px; font-weight: 700; border: 1px solid; }
.pf-no { font-weight: 700; }
.pf-rev { margin-inline-start: 6px; font-size: 10.5px; color: var(--muted); }
.pf-cus { color: var(--text); }
.pf-disc { color: var(--warning); font-size: 11.5px; }
.pf-expired { color: var(--danger); font-size: 11px; font-weight: 700; }
.pf-expsoon { color: var(--warning); font-size: 11px; }
.pf-reason { font-size: 11.5px; color: var(--muted); }
.pf-f { display: flex; flex-direction: column; gap: 5px; font-size: 12px; }
.pf-f > span { color: var(--muted); font-size: 11.5px; }
.pf-f select, .pf-f input, .pf-f textarea { padding: 8px 11px; border-radius: 9px;
  border: 1px solid var(--border); background: var(--surface-2); color: var(--text);
  font-family: inherit; font-size: 12.5px; }
.pf-trow { display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 6px 0; font-size: 12.5px; }
.pf-trow.grand { border-top: 1px solid var(--border); margin-top: 4px; padding-top: 9px;
  font-size: 13.5px; color: var(--primary); }
.pf-tot { margin-top: 10px; }

/* فهرست پیش‌فاکتورها / ایستگاه بارگیری */
.pfl-page { display: flex; flex-direction: column; gap: 10px; }
.pfl-bar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 4px; }
.pfl-chip { --c: #8a8f98; display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px;
  border-radius: 999px; cursor: pointer; font-family: inherit; font-size: 12px;
  border: 1px solid var(--border); background: var(--surface-2); color: var(--muted); }
.pfl-chip i { font-style: normal; padding: 0 6px; border-radius: 999px;
  background: var(--surface); font-size: 10.5px; }
.pfl-chip:hover { color: var(--text); }
.pfl-chip.on { border-color: var(--c); color: var(--c); font-weight: 700;
  background: color-mix(in srgb, var(--c) 10%, transparent); }
.pfl-search { padding: 7px 12px; border-radius: 9px; border: 1px solid var(--border);
  background: var(--surface-2); color: var(--text); font-family: inherit; font-size: 12px; min-width: 200px; }
.pfl-row { cursor: pointer; }
.pfl-row:hover { background: var(--surface-2); }
.pfl-tbl td { vertical-align: middle; }

/* ── ایستگاه وایندر (بخش‌های تازه) ───────────────────────────────────────── */
.wd-waitbox { padding: 11px 13px; border-radius: 11px; border: 1px dashed rgba(217,119,6,.45);
  background: rgba(217,119,6,.06); }
.wd-waitl { font-size: 12px; color: var(--warning); }
.wd-defbox { padding: 11px 13px; border-radius: 11px; border: 1px solid var(--border);
  background: var(--surface-2); }
.wd-defl { font-size: 11.5px; color: var(--muted); margin-bottom: 7px; }
.wd-defects, .wd-deftags { display: flex; gap: 7px; flex-wrap: wrap; }
.wd-deftag { padding: 4px 10px; border-radius: 999px; cursor: pointer; font-family: inherit;
  font-size: 11.5px; border: 1px solid var(--border); background: var(--surface); color: var(--muted); }
.wd-deftag.on { border-color: var(--danger); color: var(--danger); font-weight: 700;
  background: rgba(193,39,45,.08); }
.wd-steplbl { font-size: 10.5px; color: var(--muted); }
.wd-cons { display: flex; flex-direction: column; gap: 6px; }
.wd-consl { font-size: 11.5px; color: var(--muted); }
.wd-consa { font-size: 12.5px; font-weight: 700; }

/* ── چاپ لیبل ────────────────────────────────────────────────────────────── */
.lbp-card { padding: 14px 16px; border-radius: 12px; border: 1px solid var(--border); background: var(--surface); }
.lbp-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 9px; }
.lbp-input { flex: 1; min-width: 160px; padding: 9px 12px; border-radius: 9px;
  border: 1px solid var(--border); background: var(--surface-2); color: var(--text);
  font-family: inherit; font-size: 13px; }
.lbp-btn { flex: none; }
.lbp-hint { font-size: 11.5px; color: var(--muted); line-height: 1.8; }
.lbp-info { font-size: 12px; line-height: 1.9; }
.lbp-ok { color: var(--success); font-weight: 700; }
.lbp-err { color: var(--danger); font-weight: 700; }

/* ── جدول‌های کوچکِ مشترک ────────────────────────────────────────────────── */
.pt-wrap, .pt-box { padding: 12px 14px; border-radius: 12px; border: 1px solid var(--border); background: var(--surface); }
.pt-bh { display: flex; align-items: center; gap: 9px; font-size: 12.5px; font-weight: 700; margin-bottom: 8px; }
.pt-t { font-size: 12.5px; font-weight: 700; }
.pt-hint { font-size: 11px; color: var(--muted); }
.pt-scroll { overflow-x: auto; }
.pt-block { display: flex; flex-direction: column; gap: 7px; }
.pt-rolls { display: flex; gap: 5px; flex-wrap: wrap; }
.pt-cell, .pt-c0, .pt-cb, .pt-ct, .pt-ro { padding: 4px 8px; border-radius: 7px;
  border: 1px solid var(--border); background: var(--surface-2); font-size: 11px; }
.pt-c0 { opacity: .5; }
.pt-cb { border-color: var(--primary); color: var(--primary); }
.pt-ct { border-color: var(--success); color: var(--success); }
.pt-ro { border-style: dashed; }
.pt-tag { padding: 2px 8px; border-radius: 999px; background: var(--surface-2);
  border: 1px solid var(--border); font-size: 10.5px; color: var(--muted); }
.pt-save { margin-top: 9px; }

/* ── داشبورد کیفیت/تولید (qcb) ───────────────────────────────────────────── */
.qcb-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.qcb-col { display: flex; flex-direction: column; gap: 9px; min-width: 0; }
.qcb-camp { padding: 12px 14px; border-radius: 12px; border: 1px solid var(--border); background: var(--surface); }
.qcb-camp-t { font-size: 13px; font-weight: 700; }
.qcb-camp-b { font-size: 11.5px; color: var(--muted); margin-top: 4px; }
.qcb-btns { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.qcb-empty { padding: 24px; text-align: center; color: var(--muted); font-size: 12.5px;
  border-radius: 12px; border: 1px dashed var(--border); }
.qcb-roll { display: flex; align-items: center; gap: 9px; padding: 8px 11px; border-radius: 9px;
  border: 1px solid var(--border); background: var(--surface-2); font-size: 12px; }
.qcb-no { font-weight: 700; }
.qcb-cons, .qcb-consin { font-size: 11.5px; color: var(--muted); }
.qcb-sup, .qcb-supsel { font-size: 11.5px; }
.qcb-skip { color: var(--warning); }
.qcb-new { color: var(--primary); }

/* ── متفرقه‌ی صفحه‌ها ────────────────────────────────────────────────────── */
.inv-page { display: flex; flex-direction: column; gap: 12px; }
.inv-detail { display: flex; gap: 9px; flex-wrap: wrap; }
.sv-box { display: flex; flex-direction: column; gap: 6px; align-items: center; }
.sv-cell { display: grid; place-items: center; border-radius: 9px; border: 1px solid var(--border);
  background: var(--surface-2); }
.sv-img { max-width: 100%; border-radius: 9px; }
.sv-ini { font-size: 15px; font-weight: 800; color: var(--muted); }
.sv-n { font-size: 11.5px; }
.sv-p { font-size: 11px; color: var(--muted); }
.sv-none { color: var(--muted); font-size: 11.5px; }
.sv-solo { margin: 0 auto; }
.ac-wrap { position: relative; }
.ac-box { position: absolute; z-index: 40; inset-inline: 0; top: calc(100% + 4px); max-height: 240px;
  overflow-y: auto; border-radius: 10px; border: 1px solid var(--border);
  background: var(--surface); box-shadow: 0 8px 24px rgba(0,0,0,.18); }
.ac-row { padding: 8px 12px; cursor: pointer; font-size: 12.5px; }
.ac-row:hover, .ac-row.on { background: var(--surface-2); color: var(--primary); }
.fe-opts { display: flex; gap: 7px; flex-wrap: wrap; }
.fe-opt { padding: 5px 11px; border-radius: 999px; cursor: pointer; font-family: inherit;
  font-size: 11.5px; border: 1px solid var(--border); background: var(--surface-2); color: var(--muted); }
.fe-opt.on { border-color: var(--primary); color: var(--primary); font-weight: 700; }
.fe-body { display: flex; flex-direction: column; gap: 10px; }
.ph-row { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }
.ph-btns { display: flex; gap: 7px; }
.ph-prev { max-width: 120px; border-radius: 9px; border: 1px solid var(--border); }
.ph-hint { font-size: 11px; color: var(--muted); }
.bell-h { padding: 10px 13px; font-size: 12.5px; font-weight: 700; border-bottom: 1px solid var(--border); }
.bell-row { display: flex; gap: 8px; padding: 9px 13px; border-bottom: 1px solid var(--border);
  cursor: pointer; font-size: 12px; }
.bell-row:hover { background: var(--surface-2); }
.bell-row:last-child { border-bottom: none; }
.bell-empty { padding: 18px 13px; text-align: center; color: var(--muted); font-size: 12px; }
.qc-explain { display: flex; flex-direction: column; gap: 8px; }
.qc-x-body { display: flex; flex-direction: column; gap: 7px; }
.t-cons { font-size: 11.5px; color: var(--muted); }
.live-t { font-size: 11.5px; color: var(--success); }

/* ── باسکول، تخلیه و رول متفرقه ──────────────────────────────────────────── */
.ld-net { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 9px 12px;
  border-radius: 9px; background: var(--surface-2); border: 1px solid var(--border); font-size: 12.5px; }
.ld-photo { display: grid; place-items: center; min-width: 110px; min-height: 78px; padding: 6px;
  border-radius: 10px; border: 1px dashed var(--border); background: var(--surface-2); }
.ld-photo img { max-width: 220px; max-height: 150px; border-radius: 8px; }
.ld-undo { display: inline-flex; align-items: center; gap: 5px; padding: 4px 10px; cursor: pointer;
  border-radius: 8px; border: 1px solid var(--border); background: var(--surface);
  color: var(--muted); font-family: inherit; font-size: 11.5px; }
.ld-undo:hover { color: var(--danger); border-color: var(--danger); }
.ld-force { display: inline-flex; align-items: center; gap: 5px; margin-inline-start: 8px;
  padding: 4px 11px; cursor: pointer; border-radius: 8px; font-family: inherit; font-size: 11.5px;
  border: 1px solid var(--warning); background: rgba(217,119,6,.1); color: var(--warning); font-weight: 700; }
.ld-warnbox { display: flex; align-items: flex-start; gap: 9px; padding: 11px 13px; border-radius: 10px;
  background: rgba(217,119,6,.09); border: 1px solid rgba(217,119,6,.45); font-size: 12.5px; line-height: 1.8; }
.ld-warnbox svg { flex: none; margin-top: 2px; color: var(--warning); }
.ld-warnbox b { color: var(--warning); }

/* ═══════════════════════════════════════════════════════════════════════════
   نسخه‌ی موبایل — ایستگاه بارگیری روی گوشیِ انباردار
   جدول‌ها به کارت تبدیل می‌شوند، دکمه‌ها بزرگ و انگشتی، نوار اسکن چسبانِ بالا.
   ═══════════════════════════════════════════════════════════════════════════ */
@media (max-width: 720px) {
  .ld-page, .pfl-page { gap: 10px; }
  .pfl-bar { gap: 6px; overflow-x: auto; flex-wrap: nowrap; padding-bottom: 4px;
    scrollbar-width: none; -webkit-overflow-scrolling: touch; }
  .pfl-bar::-webkit-scrollbar { display: none; }
  .pfl-chip { flex: none; padding: 9px 14px; font-size: 13px; }
  .pfl-search { min-width: 140px; }

  .lo-card { padding: 12px; border-radius: 12px; margin-bottom: 10px; }
  .lo-head { gap: 7px; }
  .lo-no { font-size: 16px; }
  .lo-cust { width: 100%; font-size: 12.5px; }
  .lo-date { font-size: 11px; }
  .lo-nums { gap: 9px; font-size: 12.5px; }
  .lo-nums .ps-spacer { display: none; }
  .lo-pct { margin-inline-start: auto; }

  /* جدول ردیف‌های سفارش → کارت‌های عمودی */
  .lo-tbl, .lo-tbl thead, .lo-tbl tbody, .lo-tbl tr, .lo-tbl td { display: block; width: 100%; }
  .lo-tbl thead { display: none; }
  .lo-tbl tr { padding: 10px; margin-bottom: 8px; border-radius: 10px;
    border: 1px solid var(--border); background: var(--surface-2); }
  .lo-tbl td { display: flex; align-items: center; justify-content: space-between; gap: 10px;
    padding: 4px 0; border: none; font-size: 12.5px; }
  .lo-tbl td::before { content: attr(data-l); color: var(--muted); font-size: 11.5px; flex: none; }
  .lo-tbl td:first-child { justify-content: flex-start; font-weight: 700; padding-bottom: 7px;
    margin-bottom: 4px; border-bottom: 1px solid var(--border); }

  /* جدول رول‌های کاندید → کارت‌های انگشتی با دکمه‌ی بزرگ */
  .ld-tbl, .ld-tbl thead, .ld-tbl tbody, .ld-tbl tr, .ld-tbl td { display: block; width: 100%; }
  .ld-tbl thead { display: none; }
  .ld-tbl tr { padding: 11px 12px; margin-bottom: 9px; border-radius: 11px;
    border: 1px solid var(--border); background: var(--surface); }
  .ld-tbl td { display: flex; align-items: center; justify-content: space-between; gap: 10px;
    padding: 3px 0; border: none; font-size: 12.5px; }
  .ld-tbl td::before { content: attr(data-l); color: var(--muted); font-size: 11.5px; }
  .ld-tbl td:first-child { font-size: 16px; font-weight: 800; letter-spacing: .5px; }
  .ld-tbl td:last-child { margin-top: 8px; }
  .ld-tbl td:last-child::before { content: none; }
  .ld-tbl td:last-child .btn { width: 100%; justify-content: center; padding: 12px; font-size: 14px; }

  /* نوار اسکن: چسبان و درشت */
  .ld-scanbar { position: sticky; top: 4px; z-index: 20; padding: 10px 12px;
    box-shadow: 0 4px 14px rgba(0,0,0,.12); background: var(--surface); }
  .ld-scan { font-size: 16px; }               /* ۱۶px تا iOS خودش زوم نکند */
  .ld-scanbar .btn { padding: 10px 14px; }

  .ld-acts { flex-direction: column; }
  .ld-acts .btn { width: 100%; justify-content: center; padding: 13px; font-size: 14px; }
  .ld-lr { flex-wrap: wrap; }
  .ld-undo { padding: 8px 14px; font-size: 12.5px; }
  .ld-apps { flex-direction: column; }
  .ld-app { padding: 14px; font-size: 15px; }
  .ld-rollhead b { font-size: 20px; }
  .ld-photo img { max-width: 100%; }

  /* پنجره‌ها تمام‌عرض و اسکرول‌شونده */
  .modal { width: 100%; max-width: 100%; max-height: 92vh; border-radius: 14px 14px 0 0; }
  .modal-overlay { align-items: flex-end; padding: 0; }
  .pff-modal { gap: 12px; }
  .form-grid { grid-template-columns: 1fr; }
  .modal input, .modal select, .modal textarea { font-size: 16px; padding: 12px; }
  .modal .btn { padding: 13px 16px; font-size: 14px; }

  .page-head h2 { font-size: 16px; }
  .ld-sect { font-size: 13px; }
}

/* گوشی‌های خیلی باریک */
@media (max-width: 380px) {
  .lo-card { padding: 10px; }
  .ld-tbl td:first-child { font-size: 15px; }
}

/* ── کروکی کارخانه (بالای نقشه انبار) ───────────────────────────────────── */
.smap-plan { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 14px 16px 10px; margin-bottom: 14px; box-shadow: var(--shadow); }
.smap-plan-svg { width: 100%; max-width: 780px; height: auto; display: block; margin: 0 auto; }
.smap-pn { stroke: var(--muted); stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; }
.smap-pnt { font-size: 10px; fill: var(--muted); }
.smap-pz { cursor: pointer; outline: none; }
.smap-pz-bg { fill: var(--surface-2); stroke: none; }
.smap-pz-ring { fill: none; stroke: var(--border); stroke-width: 1; }
.smap-pz-fill { opacity: .85; }
.smap-pz.ind .smap-pz-fill { fill: color-mix(in srgb, #1D9E75 32%, transparent); }
.smap-pz.out .smap-pz-fill { fill: color-mix(in srgb, #D85A30 32%, transparent); }
.smap-pz.tmp .smap-pz-fill { fill: color-mix(in srgb, #EF9F27 36%, transparent); }
.smap-pz.ind .smap-pz-ring { stroke: #0F6E56; }
.smap-pz.out .smap-pz-ring { stroke: #993C1D; }
.smap-pz.tmp .smap-pz-ring { stroke: #854F0B; }
.smap-pz-code { font-size: 12px; font-weight: 700; fill: var(--text); }
.smap-pz-n { font-size: 11px; fill: var(--muted); }
.smap-pz:hover .smap-pz-ring, .smap-pz:focus-visible .smap-pz-ring { stroke-width: 2.5; }
.smap-pz:hover .smap-pz-bg { fill: var(--surface); }
.smap-unplaced { display: flex; flex-wrap: wrap; gap: 7px; align-items: center; font-size: 12px; color: var(--muted);
  border-top: 1px solid var(--border); margin-top: 10px; padding-top: 9px; }
.smap-unplaced code { background: var(--surface-2); border: 1px solid var(--border); border-radius: 5px; padding: 2px 7px; direction: ltr; }
.smap-zone.flash { animation: smapFlash 1.1s ease-out; }
@keyframes smapFlash {
  0%   { box-shadow: 0 0 0 0 color-mix(in srgb, var(--primary) 55%, transparent); }
  100% { box-shadow: 0 0 0 14px transparent; }
}

/* ستون گرید بدون minmax(0,…) به اندازه‌ی محتوای خودش پهن می‌شود و صفحه را
   می‌کشد؛ ایستگاه وایندر دقیقاً همین مشکل را داشت. */
.wd-board > *, .wd-cur, .wd-card { min-width: 0; }
.wd-cur { overflow-x: auto; }
.wd-grid { min-width: 0; }
.wd-strip { flex-wrap: wrap; }

/* ═══════════════════════════════════════════════════════════════════
   استایل اصلیِ صفحه‌ها، بازیابی‌شده از تراکنشِ جلسه‌های قبل.
   این بخش عمداً آخر فایل است تا روی بازسازی‌های تقریبی بنشیند.
   ═══════════════════════════════════════════════════════════════════ */
.qc-x-head { font-size: 12.5px; color: var(--muted); margin-bottom: 12px; line-height: 1.7; }
.qc-x-head b { color: var(--text); }
.qc-x-note { padding: 8px 12px; border-radius: 8px; font-size: 12.5px; font-weight: 600; margin-bottom: 8px; }
.qc-x-note.missing { background: rgba(217,119,6,0.12); color: var(--warning); border: 1px solid rgba(217,119,6,0.32); }
.qc-x-note.fail { background: rgba(220,38,38,0.10); color: var(--danger); border: 1px solid rgba(220,38,38,0.32); }
.qc-x-list { display: flex; flex-direction: column; gap: 2px; margin-top: 6px; }
.qc-x-row { display: flex; gap: 10px; align-items: flex-start; padding: 8px 10px; border-radius: 8px; }
.qc-x-row.ok { opacity: 0.6; }
.qc-x-row.fail { background: rgba(220,38,38,0.06); }
.qc-x-row.missing { background: rgba(217,119,6,0.07); }
.qc-x-ic { width: 20px; height: 20px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 800; flex: none; color: #fff; }
.qc-x-row.ok .qc-x-ic { background: var(--success); }
.qc-x-row.fail .qc-x-ic { background: var(--danger); }
.qc-x-row.missing .qc-x-ic { background: var(--warning); }
.qc-x-label { font-weight: 700; font-size: 13px; }
.qc-x-detail { font-size: 12px; color: var(--muted); margin-top: 2px; }
.inv-total { color: var(--muted); font-size: 13px; margin-bottom: 14px; }
.inv-total b { color: var(--text); }
.inv-types { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.inv-chip { cursor: pointer; border: 1px solid var(--border); border-radius: 11px; padding: 8px 12px; background: var(--surface); display: flex; flex-direction: column; gap: 3px; min-width: 92px; transition: border-color .15s, box-shadow .15s; }
.inv-chip:hover { border-color: var(--c); }
.inv-chip.active { border-color: var(--c); box-shadow: 0 0 0 1.5px var(--c) inset; }
.inv-cn { font-weight: 700; font-size: 13px; display: flex; align-items: center; gap: 6px; }
.inv-cdot { width: 11px; height: 11px; border-radius: 50%; border: 2px solid var(--c); box-sizing: border-box; flex: none; display: inline-block; }
.inv-cm { font-size: 11px; color: var(--muted); }
.inv-stackhead { font-weight: 700; font-size: 14px; margin-bottom: 12px; }
.inv-stack { display: flex; flex-wrap: wrap; gap: 15px 12px; align-content: flex-start; min-height: 60px; }
.inv-pyramid { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.inv-prow { display: flex; gap: 2px; }
.inv-roll { width: 12px; height: 12px; border-radius: 50%; border: 2px solid var(--c); position: relative; box-sizing: border-box; animation: invpop .3s cubic-bezier(.34,1.56,.64,1) both; }
.inv-roll::after { content: ""; position: absolute; inset: 2.5px; border-radius: 50%; background: var(--c); }
.inv-note { margin: 12px 0 22px; font-size: 11px; color: var(--muted); }
.inv-dethead { font-weight: 700; font-size: 14px; margin-bottom: 10px; }
.inv-drow { display: grid; grid-template-columns: 165px 1fr auto; gap: 10px; align-items: center; padding: 6px 0; font-size: 12px; border-bottom: 1px solid var(--border); }
.inv-dspec { white-space: nowrap; display: flex; align-items: center; gap: 6px; }
.inv-dbar { height: 9px; background: var(--border); border-radius: 5px; overflow: hidden; }
.inv-dbar > i { display: block; height: 100%; background: var(--c); border-radius: 5px; transform-origin: right; animation: invgrow .5s ease both; }
.inv-dn { color: var(--muted); white-space: nowrap; text-align: left; }
.inv-dn b { color: var(--text); }
.inv-filter { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 16px; }
.inv-filter-lbl { font-size: 12px; color: var(--muted); font-weight: 600; }
.inv-fchip { cursor: pointer; border: 1px solid var(--border); background: var(--surface); color: var(--text); border-radius: 20px; padding: 5px 14px; font-family: inherit; font-size: 12px; font-weight: 600; transition: all .15s; }
.inv-fchip:hover { border-color: var(--primary); }
.inv-fchip.on { background: var(--primary); color: #fff; border-color: var(--primary); }
.qc-fill { background: rgba(217,119,6,0.07); border: 1px solid rgba(217,119,6,0.28); border-radius: 10px; padding: 12px; margin: 6px 0 14px; }
.qc-fill-head { font-size: 12.5px; font-weight: 700; color: var(--warning); margin-bottom: 10px; }
.qc-fill-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.qc-fill-field { display: flex; flex-direction: column; gap: 4px; font-size: 12px; font-weight: 600; color: var(--muted); }
.qc-fill-field input, .qc-fill-field select { padding: 7px 9px; border: 1px solid var(--border); border-radius: 7px; font-family: inherit; font-size: 13px; background: var(--surface); color: var(--text); }
.qc-fill-foot { margin-top: 12px; }
.qc-x-listhead { font-size: 12px; font-weight: 700; color: var(--muted); margin: 14px 0 6px; }
.pl-page { display: flex; flex-direction: column; gap: 14px; }
.pl-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 10px 12px; background: var(--surface, #fff); border: 1px solid var(--border, #e3e6ea); border-radius: 10px; }
.pl-spacer { flex: 1 1 auto; }
.pl-tabs, .pl-pills, .pl-acts { display: flex; gap: 6px; flex-wrap: wrap; }
.pl-tab, .pl-pill { padding: 6px 12px; border-radius: 8px; cursor: pointer; font-size: 13px; border: 1px solid var(--border, #e3e6ea); background: transparent; color: inherit; }
.pl-tab.on { background: var(--primary, #c1272d); border-color: var(--primary, #c1272d); color: #fff; }
.pl-pill.on { background: color-mix(in srgb, var(--primary, #c1272d) 14%, transparent); border-color: var(--primary, #c1272d); }
.pl-cycleinfo { font-size: 13px; opacity: .85; }
.pl-pub { color: #2e7d32; font-weight: 600; }
.pl-nocycle { color: var(--danger, #c62828); }
.pl-sect-h { font-size: 14px; font-weight: 600; margin-top: 4px; display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; }
.pl-note { font-size: 12px; font-weight: 400; opacity: .7; }
.pl-dist { display: flex; flex-direction: column; gap: 4px; }
.pl-drow { display: grid; grid-template-columns: 130px 1fr 120px 130px 78px; gap: 8px; align-items: center; padding: 4px 6px; border-radius: 6px; font-size: 12px; }
.pl-drow.top { background: color-mix(in srgb, var(--c) 7%, transparent); }
.pl-dname { display: flex; align-items: center; gap: 6px; }
.pl-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--c); flex: none; }
.pl-dbar { height: 10px; background: color-mix(in srgb, var(--c) 12%, transparent); border-radius: 5px; overflow: hidden; }
.pl-dbar i { display: block; height: 100%; background: var(--c); border-radius: 5px; }
.pl-dval { text-align: left; opacity: .9; }
.pl-dw { display: flex; gap: 3px; flex-wrap: wrap; }
.pl-dw span { font-size: 11px; padding: 1px 5px; border-radius: 4px; border: 1px solid var(--border, #e3e6ea); opacity: .8; }
.pl-drate { font-size: 11.5px; opacity: .65; text-align: left; }
.pl-dfoot { font-size: 12px; opacity: .7; padding: 6px 6px 0; }
.pl-tl { border: 1px solid var(--border, #e3e6ea); border-radius: 10px; padding: 10px; background: var(--surface, #fff); }
.pl-track-h { font-size: 12px; opacity: .8; margin-bottom: 4px; display: flex; gap: 8px; align-items: baseline; }
.pl-track-h.pl-sysh { margin: 4px 0 0; }
.pl-hint { font-size: 11px; opacity: .55; }
.pl-track { display: flex; gap: 2px; min-height: 54px; align-items: stretch; background: repeating-linear-gradient(to left, transparent 0, transparent calc(100% / 14 - 1px), color-mix(in srgb, currentColor 10%, transparent) calc(100% / 14 - 1px), color-mix(in srgb, currentColor 10%, transparent) calc(100% / 14)); border-radius: 6px; padding: 3px; }
.pl-track.pl-sys { opacity: .82; }
.pl-blk { --c: #8a8f98; position: relative; overflow: hidden; border-radius: 5px; padding: 4px 5px; background: color-mix(in srgb, var(--c) 22%, transparent); border: 1px solid var(--c); display: flex; flex-direction: column; justify-content: center; gap: 1px; min-width: 0; }
.pl-blk.nb { border-left-width: 4px; }
.pl-blk.ed { cursor: grab; }
.pl-blk.ed:hover { background: color-mix(in srgb, var(--c) 34%, transparent); }
.pl-blk.drag { opacity: .4; }
.pl-blk.over { outline: 2px dashed var(--primary, #c1272d); outline-offset: -2px; }
.pl-sys .pl-blk { cursor: copy; }
.pl-blk-t, .pl-blk-g, .pl-blk-n { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pl-blk-t { font-size: 13px; font-weight: 700; letter-spacing: .04em; }
.pl-blk-g { font-size: 10.5px; opacity: .8; }
.pl-blk-n { font-size: 10.5px; opacity: .95; }
.pl-empty-track { flex: 1; display: flex; align-items: center; justify-content: center; font-size: 12px; opacity: .55; }
.pl-axis { display: flex; direction: ltr; margin: 3px 0; padding: 0 3px; border-top: 1px solid color-mix(in srgb, currentColor 35%, transparent); }
.pl-day { flex: 1 1 0; min-width: 0; text-align: center; padding: 3px 1px; border-radius: 5px; background: color-mix(in srgb, currentColor 6%, transparent); font-size: 10.5px; }
.pl-day.buf { background: color-mix(in srgb, var(--warning, #f0a020) 16%, transparent); }
.pl-day b { display: block; font-size: 11px; }
.pl-day span { opacity: .6; font-size: 9.5px; }
.pl-sum { display: flex; gap: 10px; flex-wrap: wrap; }
.pl-card { flex: 1 1 150px; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--border, #e3e6ea); background: var(--surface, #fff); }
.pl-card span { display: block; font-size: 12px; opacity: .7; margin-bottom: 4px; }
.pl-card b { font-size: 17px; }
.pl-card.warn { border-color: var(--danger, #c62828); }
.pl-card.warn b { color: var(--danger, #c62828); }
.pl-card.muted { opacity: .7; }
.pl-tl { border: 1px solid var(--border, #e3e6ea); border-radius: 10px; padding: 10px; background: var(--surface, #fff); direction: ltr; }
.pl-tl .pl-panel-h, .pl-tl .pl-tick b, .pl-tl .pl-empty-track { direction: rtl; }
.pl-panel { border: 1px solid var(--border, #e3e6ea); border-radius: 10px; padding: 8px; background: var(--surface-2, #f8fafc); }
.pl-panel-sys { background: transparent; border-style: dashed; }
.pl-panel-h { font-size: 12px; display: flex; gap: 10px; align-items: center; margin-bottom: 6px; flex-wrap: wrap; }
.pl-panel-h.pl-sysh { margin: 6px 0 0; }
.pl-panel-t { font-weight: 700; }
.pl-tools { display: flex; gap: 5px; align-items: center; }
.pl-tbtn { display: inline-flex; align-items: center; gap: 5px; padding: 4px 7px; border-radius: 7px; cursor: pointer; border: 1px solid var(--border, #e3e6ea); background: var(--surface, #fff); color: inherit; font-family: inherit; font-size: 12px; }
.pl-tbtn:hover { background: var(--surface-2, #eef1f5); }
.pl-tbtn.pl-add { border-color: var(--primary, #c1272d); color: var(--primary, #c1272d); font-weight: 600; }
.pl-tbtn.dirty { border-color: var(--danger, #c62828); box-shadow: 0 0 0 2px color-mix(in srgb, var(--danger, #c62828) 18%, transparent); }
.pl-blk.resizing { cursor: ew-resize; box-shadow: 0 0 0 2px var(--primary, #c1272d); }
.pl-x { position: absolute; top: 1px; right: 2px; width: 15px; height: 15px; line-height: 13px; text-align: center; border: 0; border-radius: 4px; background: transparent; color: inherit; opacity: 0; cursor: pointer; font-size: 14px; font-family: inherit; padding: 0; }
.pl-blk.ed:hover .pl-x { opacity: .55; }
.pl-x:hover { opacity: 1 !important; background: var(--danger, #c62828); color: #fff; }
.pl-grip { position: absolute; top: 0; bottom: 0; right: 0; width: 7px; cursor: ew-resize; touch-action: none; background: linear-gradient(to right, transparent, color-mix(in srgb, var(--c) 55%, transparent)); opacity: 0; }
.pl-blk.ed:hover .pl-grip, .pl-blk.resizing .pl-grip { opacity: 1; }
.pl-tick { flex: 1 1 0; min-width: 0; text-align: center; position: relative; padding-top: 5px; font-size: 10px; }
.pl-tick i { position: absolute; top: 0; left: 0; width: 1px; height: 5px; background: color-mix(in srgb, currentColor 35%, transparent); }
.pl-tick b { display: block; font-weight: 500; opacity: .65; font-size: 9.5px; }
.pl-tick.buf b { color: var(--warning, #d97706); opacity: .95; }
.pl-tick.buf i { background: var(--warning, #d97706); }
.pl-dwrap { display: grid; grid-template-columns: 232px 1fr; gap: 20px; align-items: center; padding: 6px 4px 10px; }
.pl-dchart { position: relative; width: 232px; height: 232px; }
.pl-donut { width: 100%; height: 100%; overflow: visible; }
.pl-dtrack { stroke: color-mix(in srgb, currentColor 8%, transparent); }
.pl-darc { transition: opacity .18s, stroke-width .18s; cursor: pointer; }
.pl-darc:hover { stroke-width: 30; }
.pl-darc.dim { opacity: .2; }
.pl-dctr { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; pointer-events: none; text-align: center; gap: 1px; }
.pl-dctr b { font-size: 27px; line-height: 1.15; font-weight: 700; letter-spacing: -.01em; }
.pl-dctr span { font-size: 11.5px; opacity: .75; max-width: 132px; line-height: 1.35; }
.pl-dctr i { font-size: 10.5px; opacity: .5; font-style: normal; }
.pl-legend { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.pl-lrow { display: grid; grid-template-columns: 40px minmax(96px, 1.1fr) minmax(60px, 1fr) 44px 66px 58px 52px; gap: 8px; align-items: center; padding: 5px 7px; border-radius: 8px; font-size: 12px; transition: background .15s; }
.pl-lrow:hover, .pl-lrow.on { background: color-mix(in srgb, var(--c) 12%, transparent); }
.pl-lchip { display: inline-flex; align-items: center; justify-content: center; height: 20px; border-radius: 5px; background: var(--c); color: #fff; font-size: 10.5px; font-weight: 700; letter-spacing: .04em; }
.pl-lname { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pl-lname b { font-weight: 700; }
.pl-lbar { height: 6px; border-radius: 3px; background: color-mix(in srgb, currentColor 9%, transparent); overflow: hidden; }
.pl-lbar i { display: block; height: 100%; background: var(--c); border-radius: 3px; }
.pl-lshare { font-weight: 700; text-align: left; }
.pl-lh { opacity: .8; text-align: left; }
.pl-lt { opacity: .55; text-align: left; }
.pl-lalloc { text-align: left; font-weight: 600; color: var(--primary, #c1272d); }
.pl-tab.off { opacity: .38; cursor: not-allowed; filter: grayscale(1); }
.pl-cycacts { display: inline-flex; gap: 4px; margin-inline-start: 8px; vertical-align: middle; }
.pl-tbtn.pl-danger { color: var(--danger, #c62828); }
.pl-tbtn.pl-danger:hover { background: color-mix(in srgb, var(--danger, #c62828) 12%, transparent); }
.pl-planbar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 4px 0 10px; padding: 8px 10px; border: 1px solid var(--border, #e3e6ea); border-radius: 10px; background: var(--surface-2, #f8fafc); }
.pl-plabel { font-size: 12px; opacity: .7; }
.pl-select { min-width: 260px; max-width: 420px; padding: 6px 9px; border-radius: 8px; font-family: inherit; font-size: 13px; border: 1px solid var(--border, #e3e6ea); background: var(--surface, #fff); color: inherit; }
.pl-plinfo { font-size: 12px; opacity: .65; margin-inline-start: auto; }
.q-wrap { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 14px; align-items: start; }
.q-cards { display: flex; flex-direction: column; gap: 7px; min-height: 60px; }
.q-sum { margin-inline-start: auto; font-size: 12px; opacity: .7; }
.q-card { position: relative; display: grid; grid-template-columns: 38px 1fr auto; gap: 10px; align-items: center; padding: 9px 11px; border-radius: 10px; cursor: grab; background: var(--surface, #fff); border: 1px solid var(--border, #e3e6ea); border-inline-start: 4px solid var(--c); transition: box-shadow .15s, transform .1s; }
.q-card:hover { box-shadow: 0 2px 8px rgba(0,0,0,.07); }
.q-card.drag { opacity: .45; }
.q-card.over { box-shadow: 0 0 0 2px var(--primary, #c1272d); transform: translateY(1px); }
.q-card.act { cursor: default; background: color-mix(in srgb, var(--success, #16a34a) 8%, var(--surface, #fff)); border-color: color-mix(in srgb, var(--success, #16a34a) 40%, transparent); }
.q-rank { width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; font-weight: 700; font-size: 13px; background: color-mix(in srgb, var(--c) 16%, transparent); color: var(--c); }
.q-card.act .q-rank { background: color-mix(in srgb, var(--success, #16a34a) 18%, transparent); color: var(--success, #16a34a); }
.q-t { font-size: 13px; display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.q-abbr { display: inline-flex; align-items: center; justify-content: center; height: 19px; padding: 0 6px; border-radius: 5px; background: var(--c); color: #fff; font-size: 10.5px; font-weight: 700; letter-spacing: .04em; }
.q-m { font-size: 11.5px; opacity: .7; margin-top: 2px; }
.q-n { font-size: 11px; opacity: .5; margin-top: 2px; }
.q-st { font-size: 11.5px; opacity: .65; white-space: nowrap; }
.q-card.act .q-st { color: var(--success, #16a34a); font-weight: 600; opacity: 1; }
.q-card .pl-x { top: 4px; left: 4px; right: auto; }
.q-plans { display: flex; flex-direction: column; gap: 8px; }
.q-plan { border: 1px solid var(--border, #e3e6ea); border-radius: 10px; padding: 9px 11px; background: var(--surface, #fff); }
.q-plan-h { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; font-size: 13px; }
.q-plan-h span { font-size: 11px; opacity: .6; white-space: nowrap; }
.q-plan-m { font-size: 11.5px; opacity: .7; margin-top: 3px; }
.q-plan-n { font-size: 11px; opacity: .5; margin-top: 2px; }
.q-plan-a { display: flex; gap: 5px; margin-top: 8px; flex-wrap: wrap; }
.bell-wrap { position: relative; display: inline-flex; }
.bell-btn { display: grid; place-items: center; }
.bell-btn.ring { color: var(--warning, #d97706); animation: bell-ring 2.4s ease-in-out infinite; }
.bell-badge { position: absolute; top: 1px; inset-inline-end: 1px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 999px; background: var(--warning, #d97706); color: #fff; font-size: 10px; font-weight: 700; display: grid; place-items: center; pointer-events: none; }
.bell-badge.crit { background: var(--danger, #dc2626); }
.bell-pop { position: absolute; top: 38px; inset-inline-end: 0; width: 320px; z-index: 60; background: var(--surface, #fff); border: 1px solid var(--border, #e5e8ef); border-radius: 12px; box-shadow: 0 8px 24px rgba(16,24,40,.14); overflow: hidden; }
.bell-h { padding: 9px 12px; font-size: 12.5px; font-weight: 700; border-bottom: 1px solid var(--border, #e5e8ef); }
.bell-empty { padding: 14px 12px; font-size: 12.5px; opacity: .65; }
.bell-row { padding: 10px 12px; cursor: pointer; border-inline-start: 3px solid var(--warning, #d97706); }
.bell-row.critical { border-inline-start-color: var(--danger, #dc2626); }
.bell-row:hover { background: var(--surface-2, #f8fafc); }
.bell-row b { display: block; font-size: 12.5px; font-weight: 600; }
.bell-row span { font-size: 11px; opacity: .6; }
.q-proj { border: 1px solid var(--border, #e3e6ea); border-radius: 12px; padding: 12px 14px 8px; background: var(--surface, #fff); margin-bottom: 14px; }
.q-proj-h { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 10px; }
.q-proj-t { display: flex; align-items: center; gap: 7px; font-weight: 700; font-size: 13.5px; }
.q-proj-k { font-size: 13px; padding: 3px 10px; border-radius: 999px; background: color-mix(in srgb, var(--success, #16a34a) 12%, transparent); color: var(--success, #16a34a); font-weight: 600; }
.q-proj-k.warn { background: color-mix(in srgb, var(--warning, #d97706) 14%, transparent); color: var(--warning, #d97706); }
.q-proj-k.bad { background: color-mix(in srgb, var(--danger, #dc2626) 12%, transparent); color: var(--danger, #dc2626); }
.q-proj-c { margin-inline-start: auto; font-size: 11.5px; opacity: .6; }
.q-proj-bar { display: flex; direction: ltr; height: 30px; border-radius: 7px; overflow: hidden; background: color-mix(in srgb, currentColor 6%, transparent); }
.q-seg { position: relative; background: var(--c); display: grid; place-items: center; min-width: 2px; border-inline-end: 1px solid var(--surface, #fff); }
.q-seg span { font-size: 10px; font-weight: 700; color: #fff; letter-spacing: .03em; }
.q-seg.act { background: repeating-linear-gradient(45deg, var(--c), var(--c) 6px, color-mix(in srgb, var(--c) 70%, #fff) 6px, color-mix(in srgb, var(--c) 70%, #fff) 12px); }
.q-seg.free { cursor: copy; }
.q-proj-axis { position: relative; height: 26px; direction: ltr; margin-top: 3px; border-top: 1px solid color-mix(in srgb, currentColor 25%, transparent); }
.q-ptick { position: absolute; top: 0; transform: translateX(-50%); text-align: center; width: 56px; }
.q-ptick i { display: block; width: 1px; height: 5px; margin: 0 auto 2px; background: color-mix(in srgb, currentColor 35%, transparent); }
.q-ptick b { display: block; font-size: 9.5px; font-weight: 500; opacity: .65; white-space: nowrap; line-height: 1.3; }
.q-ptick.now b { color: var(--primary, #c1272d); opacity: 1; font-weight: 700; }
.q-pcap { position: absolute; top: -33px; width: 2px; height: 36px; background: var(--danger, #dc2626); opacity: .5; }
.q-proj-alert { display: flex; align-items: center; gap: 8px; margin-top: 8px; padding: 8px 10px; border-radius: 8px; font-size: 12.5px; background: color-mix(in srgb, var(--danger, #dc2626) 9%, transparent); color: var(--danger, #dc2626); }
.cd-alerts { display: flex; flex-direction: column; gap: 8px; margin-bottom: 16px; }
.cd-alert { display: flex; align-items: center; gap: 11px; padding: 12px 14px; border-radius: 10px; background: color-mix(in srgb, var(--warning, #d97706) 10%, transparent); color: var(--warning, #d97706); }
.cd-alert.critical { background: color-mix(in srgb, var(--danger, #dc2626) 10%, transparent); color: var(--danger, #dc2626); }
.cd-alert.ok { background: color-mix(in srgb, var(--success, #16a34a) 9%, transparent); color: var(--success, #16a34a); }
.cd-alert b { font-size: 13px; }
.cd-alert-s { font-size: 11.5px; opacity: .75; }
.cd-alert .btn { margin-inline-start: auto; }
.cd-empty { text-align: center; padding: 48px 20px; border: 1px dashed var(--border, #e3e6ea); border-radius: 12px; }
.cd-empty-i { opacity: .28; margin-bottom: 8px; }
.cd-empty h3 { margin: 0 0 8px; font-size: 15px; }
.cd-empty p { margin: 0 auto 6px; max-width: 520px; font-size: 13px; opacity: .7; }
.cd-note { font-size: 12.5px; opacity: .7; margin: 0 0 14px; }
.cd-sect { font-size: 13px; font-weight: 700; margin: 18px 0 8px; }
.ceo-card { border: 1px solid var(--border, #e3e6ea); border-radius: 10px; padding: 11px 13px; margin-bottom: 8px; background: var(--surface, #fff); border-inline-start: 4px solid var(--border-strong, #cbd5e1); }
.ceo-card.pend { border-inline-start-color: var(--warning, #d97706); }
.ceo-card.approved { border-inline-start-color: var(--success, #16a34a); }
.ceo-card.rejected { border-inline-start-color: var(--danger, #dc2626); }
.ceo-h { display: flex; align-items: baseline; gap: 9px; flex-wrap: wrap; }
.ceo-h b { font-size: 13px; font-weight: 600; }
.ceo-badge { background: color-mix(in srgb, var(--danger, #dc2626) 12%, transparent); color: var(--danger, #dc2626); font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 999px; white-space: nowrap; }
.ceo-line { margin-inline-start: auto; font-size: 11.5px; opacity: .6; }
.ceo-m { font-size: 11.5px; opacity: .65; margin-top: 6px; }
.ceo-r { font-size: 12px; margin-top: 5px; padding: 5px 8px; border-radius: 6px; background: var(--surface-2, #f8fafc); }
.ceo-d { font-size: 12px; margin-top: 6px; opacity: .8; }
.ceo-a { display: flex; gap: 7px; margin-top: 9px; align-items: center; }
.ceo-note { flex: 1; padding: 6px 9px; border-radius: 8px; font-family: inherit; font-size: 12.5px; border: 1px solid var(--border, #e3e6ea); background: var(--surface, #fff); color: inherit; }
.bell-row.approval { border-inline-start-color: var(--primary, #c1272d); }
.pl-panel-h .pl-select { max-width: 340px; }
.pl-vsep { width: 1px; height: 18px; background: var(--border, #e3e6ea); margin: 0 3px; }
.pl-tbtn.off { opacity: .4; cursor: not-allowed; }
.pl-tbtn.off:hover { background: var(--surface, #fff); }
.pl-calc { display: flex; flex-direction: column; gap: 3px; margin-top: 2px; }
.pl-crow { font-size: 12.5px; opacity: .75; padding: 4px 9px; border-radius: 6px; background: var(--surface-2, #f8fafc); }
.pl-crow.em { opacity: 1; font-weight: 600; color: var(--primary, #c1272d); background: color-mix(in srgb, var(--primary, #c1272d) 8%, transparent); }
.pl-crow.bad { color: var(--danger, #dc2626); opacity: 1; background: color-mix(in srgb, var(--danger, #dc2626) 9%, transparent); }
.q-ptick.first { transform: none; text-align: left; }
.q-ptick.last { transform: translateX(-100%); text-align: right; }
.q-ptick.first i { margin-inline-start: 0; }
.q-ptick.last i { margin-inline-end: 0; margin-inline-start: auto; }
.q-ptick u { display: block; font-size: 9px; text-decoration: none; opacity: .45; white-space: nowrap; line-height: 1.3; }
.q-ptick.now u { color: var(--primary, #c1272d); opacity: .7; }
.q-proj-bar.resizing .q-seg { transition: none; }
.q-seg[draggable="true"] { cursor: grab; }
.q-seg.drag { opacity: .45; }
.q-seg.over { filter: brightness(1.25); box-shadow: inset 3px 0 0 #fff; }
.q-seg.resizing { filter: brightness(1.15); }
.q-seg.lock { box-shadow: inset 0 0 0 2px var(--warning, #d97706); }
.q-seg-x { position: absolute; top: 1px; inset-inline-end: 2px; width: 15px; height: 15px; line-height: 13px; }
.cd-empty-i { opacity: .28; margin-bottom: 8px; }
.q-seg:hover .q-seg-x { opacity: .8; }
.q-seg-x:hover { opacity: 1; background: var(--danger, #dc2626); }
.q-seg-grip { position: absolute; top: 0; bottom: 0; inset-inline-end: 0; width: 7px; cursor: ew-resize; touch-action: none; background: linear-gradient(to left, rgba(255,255,255,.55), transparent); opacity: 0; transition: opacity .15s; }
.q-seg:hover .q-seg-grip, .q-seg.resizing .q-seg-grip { opacity: 1; }
.q-seg.free:hover { background: color-mix(in srgb, currentColor 8%, transparent); }
.q-card.locked { border-style: dashed; border-color: var(--warning, #d97706); cursor: default; }
.qcb-camp { display: flex; align-items: center; gap: 10px; padding: 8px 11px; margin: 6px 0 10px; border-radius: 9px; background: color-mix(in srgb, var(--c) 10%, transparent); border-inline-start: 4px solid var(--c); }
.qcb-camp-b { display: inline-flex; align-items: center; justify-content: center; min-width: 34px; height: 24px; border-radius: 6px; background: var(--c); color: #fff; font-size: 11px; font-weight: 700; letter-spacing: .04em; }
.qcb-camp-t { display: flex; flex-direction: column; line-height: 1.35; min-width: 0; }
.qcb-camp-t b { font-size: 11.5px; opacity: .7; font-weight: 600; }
.qcb-camp-t span { font-size: 12.5px; }
.qcb-skip { margin-inline-start: auto; color: var(--warning, #d97706); border-color: var(--warning, #d97706); }
.cd-seen { margin-inline-start: 10px; font-weight: 500; }
.nt-feed { display: flex; flex-direction: column; gap: 8px; }
.nt-row { padding: 10px 12px; border-radius: 10px; background: var(--surface, #fff); border: 1px solid var(--border, #e3e6ea); border-inline-start: 4px solid var(--border-strong, #cbd5e1); }
.nt-row.fresh { border-inline-start-color: var(--primary, #c1272d); box-shadow: 0 1px 6px -3px color-mix(in srgb, var(--primary, #c1272d) 55%, transparent); }
.nt-row.k-skip { border-inline-start-color: var(--warning, #d97706); }
.nt-row.k-remove, .nt-row.k-cancel { border-inline-start-color: var(--danger, #dc2626); }
.nt-row.k-add, .nt-row.k-resume { border-inline-start-color: var(--success, #16a34a); }
.nt-k { font-size: 10.5px; font-weight: 700; letter-spacing: .02em; padding: 2px 9px; border-radius: 999px; background: color-mix(in srgb, var(--text, #1e293b) 8%, transparent); opacity: .75; }
.nt-b { font-size: 12.5px; font-weight: 600; line-height: 1.95; }
.nt-b b { font-weight: 600; }
.nt-b span { font-size: 11.5px; opacity: .65; }
.nt-w { font-size: 10.5px; opacity: .5; white-space: nowrap; margin-inline-start: auto; }
.qcb-cons b { font-size: 18px; }
.wd-waitbox { display: inline-flex; align-items: center; gap: 6px; }
.wd-waitl { font-size: 11.5px; color: var(--muted); }
.cd-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; align-items: start; }
.cd-col { min-width: 0; }
.cd-colh { display: flex; align-items: center; gap: 8px; padding: 9px 12px; border-radius: 10px; margin-bottom: 10px; font-size: 13.5px; }
.cd-colh.act { background: color-mix(in srgb, var(--warning) 13%, transparent); color: var(--warning); }
.cd-colh.info { background: color-mix(in srgb, var(--primary) 10%, transparent); color: var(--primary); }
.cd-colh b { font-weight: 700; }
.cd-cnt { background: color-mix(in srgb, currentColor 20%, transparent); border-radius: 999px; padding: 1px 9px; font-size: 12px; font-weight: 700; }
.cd-cnt.fresh { background: var(--danger); color: #fff; }
} 844 .cd-sect { font-size: 13px; font-weight: 700; margin: 18px 0 8px; }
868 869 /* ردیف ابزار داخل باکس تایم‌لاین */ 870 .pl-panel-h .pl-select { max-width: 340px; }
.ceo-badge.lock { background: color-mix(in srgb, var(--warning, #d97706) 14%, transparent); color: var(--warning, #d97706); }
.ceo-r.lock { border-inline-start: 3px solid var(--warning, #d97706); border-radius: 0 6px 6px 0; }
.ceo-why { font-size: 12.5px; line-height: 1.75; margin-top: 6px; padding: 7px 10px; border-radius: 7px; background: color-mix(in srgb, var(--warning, #d97706) 9%, transparent); border-inline-start: 3px solid var(--warning, #d97706); }
.ceo-brief { font-size: 13px; font-weight: 600; line-height: 1.8; margin-top: 7px; }
.ceo-pvbar { margin-top: 10px; }
.pv-open { gap: 6px; }
.pv-open.on { background: color-mix(in srgb, var(--primary, #c1272d) 12%, transparent); color: var(--primary, #c1272d); }
.pv-wrap:empty { display: none; }
.pv { margin-top: 9px; border: 1px solid var(--border, #e3e6ea); border-radius: 10px; padding: 10px 11px; background: var(--surface-2, #f8fafc); }
.pv-head { display: flex; align-items: center; gap: 9px; margin-bottom: 9px; }
.pv-state { font-size: 12px; font-weight: 700; padding: 3px 10px; border-radius: 999px; background: color-mix(in srgb, var(--text, #1e293b) 9%, transparent); transition: background .35s, color .35s; }
.pv-state.on { background: color-mix(in srgb, var(--success, #16a34a) 16%, transparent); color: var(--success, #16a34a); }
.pv-sw { font-size: 11.5px; opacity: .7; }
.pv-sw.bad { color: var(--danger, #dc2626); opacity: 1; font-weight: 700; }
.pv-play { font-size: 11.5px; gap: 5px; }
.pv-note { font-size: 11.5px; margin-bottom: 8px; padding: 5px 8px; border-radius: 6px; color: var(--warning, #d97706); background: color-mix(in srgb, var(--warning, #d97706) 10%, transparent); }
.pv-strip { display: flex; align-items: stretch; overflow: hidden; padding: 3px 0 6px; min-height: 62px; }
.pv-chip { --c: #8a8f98; position: relative; flex: 0 0 auto; width: 72px; box-sizing: border-box; margin-inline-end: 7px; padding: 5px 4px; border-radius: 8px; overflow: hidden; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; background: color-mix(in srgb, var(--c) 15%, var(--surface, #fff)); border: 1px solid color-mix(in srgb, var(--c) 45%, transparent); transition: transform .62s cubic-bezier(.34, .92, .28, 1), opacity .38s ease, width .5s cubic-bezier(.34, .92, .28, 1), margin .5s, padding .5s, border-width .5s, box-shadow .3s; }
.pv-chip .pv-no { font-size: 10px; font-weight: 700; opacity: .55; }
.pv-chip .pv-ab { font-size: 13px; font-weight: 800; color: color-mix(in srgb, var(--c) 78%, #000); letter-spacing: .3px; }
.pv-chip .pv-gm { font-size: 10.5px; opacity: .8; }
.pv-chip .pv-dy { font-size: 9.5px; opacity: .55; }
.pv-chip.act { box-shadow: inset 0 0 0 2px var(--success, #16a34a); }
.pv-chip.lock { box-shadow: inset 0 0 0 2px var(--warning, #d97706); }
.pv-chip.moved { box-shadow: 0 0 0 2px var(--primary, #c1272d), 0 4px 14px -4px var(--primary, #c1272d); }
.pv-chip.gone { width: 0; margin-inline-end: 0; padding-inline: 0; border-width: 0; opacity: 0; }
.pv-chip.swnew::before { content: '⚡'; position: absolute; inset-inline-start: -1px; top: -1px; font-size: 9px; line-height: 1; padding: 2px 3px; border-radius: 0 0 6px 0; background: var(--danger, #dc2626); color: #fff; }
.pv-moves { display: flex; flex-direction: column; gap: 3px; margin-top: 4px; }
.pv-mv { display: flex; align-items: center; gap: 7px; font-size: 12px; line-height: 1.7; }
.pv-dot { width: 7px; height: 7px; border-radius: 50%; flex: 0 0 auto; background: color-mix(in srgb, var(--text, #1e293b) 25%, transparent); }
.pv-mv.up .pv-dot { background: var(--success, #16a34a); }
.pv-mv.down .pv-dot { background: var(--warning, #d97706); }
.pv-mv.in .pv-dot { background: var(--primary, #c1272d); }
.pv-mv.out .pv-dot { background: var(--danger, #dc2626); }
.pv-lg { display: flex; align-items: center; gap: 13px; flex-wrap: wrap; margin-top: 9px; padding-top: 8px; border-top: 1px dashed var(--border, #e3e6ea); font-size: 10.5px; opacity: .7; }
.pv-lg span { display: inline-flex; align-items: center; gap: 4px; }
.pv-lgt { margin-inline-start: auto; }
.pv-k { width: 11px; height: 11px; border-radius: 3px; display: inline-block; border: 1px solid var(--border-strong, #cbd5e1); }
.pv-k.act { border-color: var(--success, #16a34a); box-shadow: inset 0 0 0 2px var(--success, #16a34a); }
.pv-k.lock { border-color: var(--warning, #d97706); box-shadow: inset 0 0 0 2px var(--warning, #d97706); }
.pv-k.swnew { background: var(--danger, #dc2626); border-color: var(--danger, #dc2626); }
757 758 /* فید اطلاع‌رسانی مدیرعامل */ 759 .cd-seen { margin-inline-start: 10px; font-weight: 500; }
773 774 /* تعامل روی نمودار پیش‌بینی: جابه‌جایی، کش‌دار کردن، حذف، افزودن */ 775 .q-proj-bar.resizing .q-seg { transition: none; }
829 830 /* ── داشبورد مدیرعامل ────────────────────────────────────── */ 831 .cd-note { font-size: 12.5px; opacity: .7; margin: 0 0 14px; }
832 /* داشبورد مدیرعامل: دو ستونِ «تصمیم» و «اطلاع‌رسانی» */ 833 .cd-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; align-items: start; }
.nt-row.k-add, .nt-row.k-resume, .nt-row.k-release { border-inline-start-color: var(--success, #16a34a); }
.nt-top { display: flex; align-items: center; gap: 7px; margin-bottom: 7px; }
.nt-new { font-size: 10px; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: var(--primary, #c1272d); color: #fff; }
.nt-why { font-size: 11.5px; line-height: 1.8; margin-top: 8px; padding: 6px 9px; border-radius: 7px; background: color-mix(in srgb, var(--danger, #dc2626) 8%, transparent); border-inline-start: 3px solid var(--danger, #dc2626); }
.nt-by { font-size: 10.5px; opacity: .5; margin-top: 7px; }
.ceo-done { display: flex; align-items: center; gap: 9px; padding: 7px 10px; margin-bottom: 4px; border-radius: 8px; font-size: 12px; background: var(--surface-2, #f8fafc); border-inline-start: 3px solid var(--border-strong, #cbd5e1); }
.ceo-done.approved { border-inline-start-color: var(--success, #16a34a); }
.ceo-done.rejected { border-inline-start-color: var(--danger, #dc2626); }
.ceo-done-k { font-size: 10.5px; font-weight: 700; opacity: .7; flex: 0 0 auto; min-width: 26px; }
.ceo-done-b { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; opacity: .85; }
.ceo-done-w { font-size: 10.5px; opacity: .45; white-space: nowrap; flex: 0 0 auto; }
.wd-lines { display: flex; gap: 6px; }
.wd-line.active { background: var(--primary); color: #fff; border-color: var(--primary); }
.wd-runbar { margin: 10px 0 14px; }
.wd-run { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 10px 14px; border: 1px solid var(--border); border-radius: 10px; background: var(--card); }
.wd-run-t { font-size: 12px; color: var(--muted); }
.wd-run-s { font-size: 13px; color: var(--muted); }
.wd-run-next { font-size: 12px; color: var(--muted); }
.wd-run-none { padding: 12px 14px; border: 1px dashed var(--border); border-radius: 10px; color: var(--muted); }
.wd-actions { display: flex; align-items: center; gap: 12px; }
.wd-new { font-size: 16px; padding: 12px 22px; }
.wd-board { display: grid; gap: 10px; }
.wd-card { border: 1px solid var(--border); border-radius: 10px; padding: 12px 14px; background: var(--card); }
.wd-card.st-stored { opacity: .62; }
.wd-c-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.wd-no { font-size: 17px; letter-spacing: .5px; }
.wd-c-meta { font-size: 13px; color: var(--muted); }
.wd-badge { font-size: 12px; padding: 3px 9px; border-radius: 20px; border: 1px solid var(--border); color: var(--muted); }
.wd-badge.ok { background: rgba(34,160,90,.13); border-color: rgba(34,160,90,.4); color: #1e8f52; }
.wd-c-info { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 7px; font-size: 13px; color: var(--muted); }
.wd-late { color: var(--danger); }
.wd-missing { margin-top: 8px; font-size: 13px; padding: 7px 10px; border-radius: 8px; background: rgba(200,140,20,.12); color: #a9740a; }
.wd-c-btns { display: flex; gap: 8px; margin-top: 10px; }
.wd-grid th, .wd-grid td { white-space: nowrap; font-size: 13px; }
.wd-grid .wd-no { font-size: 15px; letter-spacing: .4px; }
.wd-dim { color: var(--muted); opacity: .65; }
.wd-subrow td { background: transparent; border-top: 0; padding-top: 0; }
.wd-sub { display: flex; flex-direction: column; gap: 6px; padding: 2px 0 10px; }
.wd-chart { width: 100%; max-width: 520px; height: 90px; }
.wd-chart svg { width: 100%; height: 90px; overflow: visible; }
.wd-line { fill: none; stroke: var(--primary); stroke-width: 1.6; stroke-linejoin: round; }
.wd-dots circle { fill: var(--primary); }
.wd-nom { stroke: var(--muted); stroke-width: 1; stroke-dasharray: 4 3; opacity: .7; }
.wd-pstats { display: flex; gap: 12px; flex-wrap: wrap; font-size: 12px; color: var(--muted); }
.wd-pnums { font-size: 12px; color: var(--muted); direction: ltr; text-align: right; letter-spacing: .3px; }
.wd-hint { font-size: 13px; color: var(--danger); }
.wd-new:disabled { opacity: .5; cursor: not-allowed; }
.wd-row.st-cancelled { opacity: .5; text-decoration: line-through; }
.wd-live { font-size: 11px; padding: 3px 9px; border-radius: 20px; background: rgba(34,160,90,.14); color: #1e8f52; }
.wd-live.off { background: color-mix(in srgb, var(--muted) 14%, transparent); color: var(--muted); }
.wd-order { border: 1px solid var(--border); border-radius: 12px; padding: 14px 16px; background: var(--card); }
.wd-o-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.wd-o-tag { font-size: 11px; padding: 2px 8px; border-radius: 20px; background: var(--primary); color: #fff; }
.wd-o-title { font-size: 17px; }
.wd-o-spec, .wd-o-shift { font-size: 13px; color: var(--muted); }
.wd-bar { display: flex; height: 12px; border-radius: 20px; overflow: hidden; background: color-mix(in srgb, var(--muted) 18%, transparent); margin: 12px 0 10px; }
.wd-seg.ok { background: #22a05a; }
.wd-seg.pend { background: #d99320; }
.wd-seg.und { background: color-mix(in srgb, var(--muted) 55%, transparent); }
.wd-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 10px; }
.wd-stat { display: flex; flex-direction: column; gap: 2px; padding: 8px 10px; border-radius: 9px; background: color-mix(in srgb, var(--muted) 8%, transparent); border-inline-start: 3px solid transparent; }
.wd-stat.ok { border-inline-start-color: #22a05a; }
.wd-stat.pend { border-inline-start-color: #d99320; }
.wd-stat.und { border-inline-start-color: color-mix(in srgb, var(--muted) 55%, transparent); }
.wd-st-l { font-size: 11px; color: var(--muted); }
.wd-st-v { font-size: 17px; }
.wd-st-s { font-size: 11px; color: var(--muted); }
.wd-o-next { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--border); }
.wd-chip { font-size: 12px; padding: 3px 9px; border-radius: 20px; border: 1px solid var(--border); color: var(--muted); }
.wd-new.off { background: color-mix(in srgb, var(--muted) 25%, transparent); border-color: var(--border); color: var(--muted); box-shadow: none; }
.wd-cur { border: 1px solid var(--border); border-radius: 12px; padding: 14px 16px; background: var(--card); }
.wd-cur-empty { padding: 18px; text-align: center; color: var(--muted); }
.wd-cur-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.wd-cur-lbl { font-size: 11px; color: var(--muted); }
.wd-cur-no { font-size: 24px; letter-spacing: 1px; }
.wd-badge.pend { background: rgba(217,147,32,.14); border-color: rgba(217,147,32,.4); color: #a9740a; }
.wd-badge.und { background: color-mix(in srgb, var(--muted) 12%, transparent); }
.wd-ok-txt { color: #1e8f52; }
.wd-prog { display: flex; align-items: flex-start; margin: 14px 0; gap: 0; }
.wd-pstep { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 5px; position: relative; }
.wd-pstep::before { content: ''; position: absolute; top: 6px; inset-inline: 50% -50%; height: 2px; background: var(--border); }
.wd-pstep:last-child::before { display: none; }
.wd-pstep.done::before { background: #22a05a; }
.wd-pdot { width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--border); background: var(--card); z-index: 1; }
.wd-pstep.done .wd-pdot { background: #22a05a; border-color: #22a05a; }
.wd-pstep.now .wd-pdot { background: var(--primary); border-color: var(--primary); box-shadow: 0 0 0 4px color-mix(in srgb, var(--primary) 22%, transparent); }
.wd-plabel { font-size: 11px; color: var(--muted); text-align: center; }
.wd-pstep.now .wd-plabel { color: var(--text); }
.wd-prof { margin: 14px 0; }
.wd-prof-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 6px; font-size: 13px; }
.wd-strip { display: flex; gap: 2px; direction: rtl; }
.wd-cell { flex: 1; min-width: 26px; height: 46px; border-radius: 4px; display: grid; place-items: center; }
.wd-cell span { font-size: 11px; color: #fff; }
.wd-prof-foot { display: flex; margin-top: 4px; font-size: 11px; color: var(--muted); }
.wd-fgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 7px; margin: 14px 0 10px; }
.wd-fcell { padding: 7px 9px; border-radius: 8px; border: 1px dashed var(--border); display: flex; flex-direction: column; gap: 1px; }
.wd-fcell.filled { border-style: solid; background: color-mix(in srgb, var(--muted) 7%, transparent); }
.wd-fl { font-size: 11px; color: var(--muted); }
.wd-fv { font-size: 15px; }
.wd-fcell:not(.filled) .wd-fv { color: var(--muted); opacity: .5; }
.wd-fp { font-size: 10px; color: var(--muted); opacity: .7; }
.wd-shift { border: 1px solid var(--border); border-radius: 12px; padding: 12px 14px; background: var(--card); }
.wd-sh-head { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.pf-wrap { display: flex; flex-direction: column; gap: 10px; }
.pf-head { display: flex; align-items: center; gap: 10px; }
.pf-hint { font-size: 12px; color: var(--muted); }
.pf-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(76px, 1fr)); gap: 7px; }
.pf-cell { display: flex; flex-direction: column; gap: 3px; }
.pf-i { font-size: 11px; color: var(--muted); text-align: center; }
.pf-cell input { padding: 9px 6px; border: 2px solid var(--border); border-radius: 8px; font-family: inherit; font-size: 15px; text-align: center; background: var(--surface); color: var(--text); }
.pf-sum { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 9px; background: color-mix(in srgb, var(--muted) 9%, transparent); }
.pf-sum b { font-size: 20px; }
.btn.bell { position: relative; }
.bell-count { font-size: 12px; min-width: 20px; padding: 0 5px; border-radius: 20px; background: color-mix(in srgb, var(--muted) 22%, transparent); }
.btn.bell.ring { animation: bellPulse 1.8s ease-in-out infinite; }
.btn.bell.ring .bell-count { background: var(--danger); color: #fff; }
/* --- cross profile entry --- */ .pf-wrap { display: flex; flex-direction: column; gap: 10px; }
.qcb { display: grid; grid-template-columns: repeat(auto-fit, minmax(420px, 1fr)); gap: 14px; }
.qcb-col { border: 1px solid var(--border); border-radius: 12px; padding: 14px 16px; background: var(--card); }
.qcb-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding-bottom: 10px; border-bottom: 1px solid var(--border); }
.qcb-roll { display: flex; align-items: center; gap: 10px; margin: 12px 0 4px; }
.qcb-no { font-size: 22px; letter-spacing: 1px; }
.qcb-empty { padding: 22px; text-align: center; color: var(--muted); }
.qcb-new { width: 100%; font-size: 16px; padding: 14px; }
.qcb-btns { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--border); }
.qcb-btns .btn.off { background: color-mix(in srgb, var(--muted) 25%, transparent); border-color: var(--border); color: var(--muted); }
.wd-fcell.click { cursor: pointer; }
.wd-fcell.click:hover { border-color: var(--primary); }
.fe-body { padding: 4px 0; }
.fe-opts { display: grid; grid-template-columns: repeat(auto-fit, minmax(96px, 1fr)); gap: 8px; }
.fe-opt { padding: 14px 8px; font-size: 15px; }
.fe-opt.on { background: var(--primary); color: #fff; border-color: var(--primary); }
/* ── باکس ویژه‌ی عیوب + کانس (نمایشگر خط) ───────────────────────────────── */ .wd-defbox { margin-top: 10px; padding: 10px 12px; border-radius: 10px; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.wd-defbox.ok { background: color-mix(in srgb, var(--muted) 8%, transparent); color: var(--muted); }
.wd-defbox.bad { background: rgba(220,38,38,.09); border: 1px solid rgba(220,38,38,.32); }
.wd-defl { font-size: 12px; color: var(--muted); }
.wd-defbox.bad .wd-defl { color: var(--danger); font-weight: 700; }
.wd-deftags { display: flex; gap: 7px; flex-wrap: wrap; }
.wd-deftag { background: var(--danger); color: #fff; border-radius: 20px; padding: 3px 11px; font-size: 13px; font-weight: 700; }
.wd-cons { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 20px; background: color-mix(in srgb, var(--primary) 10%, transparent); border: 1px solid color-mix(in srgb, var(--primary) 28%, transparent); }
.wd-cons b { font-size: 17px; }
.wd-consl { font-size: 11px; color: var(--muted); }
.wd-consa { font-size: 11px; color: var(--muted); }
.wd-cons.stale { background: rgba(217,147,32,.12); border-color: rgba(217,147,32,.4); }
.wd-cons.none { background: none; border-style: dashed; color: var(--muted); font-size: 12px; }
.qcb-cons { display: flex; align-items: center; gap: 8px; margin: 10px 0; padding: 8px 12px; border-radius: 9px; background: color-mix(in srgb, var(--primary) 7%, transparent); border: 1px solid color-mix(in srgb, var(--primary) 20%, transparent); }
.qcb-consin { width: 110px; padding: 6px 9px; border: 1px solid var(--border); border-radius: 7px; font-family: inherit; font-size: 14px; background: var(--surface); color: var(--text); }
.wd-fcell.locked { opacity: .42; border-style: dotted; cursor: not-allowed; }
.lbp-card { max-width: 560px; border: 1px solid var(--border); border-radius: 12px; background: var(--card); padding: 18px; }
.lbp-hint { color: var(--muted); font-size: 13px; margin-bottom: 14px; }
.lbp-row { display: flex; gap: 8px; }
.lbp-input { flex: 1; padding: 12px 14px; border: 2px solid var(--border); border-radius: 9px; font-family: inherit; font-size: 18px; letter-spacing: 1px; background: var(--surface); color: var(--text); }
.lbp-input:focus { outline: none; border-color: var(--primary); }
.lbp-btn { padding: 12px 20px; font-size: 15px; }
.lbp-info { margin-top: 14px; }
.lbp-ok { display: flex; flex-direction: column; gap: 3px; padding: 12px; border-radius: 9px; background: rgba(34,160,90,.1); border: 1px solid rgba(34,160,90,.3); }
.lbp-ok b { font-size: 20px; letter-spacing: 1px; }
.lbp-err { padding: 12px; border-radius: 9px; background: rgba(220,38,38,.09); border: 1px solid rgba(220,38,38,.3); color: var(--danger); }
.pt-wrap { display: flex; flex-direction: column; gap: 14px; max-width: 100%; }
.pt-hint { font-size: 13px; color: var(--muted); line-height: 1.9; }
.pt-hint b { color: var(--text); }
.pt-ro { margin-top: 6px; padding: 7px 10px; border-radius: 8px; font-size: 12.5px; background: color-mix(in srgb, var(--muted) 10%, transparent); color: var(--muted); }
.pt-scroll { overflow-x: auto; }
.pt-table { border-collapse: separate; border-spacing: 0; font-size: 12.5px; width: 100%; }
.pt-table th, .pt-table td { border-bottom: 1px solid var(--border); padding: 0; }
.pt-corner { position: sticky; inset-inline-start: 0; z-index: 3; background: var(--card); min-width: 170px; text-align: start; padding: 10px 12px; font-size: 13px; }
.pt-ph { padding: 8px 10px; font-size: 12px; font-weight: 700; text-align: center; white-space: nowrap; border-inline-start: 1px solid var(--border); background: color-mix(in srgb, var(--muted) 7%, transparent); }
.pt-th { padding: 10px 4px; font-weight: 500; text-align: center; vertical-align: bottom; border-inline-start: 1px solid var(--border); }
.pt-th span { display: block; writing-mode: vertical-rl; transform: rotate(180deg); white-space: nowrap; margin: 0 auto; max-height: 130px; }
.pt-paper { position: sticky; inset-inline-start: 0; z-index: 2; background: var(--card); text-align: start; padding: 8px 12px; font-weight: 500; white-space: nowrap; }
.pt-paper b { font-weight: 600; }
.pt-rolls { display: block; font-size: 10.5px; color: var(--muted); font-weight: 400; }
.pt-cell { text-align: center; border-inline-start: 1px solid var(--border); padding: 0; }
.pt-cell.off { background: color-mix(in srgb, var(--muted) 8%, transparent); }
.pt-cb { width: 17px; height: 17px; cursor: pointer; accent-color: var(--primary); margin: 0; }
.pt-cb:disabled { cursor: not-allowed; opacity: .5; }
.pt-table tbody tr:hover .pt-cell { background: color-mix(in srgb, var(--primary) 5%, transparent); }
.pt-table tbody tr:hover .pt-cell.off { background: color-mix(in srgb, var(--muted) 13%, transparent); }
.pt-statecell { padding: 0 10px; white-space: nowrap; }
.pt-state { font-size: 11.5px; color: var(--muted); }
.pt-state.ok { color: var(--success, #16a34a); }
.pt-state.err { color: var(--danger, #dc2626); }
.wd-fcell.opt { border-style: dashed; opacity: .82; }
.wd-fcell.opt .wd-fp { color: var(--muted); font-style: italic; }
.pt-save { min-height: 18px; font-size: 12.5px; color: var(--muted); transition: color .2s; }
.pt-save.ok { color: var(--success, #16a34a); }
.pt-save.err { color: var(--danger, #dc2626); }
.pt-block { border: 1px solid var(--border); border-radius: 12px; background: var(--card); overflow: hidden; }
.pt-bh { display: flex; align-items: center; gap: 10px; padding: 10px 14px; font-size: 13px; border-bottom: 1px solid var(--border); background: color-mix(in srgb, var(--muted) 6%, transparent); }
.pt-bh span { color: var(--muted); font-size: 11.5px; }
.pt-t { width: 100%; table-layout: fixed; border-collapse: collapse; font-size: 12.5px; min-width: 460px; }
.pt-t th, .pt-t td { border-bottom: 1px solid var(--border); }
.pt-t tbody tr:last-child th, .pt-t tbody tr:last-child td { border-bottom: 0; }
.pt-c0 { width: 30%; min-width: 130px; text-align: start; padding: 9px 14px; font-weight: 500; line-height: 1.5; }
thead .pt-c0 { color: var(--muted); font-weight: 500; font-size: 11.5px; }
.pt-c0 b { font-weight: 600; }
.pt-ct { padding: 9px 4px; font-weight: 500; font-size: 11.5px; text-align: center; line-height: 1.45; color: var(--muted); border-inline-start: 1px solid var(--border); }
.pt-box { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 8px 2px; cursor: pointer; }
.pt-cb:disabled + .pt-tag { opacity: .5; }
.pt-tag { font-size: 10px; color: var(--muted); }
.pt-cell:not(.off) .pt-tag { color: var(--success, #16a34a); }
.pt-t tbody tr:hover .pt-cell:not(.off) { background: color-mix(in srgb, var(--primary) 5%, transparent); }
.pt-t tbody tr:hover .pt-cell.off { background: color-mix(in srgb, var(--muted) 12%, transparent); }
.pt-t tbody tr:hover .pt-c0 { background: color-mix(in srgb, var(--muted) 5%, transparent); }
.sv-img { border-radius: 50%; object-fit: cover; flex: none; border: 1px solid var(--border); background: var(--surface); }
.sv-ini { display: inline-grid; place-items: center; font-weight: 700; color: var(--muted); background: color-mix(in srgb, var(--muted) 14%, transparent); font-size: 15px; }
.sv-box { gap: 6px; }
.sv-row { display: flex; flex-wrap: wrap; gap: 10px; margin: 2px 0; }
.sv-p { display: flex; align-items: center; gap: 7px; max-width: 100%; }
.sv-p .sv-n { font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sv-p.now .sv-img { border: 2px solid var(--primary); }
.sv-p.now .sv-n { color: var(--primary); }
.sv-p:not(.now) { opacity: .72; }
.sv-none { color: var(--muted); font-size: 15px; }
.sv-cell { display: flex; align-items: center; gap: 9px; }
.ph-row { display: flex; align-items: center; gap: 14px; }
.ph-btns { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ph-hint { font-size: 11.5px; color: var(--muted); }
.qcb-sup { gap: 9px; }
.qcb-sup .sv-p { gap: 7px; }
.qcb-supsel { padding: 5px 9px; border: 1px solid var(--border); border-radius: 7px; background: var(--surface); color: var(--text); font-family: inherit; font-size: 12.5px; max-width: 190px; }
.sv-solo { margin: 2px 0; }
.sv-solo .sv-n { font-size: 15px; }
.wd-prof-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 6px; font-size: 13px; }
.smap-zone { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 15px 17px; margin-bottom: 14px; box-shadow: var(--shadow); }
.smap-head { display: flex; gap: 9px; align-items: center; flex-wrap: wrap; margin-bottom: 13px; }
.smap-head .spacer { flex: 1; }
.smap-grid { display: flex; flex-wrap: wrap; gap: 7px; }
.smap-bay { position: relative; width: 62px; height: 56px; padding: 0; overflow: hidden; cursor: pointer; border: 1px solid var(--border); border-radius: 9px; background: var(--surface-2); color: var(--text); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; transition: transform .09s, box-shadow .09s; }
.smap-bay.empty { border-style: dashed; }
.smap-bay.mixed { border-color: var(--warning); border-width: 2px; }
.smap-fill { position: absolute; inset-inline: 0; bottom: 0; pointer-events: none; }
.smap-code { position: relative; font-size: 11px; color: var(--muted); padding-top: 9px; }
.smap-n { position: relative; font-size: 19px; font-weight: 800; }
.smap-free td { background: color-mix(in srgb, var(--success) 10%, transparent); }
.smap-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(132px, 1fr)); gap: 10px; margin-bottom: 18px; }
.smap-tile { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 13px 15px; box-shadow: var(--shadow); }
.smap-tv { font-size: 22px; font-weight: 800; line-height: 1.15; }
.smap-tl { font-size: 12px; color: var(--muted); margin-top: 3px; }
.smap-th { font-size: 11px; color: var(--muted); opacity: .75; margin-top: 2px; }
.smap-tile.warn .smap-tv { color: var(--warning); }
.smap-tile.bad .smap-tv { color: var(--danger); }
.smap-tile.ok .smap-tv { color: var(--success); }
.smap-head strong { font-size: 15px; }
.smap-zcode { font-size: 11.5px; color: var(--muted); background: var(--surface-2); border: 1px solid var(--border); border-radius: 5px; padding: 2px 7px; direction: ltr; }
.smap-sum { font-size: 12.5px; color: var(--muted); }
.smap-dot { width: 9px; height: 9px; border-radius: 50%; flex: 0 0 auto; }
.smap-dot.ind { background: #1D9E75; }
.smap-dot.out { background: #D85A30; }
.smap-dot.tmp { background: #EF9F27; }
.smap-rows { display: flex; flex-direction: column; gap: 10px; }
.smap-row { display: flex; align-items: flex-start; gap: 10px; }
.smap-rlabel { flex: 0 0 auto; min-width: 62px; font-size: 11.5px; color: var(--muted); background: var(--surface-2); border: 1px solid var(--border); border-radius: 6px; padding: 4px 8px; direction: ltr; text-align: center; margin-top: 16px; }
.smap-norow { font-size: 13px; color: var(--muted); padding: 6px 2px; }
.smap-bay:hover { transform: translateY(-2px); box-shadow: 0 3px 10px rgba(16,24,40,.13); }
.smap-bay.locked::after { content: ''; position: absolute; top: 5px; inset-inline-end: 5px; width: 5px; height: 5px; border-radius: 50%; background: var(--primary); }
.smap-bay.ind .smap-fill { background: color-mix(in srgb, #1D9E75 26%, transparent); }
.smap-bay.out .smap-fill { background: color-mix(in srgb, #D85A30 26%, transparent); }
.smap-bay.tmp .smap-fill { background: color-mix(in srgb, #EF9F27 30%, transparent); }
.smap-no { position: relative; font-size: 11px; color: var(--muted); direction: ltr; }
.smap-c { position: relative; font-size: 17px; font-weight: 800; }
.smap-bay.empty .smap-c { color: var(--muted); opacity: .55; font-weight: 500; }
.smap-panel { display: flex; flex-direction: column; gap: 13px; }
.smap-pstats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 9px; }
.smap-pstats .smap-tile { padding: 10px 12px; box-shadow: none; }
.smap-pstats .smap-tv { font-size: 18px; }
.smap-lock { font-size: 12.5px; padding: 9px 12px; border-radius: 8px; background: color-mix(in srgb, var(--primary) 9%, transparent); border: 1px solid color-mix(in srgb, var(--primary) 26%, transparent); color: var(--primary); }
.smap-lock.off { background: var(--surface-2); border-color: var(--border); color: var(--muted); }
.smap-ask { font-size: 14px; line-height: 1.9; }
.smap-legend { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; padding: 10px 14px; margin-bottom: 14px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); font-size: 12px; color: var(--muted); }
.smap-legend span { display: inline-flex; align-items: center; gap: 6px; }
.smap-legend i { flex: 0 0 auto; }
.smap-key { width: 16px; height: 14px; border-radius: 4px; background: var(--surface-2); }
.smap-key.mixed { border: 2px solid var(--warning); }
.smap-key.locked { border: 1px solid var(--border); position: relative; }
.smap-key.locked::after { content: ''; position: absolute; top: 2px; inset-inline-end: 2px; width: 4px; height: 4px; border-radius: 50%; background: var(--primary); }
.smap-lhint { margin-inline-start: auto; opacity: .8; }
.smap-plan { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px 10px; margin-bottom: 14px; box-shadow: var(--shadow); }
.smap-plan-svg { width: 100%; height: auto; display: block; }
.smap-pn { stroke: var(--muted); stroke-width: 1.3; marker-end: none; }
.smap-pnt { font-size: 10px; fill: var(--muted); }
.smap-pz { cursor: pointer; outline: none; }
.smap-pz-bg { fill: var(--surface-2); stroke: none; }
.smap-pz-ring { fill: none; stroke: var(--border); stroke-width: 1; }
.smap-pz-fill { opacity: .85; }
.smap-pz.ind .smap-pz-fill { fill: color-mix(in srgb, #1D9E75 32%, transparent); }
.smap-pz.out .smap-pz-fill { fill: color-mix(in srgb, #D85A30 32%, transparent); }
.smap-pz.tmp .smap-pz-fill { fill: color-mix(in srgb, #EF9F27 36%, transparent); }
.smap-pz.ind .smap-pz-ring { stroke: #0F6E56; }
.smap-pz.out .smap-pz-ring { stroke: #993C1D; }
.smap-pz.tmp .smap-pz-ring { stroke: #854F0B; }
.smap-pz-code { font-size: 12px; font-weight: 700; fill: var(--text); }
.smap-pz-n { font-size: 11px; fill: var(--muted); }
.smap-pz:hover .smap-pz-ring, .smap-pz:focus-visible .smap-pz-ring { stroke-width: 2.5; }
.smap-pz:hover .smap-pz-bg { fill: var(--surface); }
.smap-unplaced { display: flex; flex-wrap: wrap; gap: 7px; align-items: center; font-size: 12px; color: var(--muted); border-top: 1px solid var(--border); margin-top: 10px; padding-top: 9px; }
.smap-unplaced code { background: var(--surface-2); border: 1px solid var(--border); border-radius: 5px; padding: 2px 7px; direction: ltr; }
.smap-zone.flash { animation: smapFlash 1.1s ease-out; }

@media (max-width: 900px) { .pl-drow { grid-template-columns: 120px 1fr 110px; } .pl-dw, .pl-drate { display: none; } }

@media (max-width: 900px) {
  .pl-dwrap { grid-template-columns: 1fr; justify-items: center; }
  .pl-lrow { grid-template-columns: 36px 1fr 42px 60px; }
  .pl-lbar, .pl-lt { display: none; }
}

@media (max-width: 900px) {
  .pl-dwrap { grid-template-columns: 1fr; justify-items: center; }
  .pl-lrow { grid-template-columns: 36px 1fr 42px 62px; }
  .pl-lbar, .pl-lt { display: none; }
}

@media (max-width: 950px) { .q-wrap { grid-template-columns: 1fr; } }

@media (max-width: 1000px) { .cd-cols { grid-template-columns: 1fr; } }

@media (prefers-reduced-motion: reduce) { .pv-chip { transition: none; } }

@media (prefers-color-scheme: dark) {
  .wd-badge.ok { color: #57d08a; }
  .wd-missing { color: #e0a944; }
}

@media (prefers-color-scheme: dark) { .wd-live { color: #57d08a; } }

@media (max-width: 900px) { .pt-tag { display: none; } .pt-ct { font-size: 11px; } }

@media (max-width: 640px) {
  .smap-pstats { grid-template-columns: repeat(2, 1fr); }
  .smap-row { flex-direction: column; gap: 6px; }
  .smap-rlabel { margin-top: 0; }
}

/* ═══════════════════════════════════════════════════════════════════════════
   اصلاحات نهایی — عمداً آخر فایل تا بر همه بچربد.
   ═══════════════════════════════════════════════════════════════════════════ */

/* ستون‌های گرید نباید بگذارند محتوای پهن صفحه را بکشد (بدون تغییر تعداد ستون‌ها) */
.wd-board > *, .wd-cur, .wd-card, .qcb > *, .qcb-col { min-width: 0; }
.wd-cur { overflow-x: auto; }

/* تایم‌لاین از چپ به راست خوانده می‌شود، هرچند صفحه راست‌چین است */
.pl-track, .pl-axis { direction: ltr; }
.pl-track { background: repeating-linear-gradient(to right, transparent 0,
  transparent calc(100% / 14 - 1px), color-mix(in srgb, currentColor 10%, transparent) calc(100% / 14 - 1px),
  color-mix(in srgb, currentColor 10%, transparent) calc(100% / 14)); }

/* مخفف کاغذ داخل کمپین‌های تایم‌لاین: دقیقاً مثل کارت‌های صف تولید */
.pl-blk-t {
  display: inline-flex; align-items: center; justify-content: center;
  align-self: flex-start; max-width: 100%; height: 17px; padding: 0 6px;
  border-radius: 5px; background: var(--c); color: #fff;
  font-size: 10.5px; font-weight: 700; letter-spacing: .04em;
}
.pl-blk-g, .pl-blk-n { font-size: 10.5px; line-height: 1.5; }

/* نشانِ کاغذ در فهرست توزیع فروش: نسخه‌ی قدیمی «نقطه‌ی ۱۱ پیکسلی» بود و روی
   نسخه‌ی حرف‌دار می‌نشست؛ حرف‌ها له می‌شدند. ستون گرید ۴۰ پیکسل است. */
.pl-lchip {
  width: auto; min-width: 34px; height: 20px;
  padding: 0 6px; border-radius: 5px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--c); color: #fff;
  font-size: 10.5px; font-weight: 700; letter-spacing: .04em;
}

/* کمپین‌های خیلی باریک (چند تن) جا برای حروف ندارند؛ چیپ باید جمع شود نه بشکند */
.pl-blk-t { min-width: 0; padding: 0 4px; }

/* نوار روزهای تایم‌لاین: فضای خالی بالا و پایینش بی‌خاصیت بود و دو نوار
   «برنامه‌ی ما» و «پیشنهاد سیستم» را بی‌دلیل از هم دور می‌کرد. */
.pl-tl { display: flex; flex-direction: column; gap: 4px; }
.pl-axis { margin: 0; padding: 0 11px; }
.pl-tick { padding-top: 0; line-height: 1.4; }

/* توزیع فروش: جعبه تمام عرض را می‌گرفت ولی محتوایش ۱۰۵ پیکسل عقب می‌ماند و
   در عوض ستون «ساعت» آن‌قدر باریک بود که عدد دو خطی می‌شد. */
.pl-dist { align-items: stretch; }
.pl-dwrap { width: 100%; }
.pl-lrow { grid-template-columns: 40px minmax(120px, 1.3fr) minmax(90px, 1fr) 48px 86px 76px 64px; }
.pl-lshare, .pl-lh, .pl-lt, .pl-lalloc { white-space: nowrap; }

/* نقطه‌ی پرتِ پروفایل عرضی — بیش از حد مجازِ دستورالعمل با اسمی فاصله دارد */
.pf-cell input.pf-off { border-color: var(--danger); background: rgba(193,39,45,.07);
  color: var(--danger); font-weight: 700; }

/* کمپین‌های خیلی باریک: به‌جای نمایشِ متنِ بریده، فقط نشان رنگی بماند */
.pl-blk { container-type: inline-size; }
@container (max-width: 46px) {
  .pl-blk-g, .pl-blk-w, .pl-blk-n { display: none; }
  .pl-blk-t { font-size: 9.5px; padding: 0 3px; }
}
/* آیکون خطیِ کنار عنوان «نمای کلی» در موجودی انبار */
.inv-cn { display: flex; align-items: center; gap: 6px; }

/* یکدست‌سازی: گردی کارت‌ها در کل سامانه ۱۲ پیکسل (کارت‌های کوچک ۱۰) */
.lo-card, .ld-card, .pl-side { border-radius: 12px; }

/* ── کارت پیش‌فاکتور (هم‌خانواده‌ی کارت سفارش، با رنگ سازمانی) ────────────── */
.pfc-card { border-inline-start: 3px solid var(--primary); }
.pfc-no { color: var(--primary); }
.pfc-prog { background: color-mix(in srgb, var(--success) 16%, var(--surface-2)); }
.pfc-prog .lo-prog-in { background: var(--success); }
.pfc-prog.low .lo-prog-in { background: var(--warning, #d97706); }
.pfc-left { font-size: 11.5px; color: var(--muted); margin: 5px 0 2px; }
.pfc-left.low { color: var(--warning, #d97706); font-weight: 600; }
.pfc-note { display: flex; align-items: center; gap: 7px; padding: 7px 10px; border-radius: 9px;
  font-size: 12.5px; margin: 2px 0 8px; line-height: 1.7; }
.pfc-note.ok { background: color-mix(in srgb, var(--success) 10%, transparent);
  color: var(--success); border: 1px solid color-mix(in srgb, var(--success) 30%, transparent); }
.pfc-note.bad { background: color-mix(in srgb, #8a5cf6 10%, transparent);
  color: #7c4ddb; border: 1px solid color-mix(in srgb, #8a5cf6 30%, transparent); }
.pfc-disc b { color: var(--primary); }
.pfc-foot { display: flex; justify-content: flex-end; margin-top: 10px; }
.pfc-open:hover { background: color-mix(in srgb, var(--primary) 8%, transparent); }
/* برچسب وضعیت و توضیحش هرگز به هم نچسبند */
.pf-badge { display: inline-block; }
.pf-reason { display: inline-block; margin-inline-start: 7px; }

/* راهنمای کمپین‌های صف زیر نمودار پیش‌بینی — مشخصات کاغذ و تناژ هر کمپین */
.q-proj-leg { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 6px 14px; margin-top: 14px; }
.q-leg { display: flex; align-items: center; gap: 8px; padding: 5px 8px; border-radius: 8px; cursor: pointer;
  border: 1px solid transparent; font-size: 12px; }
.q-leg:hover { background: color-mix(in srgb, var(--c) 8%, transparent); border-color: color-mix(in srgb, var(--c) 35%, transparent); }
.q-leg-b { display: inline-flex; align-items: center; justify-content: center; height: 19px; min-width: 30px; padding: 0 6px;
  border-radius: 5px; background: var(--c); color: #fff; font-size: 10.5px; font-weight: 700; letter-spacing: .04em; flex: none; }
.q-leg-t { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.q-leg-t b { font-weight: 600; }
.q-leg-s { color: var(--muted); }
.q-leg-n { font-weight: 700; white-space: nowrap; }
.q-leg-d { color: var(--muted); font-size: 11px; white-space: nowrap; margin-inline-start: auto; }
.q-leg-st { font-size: 10.5px; font-weight: 700; color: var(--success, #16a34a); white-space: nowrap; }
.q-leg-st.lock { color: var(--warning, #d97706); }
.q-leg.act { background: color-mix(in srgb, var(--success, #16a34a) 7%, transparent); }
/* برجسته‌شدن قطعه‌ی متناظر در نمودار */
.q-seg.hi { outline: 2px solid var(--text); outline-offset: -2px; z-index: 2; }
@media (max-width: 900px) { .q-proj-leg { grid-template-columns: 1fr; } .q-leg-d { display: none; } }
.pfc-note.off { background: color-mix(in srgb, var(--muted) 9%, transparent);
  color: var(--muted); border: 1px solid color-mix(in srgb, var(--muted) 25%, transparent); }
.pfc-card.is-off { opacity: .82; border-inline-start-color: var(--muted); }

/* ── نوار صفحه‌بندی ───────────────────────────────────────────────────────── */
.pgr { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin: 14px 0 6px; }
.pgr-info { font-size: 12px; color: var(--muted); }
.pgr-b { min-width: 32px; height: 30px; padding: 0 9px; border-radius: 8px; cursor: pointer;
  border: 1px solid var(--border); background: var(--surface); color: var(--text);
  font-family: inherit; font-size: 12.5px; }
.pgr-b:hover:not(:disabled) { border-color: var(--primary); color: var(--primary); }
.pgr-b.on { background: var(--primary); border-color: var(--primary); color: #fff; font-weight: 700; }
.pgr-b:disabled:not(.on) { opacity: .4; cursor: default; }
.pgr-b.on:disabled { opacity: 1; cursor: default; }
.pgr-gap { color: var(--muted); padding: 0 2px; }

/* ── پایش ثبت آزمایشگاه ──────────────────────────────────────────────────── */
.la-bar { display: flex; gap: 18px; flex-wrap: wrap; margin: 0 0 12px; }
.la-grp { display: flex; gap: 6px; }
.la-note { background: color-mix(in srgb, var(--primary) 7%, transparent);
  border: 1px solid color-mix(in srgb, var(--primary) 22%, transparent);
  border-radius: 10px; padding: 9px 12px; font-size: 12.5px; margin-bottom: 14px; }
.la-empty { border: 1px dashed var(--border); border-radius: 12px; padding: 26px; text-align: center; color: var(--muted); }
.la-empty b { display: block; color: var(--text); margin-bottom: 6px; font-size: 15px; }
.la-h { margin: 20px 0 6px; font-size: 14px; }
.la-h4 { margin: 14px 0 5px; font-size: 13px; }
.la-hint { font-size: 12px; color: var(--muted); margin-bottom: 8px; }
.la-bad { color: var(--danger); }

.la-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.la-tile { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 12px 14px; }
.la-tile.bad { border-color: var(--danger); background: color-mix(in srgb, var(--danger) 6%, var(--surface)); }
.la-tv { font-size: 22px; font-weight: 800; line-height: 1.3; }
.la-tile.bad .la-tv { color: var(--danger); }
.la-tl { font-size: 12.5px; color: var(--muted); }
.la-th { font-size: 11.5px; color: var(--muted); opacity: .8; margin-top: 2px; }

/* نشانه‌ها: وقتی عددشان صفر نیست باید از دورِ صفحه دیده شوند */
.la-sigs { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px; }
.la-sig { text-align: start; font-family: inherit; cursor: default; padding: 12px 14px; border-radius: 12px;
  border: 1px solid var(--border); background: var(--surface); color: var(--muted); }
.la-sig.on { cursor: pointer; border-color: var(--danger); color: var(--text);
  background: color-mix(in srgb, var(--danger) 8%, var(--surface));
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--danger) 12%, transparent); }
.la-sig.on:hover { background: color-mix(in srgb, var(--danger) 14%, var(--surface)); }
.la-sn { font-size: 26px; font-weight: 800; line-height: 1.2; }
.la-sig.on .la-sn { color: var(--danger); }
.la-sl { font-size: 13px; font-weight: 700; }
.la-sig.on .la-sl { color: var(--danger); }
.la-sd { font-size: 11.5px; color: var(--muted); margin-top: 3px; }

.la-hours { display: flex; align-items: flex-end; gap: 3px; height: 92px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 10px 12px 4px; }
.la-hcol { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px; height: 100%; }
.la-hbar { flex: 1; width: 100%; display: flex; align-items: flex-end; }
.la-hbar i { display: block; width: 100%; min-height: 2px; border-radius: 3px 3px 0 0; background: var(--primary); opacity: .75; }
.la-hx { font-size: 10px; color: var(--muted); }

.la-tw { overflow-x: auto; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); }
.la-t { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.la-t th, .la-t td { padding: 7px 10px; text-align: start; white-space: nowrap; }
.la-t thead th { background: color-mix(in srgb, var(--muted) 8%, transparent); color: var(--muted); font-weight: 700; font-size: 11.5px; }
.la-t tbody tr + tr td { border-top: 1px solid var(--border); }

.la-rolls { display: flex; flex-direction: column; gap: 8px; }
.la-roll { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 10px 12px; cursor: pointer; }
.la-roll:hover { border-color: var(--primary); }
.la-rhead { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.la-rno { font-size: 17px; font-weight: 800; letter-spacing: .5px; }
.la-rmeta { display: flex; gap: 10px; flex-wrap: wrap; font-size: 12px; color: var(--muted); }
.la-rb { display: flex; gap: 5px; flex-wrap: wrap; margin-inline-start: auto; }
.la-chip { font-size: 11.5px; font-weight: 700; padding: 2px 8px; border-radius: 999px; }
.la-chip.bad { background: color-mix(in srgb, var(--danger) 14%, transparent); color: var(--danger); }
.la-chip.warn { background: color-mix(in srgb, var(--warning) 16%, transparent); color: var(--warning); }
.la-steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-top: 8px; }
.la-step { display: flex; justify-content: space-between; align-items: baseline; gap: 6px;
  padding: 5px 9px; border-radius: 8px; font-size: 11.5px;
  background: color-mix(in srgb, var(--muted) 8%, transparent); color: var(--muted); }
.la-step.ok { background: color-mix(in srgb, #16a34a 12%, transparent); color: #15803d; }
.la-step.bad { background: color-mix(in srgb, var(--danger) 14%, transparent); color: var(--danger); font-weight: 700; }
.la-step.off { opacity: .55; }
.la-step b { font-weight: 700; }
.la-modal { display: flex; flex-direction: column; gap: 4px; }
.la-rsum { display: flex; gap: 12px; flex-wrap: wrap; font-size: 12.5px; color: var(--muted); margin-bottom: 6px; }
@media (max-width: 760px) { .la-steps { grid-template-columns: repeat(2, 1fr); } .la-rb { margin-inline-start: 0; } }

/* ══ نمایشگر خط وایندر ═══════════════════════════════════════════════════════
   تخته روی بومِ ثابت ۱۶۰۰×۹۰۰ چیده می‌شود و app.js آن را با یک مقیاس در قابِ
   موجود جا می‌دهد؛ این‌طور چیدمان روی تلویزیون خط و داخل صفحه‌ی سامانه یکی
   می‌ماند و هیچ‌جا اسکرول لازم نمی‌شود.
   ═══════════════════════════════════════════════════════════════════════════ */
.wb-stage { display: grid; place-items: center; overflow: hidden; width: 100%;
  aspect-ratio: 16 / 9; max-height: calc(100vh - 190px);
  background: #0d1420; border: 1px solid #223049; border-radius: 16px; }
.wb { width: 1600px; height: 900px; position: relative; overflow: hidden;
  display: flex; flex-direction: column; padding: 20px 22px; gap: 14px;
  background: radial-gradient(1100px 700px at 85% -10%, #1b2740 0%, transparent 62%), #0d1420;
  color: #e8eef7; line-height: 1.7; direction: rtl;
  --wb-line: #223049; --wb-panel: #16202f; --wb-sunk: #101a28; --wb-muted: #8ba0bd;
  --wb-ok: #22c55e; --wb-pend: #f59e0b; --wb-bad: #ef4444; --wb-brand: #e0353c; }
.wb .spacer { flex: 1; }
.wb .live-t { font-size: inherit; font-weight: inherit; color: inherit; }
.wb-idle { padding: 20px; text-align: center; color: var(--wb-muted); font-size: 17px; }
.wb-pl { font-size: 14px; color: var(--wb-muted); font-weight: 700; }

/* ── سربرگ ───────────────────────────────────────────────────────────────── */
.wb-head { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.wb-head-none { font-size: 19px; color: var(--wb-pend); }
.wb-tag { font-size: 14px; font-weight: 800; color: #fff; background: var(--wb-brand);
  padding: 2px 13px; border-radius: 999px; }
.wb-prod { font-size: 27px; font-weight: 800; }
.wb-spec { font-size: 19px; color: #b9c8dd; }
.wb-dot { width: 5px; height: 5px; border-radius: 50%; background: #3f5170; }
.wb-next { display: flex; align-items: center; gap: 9px; background: rgba(56,189,248,.10);
  border: 1px solid rgba(56,189,248,.32); border-radius: 11px; padding: 4px 14px; }
.wb-next i { font-style: normal; font-size: 13.5px; color: #7dd3fc; }
.wb-next b { font-size: 18px; font-weight: 800; }
.wb-next span { font-size: 15px; color: #b9c8dd; }
.wb-clock { font-size: 28px; font-weight: 800; letter-spacing: 1px; }

/* ── بدنه ────────────────────────────────────────────────────────────────── */
.wb-main { flex: 1; min-height: 0; display: grid; grid-template-columns: 1fr 342px; gap: 14px; }
.wb-hero, .wb-sv, .wb-prg { background: var(--wb-panel); border: 1px solid var(--wb-line);
  border-radius: 16px; padding: 14px 16px; }
.wb-hero { display: flex; flex-direction: column; gap: 10px; min-height: 0; }
.wb-hh { display: flex; align-items: center; gap: 14px; flex-shrink: 0; }
.wb-hl { font-size: 14px; color: var(--wb-muted); line-height: 1.3; }
.wb-no { font-size: 52px; font-weight: 800; letter-spacing: 2px; line-height: 1.05; }
.wb-badge { font-size: 18px; font-weight: 800; padding: 6px 18px; border-radius: 999px; white-space: nowrap; }
.wb-badge.ok { background: rgba(34,197,94,.15); color: #4ade80; border: 1px solid rgba(34,197,94,.45); }
.wb-badge.pend { background: rgba(245,158,11,.14); color: #fbbf24; border: 1px solid rgba(245,158,11,.45); }
.wb-badge.und { background: rgba(100,116,139,.18); color: #cbd5e1; border: 1px solid rgba(100,116,139,.45); }
.wb-badge.bad { background: rgba(239,68,68,.15); color: #f87171; border: 1px solid rgba(239,68,68,.5); }

/* کانس داخل همین باکس؛ شمارش تأخیر پس از سررسیدِ ۲ ساعته */
.wb-cons { display: flex; align-items: center; gap: 12px; background: var(--wb-sunk);
  border: 1px solid var(--wb-line); border-radius: 13px; padding: 6px 16px; }
.wb-cons.late { background: rgba(245,158,11,.09); border-color: rgba(245,158,11,.4); }
.wb-cl { font-size: 13.5px; color: var(--wb-muted); line-height: 1.3; display: block; }
.wb-cv { font-size: 30px; font-weight: 800; line-height: 1.1; }
.wb-cons.late .wb-cv { color: #fbbf24; }
.wb-cd { border-inline-start: 1px solid var(--wb-line); padding-inline-start: 12px; }
.wb-cd .live-t { font-size: 21px; font-weight: 800; letter-spacing: .5px; color: var(--wb-muted); }
.wb-cd .live-t.over { color: #fbbf24; }

/* مراحل رول */
.wb-steps { display: flex; flex-shrink: 0; }
.wb-step { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; position: relative; }
.wb-step::before { content: ''; position: absolute; top: 8px; inset-inline: 50% -50%; height: 3px; background: #22304a; }
.wb-step:last-child::before { display: none; }
.wb-step.done::before { background: var(--wb-ok); }
.wb-sdot { width: 19px; height: 19px; border-radius: 50%; background: #0d1420; border: 3px solid #2c3d59; z-index: 1; }
.wb-step.done .wb-sdot { background: var(--wb-ok); border-color: var(--wb-ok); }
.wb-step.now .wb-sdot { background: #fff; border-color: #fff; box-shadow: 0 0 0 7px rgba(255,255,255,.14); }
.wb-step span { font-size: 14px; color: var(--wb-muted); }
.wb-step.now span { color: #fff; font-weight: 800; }

/* پروفایل عرضی */
.wb-prof { flex-shrink: 0; }
.wb-prof-l { font-size: 15px; color: var(--wb-muted); font-weight: 700; margin-bottom: 2px; }
.wb-prof-c svg { width: 100%; height: 178px; display: block; }
.wb-prof-f { display: flex; font-size: 13px; color: var(--wb-muted); }
.wb-prof-wait { font-size: 17px; color: #fbbf24; background: rgba(245,158,11,.08);
  border: 1px dashed rgba(245,158,11,.4); border-radius: 11px; padding: 14px 16px; margin: 6px 0; }

/* شش عددِ کلیدی */
.wb-nums { flex: 1; min-height: 0; display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px; }
.wb-n { background: var(--wb-sunk); border: 1px solid var(--wb-line); border-radius: 14px;
  padding: 8px 12px 7px; display: flex; flex-direction: column; justify-content: space-between; }
.wb-nl { font-size: 15px; color: #9fb2cb; }
.wb-nv { font-size: 42px; font-weight: 800; line-height: 1.05; letter-spacing: .5px; }
.wb-nf { font-size: 12.5px; color: #64748b; }
.wb-n.wait { border-color: rgba(245,158,11,.45); background: rgba(245,158,11,.07); }
.wb-n.wait .wb-nv { color: #47576f; }
.wb-n.wait .wb-nf { color: #fbbf24; font-weight: 700; font-size: 14px; letter-spacing: .5px; }
.wb-n.soon .wb-nv { color: #3d4c63; }

/* عیوب */
.wb-defs { display: flex; align-items: center; gap: 14px; border-radius: 13px; padding: 6px 16px;
  flex-shrink: 0; background: rgba(34,197,94,.07); border: 1px solid rgba(34,197,94,.28); }
.wb-dl { font-size: 14.5px; color: var(--wb-muted); }
.wb-defs b { font-size: 19px; color: #4ade80; }
.wb-defs.bad { background: rgba(239,68,68,.08); border-color: rgba(239,68,68,.4); }
/* رول در حال تولید که همین حالا یک قانونِ کنترل کیفیت را رد کرده (failed از buildBoard):
   قاب و زمینه‌ی قرمز با ضربانِ آرام تا از دور دیده شود؛ با اصلاحِ عدد خودبه‌خود برمی‌دارد. */
.wb-hero.fail { border: 2px solid var(--wb-bad);
  background: linear-gradient(180deg, rgba(239,68,68,.17), rgba(239,68,68,.05) 55%, var(--wb-panel));
  animation: wbFailPulse 2.4s ease-in-out infinite; }
@keyframes wbFailPulse { 0%, 100% { box-shadow: 0 0 0 3px rgba(239,68,68,.10); } 50% { box-shadow: 0 0 0 11px rgba(239,68,68,.24); } }
@media (prefers-reduced-motion: reduce) { .wb-hero.fail { animation: none; box-shadow: 0 0 0 4px rgba(239,68,68,.18); } }
.wb-fail { display: flex; align-items: center; gap: 14px; flex-shrink: 0; padding: 8px 16px; border-radius: 13px;
  background: rgba(239,68,68,.18); border: 1px solid rgba(239,68,68,.55); }
.wb-fail-i { flex: 0 0 auto; width: 40px; height: 40px; border-radius: 50%; background: var(--wb-bad); color: #fff;
  display: grid; place-items: center; font-size: 26px; font-weight: 800; }
.wb-fail-b { display: flex; flex-direction: column; line-height: 1.35; min-width: 0; }
.wb-fail-b b { font-size: 20px; color: #fecaca; }
.wb-fail-b span { font-size: 13.5px; color: #fca5a5; }
.wb-fail .wb-dtags { margin-inline-start: auto; justify-content: flex-end; }
.wb-n.bad { border-color: var(--wb-bad); background: rgba(239,68,68,.14); }
.wb-n.bad .wb-nv { color: #f87171; }
.wb-n.bad .wb-nf { color: #fca5a5; font-weight: 700; font-size: 14px; }
.wb-dtags { display: flex; gap: 8px; flex-wrap: wrap; }
.wb-dtag { font-size: 16px; font-weight: 700; color: #fecaca; background: rgba(239,68,68,.16);
  border: 1px solid rgba(239,68,68,.4); border-radius: 999px; padding: 2px 14px; }
/* توضیحِ آزادِ عیب (defectNote) ممکن است چند سطر شود؛ قرصِ ۹۹۹px دورش ناجور می‌شد */
.wb-dtag.note { border-radius: 12px; font-weight: 600; line-height: 1.5; padding: 4px 14px; }

/* ── سرپرست خط و پیشرفت دستور ────────────────────────────────────────────── */
.wb-rail { display: flex; flex-direction: column; gap: 14px; min-height: 0; }
.wb-sv { text-align: center; padding: 12px 16px 13px; }
.wb-sv-top { display: flex; align-items: center; justify-content: space-between; }
.wb-line { background: var(--wb-brand); color: #fff; font-size: 19px; font-weight: 800;
  padding: 1px 14px; border-radius: 9px; }
.wb-sv-img { display: grid; place-items: center; margin: 8px 0 9px; }
.wb-sv-img .sv-img { width: 92px !important; height: 92px !important; border-radius: 50%;
  border: 3px solid rgba(224,53,60,.55); box-shadow: 0 0 0 6px rgba(224,53,60,.09); background: #22304a; }
.wb-sv-img .sv-ini { font-size: 34px; color: #cbd5e1; }
.wb-sv-name { font-size: 28px; font-weight: 800; line-height: 1.2; }
.wb-sv-name.none { color: var(--wb-muted); font-size: 22px; margin-top: 10px; }
.wb-sv-role { font-size: 14.5px; color: var(--wb-muted); line-height: 1.4; }
.wb-kpi { display: flex; gap: 8px; margin-top: 11px; }
.wb-kpi div { flex: 1; background: var(--wb-sunk); border: 1px solid var(--wb-line);
  border-radius: 11px; padding: 5px 4px; }
.wb-kpi b { display: block; font-size: 21px; line-height: 1.25; }
.wb-kpi span { font-size: 12.5px; color: var(--wb-muted); line-height: 1.5; }

.wb-prg { flex: 1; display: flex; flex-direction: column; align-items: center;
  justify-content: center; padding: 12px 16px 14px; }
.wb-prg .wb-pl { align-self: flex-start; }
.wb-gauge { position: relative; width: 232px; height: 124px; }
.wb-gauge svg { width: 100%; height: 100%; }
.wb-gmid { position: absolute; inset: auto 0 2px; text-align: center; }
.wb-gpc { font-size: 44px; font-weight: 800; line-height: 1; }
.wb-gpc small { font-size: 20px; font-weight: 700; color: var(--wb-muted); }
.wb-gsub { font-size: 14px; color: var(--wb-muted); line-height: 1.5; }
.wb-rest { margin-top: 8px; text-align: center; }
.wb-rest b { font-size: 28px; font-weight: 800; line-height: 1.3; }
.wb-rest span { font-size: 14px; color: var(--wb-muted); display: block; line-height: 1.5; }
.wb-lgd { display: flex; gap: 14px; margin-top: 9px; font-size: 13.5px; color: var(--wb-muted); }
.wb-lgd i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; margin-inline-end: 6px; }

/* ── آخرین رول‌ها: مدت پیچش و دلیلِ وضعیت ────────────────────────────────── */
.wb-foot { flex-shrink: 0; }
.wb-foot-l { font-size: 18px; font-weight: 800; margin-bottom: 8px; }
.wb-rolls { display: grid; grid-template-columns: repeat(8, 1fr); gap: 10px; }
.wb-rc { background: var(--wb-panel); border: 1px solid var(--wb-line); border-radius: 14px;
  padding: 10px 13px 11px; position: relative; overflow: hidden; }
.wb-rc::before { content: ''; position: absolute; inset: 0 0 auto; height: 5px; }
.wb-rc.ok::before { background: var(--wb-ok); }
.wb-rc.pend::before { background: var(--wb-pend); }
.wb-rc.und::before { background: #64748b; }
.wb-rc.bad::before { background: var(--wb-bad); }
.wb-rc.pend { border-color: rgba(245,158,11,.4); background: rgba(245,158,11,.05); }
.wb-rc.bad { border-color: rgba(239,68,68,.45); background: rgba(239,68,68,.07); }
.wb-rc-top { display: flex; align-items: baseline; justify-content: space-between;
  font-size: 14px; color: var(--wb-muted); }
.wb-rc-t { font-size: 34px; font-weight: 800; line-height: 1.2; }
.wb-rc-t small { font-size: 16px; font-weight: 700; color: var(--wb-muted); margin-inline-start: 4px; }
.wb-tr { height: 5px; border-radius: 3px; background: #22304a; position: relative; margin: 5px 0 7px; }
.wb-tr i { position: absolute; inset: 0 auto 0 0; border-radius: 3px; display: block; background: #4b5b74; }
.wb-rc.ok .wb-tr i { background: var(--wb-ok); }
.wb-rc.pend .wb-tr i { background: var(--wb-pend); }
.wb-rc.bad .wb-tr i { background: var(--wb-bad); }
.wb-tr u { position: absolute; top: -3px; width: 2px; height: 11px; background: #7f8ea6; }
.wb-rc-st { font-size: 15.5px; font-weight: 800; }
.wb-rc.ok .wb-rc-st { color: #4ade80; }
.wb-rc.pend .wb-rc-st { color: #fbbf24; }
.wb-rc.und .wb-rc-st { color: #94a3b8; }
.wb-rc.bad .wb-rc-st { color: #f87171; }
.wb-rc-why { font-size: 13.5px; line-height: 1.45; margin-top: 1px; min-height: 20px; }
.wb-rc.pend .wb-rc-why { color: #e0bd80; }
.wb-rc.bad .wb-rc-why { color: #f6a9a9; }

/* ── اعلانات ایستگاه وایندر ──────────────────────────────────────────────── */
.wb-flash { display: none; position: absolute; inset: 0; z-index: 30; place-items: center;
  background: rgba(6,11,20,.76); animation: wbFade .3s ease-out; }
.wb-flash.show { display: grid; }
.wb-fcard { width: 880px; border-radius: 26px; padding: 34px 46px 30px; text-align: center;
  position: relative; overflow: hidden; animation: wbPop .45s cubic-bezier(.2,1.3,.35,1); }
.wb-fi { width: 88px; height: 88px; border-radius: 50%; display: grid; place-items: center;
  font-size: 50px; font-weight: 800; margin: 0 auto 14px; }
.wb-fv { font-size: 48px; font-weight: 800; line-height: 1.25; }
.wb-fs { font-size: 26px; color: #e4ecf6; margin-top: 6px; font-weight: 700; }
.wb-fm { font-size: 17px; color: var(--wb-muted); margin-top: 10px; }
.wb-fsnd { display: inline-block; margin-top: 14px; font-size: 14.5px; color: #cbd5e1;
  background: rgba(255,255,255,.07); border-radius: 999px; padding: 3px 15px; }
.wb-fbar { position: absolute; inset: auto 0 0; height: 5px; opacity: .6;
  animation: wbCountdown 6.5s linear forwards; }
.wb-flash.a-ok .wb-fcard { background: linear-gradient(180deg, rgba(34,197,94,.20), rgba(13,20,32,.92));
  border: 2px solid rgba(34,197,94,.6); box-shadow: 0 0 70px rgba(34,197,94,.28); }
.wb-flash.a-ok .wb-fi { background: var(--wb-ok); color: #04230f; }
.wb-flash.a-ok .wb-fv { color: #7bf0a8; }
.wb-flash.a-ok .wb-fbar { background: var(--wb-ok); }
.wb-flash.a-warn .wb-fcard { background: linear-gradient(180deg, rgba(245,158,11,.20), rgba(13,20,32,.92));
  border: 2px solid rgba(245,158,11,.65); box-shadow: 0 0 70px rgba(245,158,11,.26); }
.wb-flash.a-warn .wb-fi { background: var(--wb-pend); color: #2b1a02; }
.wb-flash.a-warn .wb-fv { color: #fcd34d; }
.wb-flash.a-warn .wb-fbar { background: var(--wb-pend); }
.wb-flash.a-bad .wb-fcard { background: linear-gradient(180deg, rgba(239,68,68,.22), rgba(13,20,32,.92));
  border: 2px solid rgba(239,68,68,.7); box-shadow: 0 0 70px rgba(239,68,68,.3); }
.wb-flash.a-bad .wb-fi { background: var(--wb-bad); color: #2b0606; }
.wb-flash.a-bad .wb-fv { color: #fda4a4; }
.wb-flash.a-bad .wb-fbar { background: var(--wb-bad); }
@keyframes wbCountdown { from { width: 100%; } to { width: 0; } }
@keyframes wbFade { from { opacity: 0; } to { opacity: 1; } }
@keyframes wbPop { from { opacity: 0; transform: scale(.92) translateY(10px); } to { opacity: 1; transform: none; } }

/* ── حالت تلویزیون خط: تخته تمام صفحه، بدون هیچ عنصر دیگری ───────────────── */
body.tv #sidebar, body.tv .sidebar, body.tv .topbar, body.tv .page-head { display: none !important; }
body.tv .main { margin-inline-start: 0 !important; }
body.tv .content { padding: 0 !important; }
body.tv .wb-stage { position: fixed; inset: 0; width: 100vw; height: 100vh;
  max-height: none; aspect-ratio: auto; border: 0; border-radius: 0; z-index: 900; }

/* ══ داشبورد کنترل کیفیت — چیدمان تبلتِ کنارِ خط ════════════════════════
 * دو خط کنار هم، فاکتورهای فازِ جاری درشت، ورودِ سرِ جا (بدون مودال).
 * این بلوک عمداً آخر فایل است تا بر قواعد قدیمیِ .qcb-* بچربد.        */
.qcb { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; align-items: start; }
@media (max-width: 1150px) { .qcb { grid-template-columns: 1fr; } }
.qb-line { --c: #8a8f98; display: flex; flex-direction: column; min-width: 0; overflow: hidden;
  background: var(--surface); border: 1px solid var(--border); border-radius: 14px; box-shadow: var(--shadow); }
.qb-dim { color: var(--muted); font-weight: 500; }

/* سرِ خط */
.qb-head { display: flex; align-items: center; gap: 11px; padding: 10px 13px;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(180deg, color-mix(in srgb, var(--c) 14%, var(--surface)), var(--surface)); }
.qb-tag { flex: 0 0 auto; background: var(--c); color: #fff; font-weight: 800; font-size: 13.5px;
  padding: 5px 12px; border-radius: 9px; }
.qb-camp { min-width: 0; }
.qb-camp b { display: block; font-size: 14.5px; font-weight: 700; line-height: 1.35; }
.qb-camp span { font-size: 11.5px; color: var(--muted); }
.qb-prog { flex: 1; min-width: 60px; }
.qb-bar { height: 7px; border-radius: 99px; background: color-mix(in srgb, var(--muted) 22%, transparent); overflow: hidden; }
.qb-bar i { display: block; height: 100%; border-radius: 99px; background: var(--c); transition: width .4s; }
.qb-prog span { display: block; text-align: center; margin-top: 3px; font-size: 11px; color: var(--muted); }

.qb-body { display: flex; flex-direction: column; gap: 10px; padding: 11px; }

/* کانس — آلارم وقتی از حد گذشت، نوار آرام وقتی سرِ وقت است */
/* در ستون باریک، نوشته و تایمر در سطر اول می‌مانند و ورودی به سطر دوم می‌رود
   — با flex ساده هر بچه یک سطر می‌شد و باکس سه‌برابر بلند می‌ماند. */
.qb-alarm { display: grid; grid-template-columns: auto 1fr auto; gap: 7px 11px; align-items: center;
  padding: 11px 13px; border-radius: 12px;
  border: 2px solid var(--danger); background: color-mix(in srgb, var(--danger) 9%, var(--surface));
  animation: qbPulse 1.9s ease-in-out infinite; }
.qb-alarm > .qb-consin { grid-column: 1 / -2; width: auto; }
.qb-alarm > .qb-alarm-go { grid-column: -2 / -1; }
@keyframes qbPulse { 0%, 100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--danger) 42%, transparent); }
  70% { box-shadow: 0 0 0 12px transparent; } }
.qb-alarm-i { flex: 0 0 auto; width: 36px; height: 36px; border-radius: 50%; background: var(--danger);
  color: #fff; display: grid; place-items: center; font-size: 21px; font-weight: 800; }
.qb-alarm-b { flex: 1; min-width: 0; }
.qb-alarm-b b { display: block; font-size: 14px; color: var(--danger); }
.qb-alarm-b span { font-size: 11.5px; color: var(--muted); }
.qb-alarm-go { flex: 0 0 auto; background: var(--danger); color: #fff; border: 0; border-radius: 10px;
  padding: 11px 18px; font: inherit; font-size: 14px; font-weight: 700; cursor: pointer; }
.qb-calm { display: flex; align-items: center; gap: 9px; padding: 8px 12px; border-radius: 10px;
  font-size: 12.5px; color: var(--success);
  background: color-mix(in srgb, var(--success) 8%, transparent);
  border: 1px solid color-mix(in srgb, var(--success) 28%, transparent); }
.qb-calm b { font-weight: 700; }
.qb-calm span { color: var(--muted); }
.qb-consin { width: 104px; padding: 9px 10px; border: 1px solid var(--border); border-radius: 9px;
  font-family: inherit; font-size: 15px; background: var(--surface); color: var(--text); }

/* رولِ روبه‌روی اپراتور */
.qb-roll { display: flex; align-items: center; gap: 12px; padding: 11px 13px; border-radius: 13px;
  border: 1px solid var(--border); background: var(--surface-2); }
.qb-roll-l { flex: 1; min-width: 0; }
.qb-no { font-size: 30px; font-weight: 800; letter-spacing: 1px; line-height: 1.15;
  font-variant-numeric: tabular-nums; }
.qb-rmeta { font-size: 12px; color: var(--muted); }
.qb-roll-r { flex: 0 0 auto; text-align: center; }
/* paintLiveTimer هر ثانیه className را بازمی‌نویسد و کلاس‌های اضافه (big) را
   می‌اندازد؛ پس اندازه را از روی جایگاه می‌گیریم نه از روی کلاس. */
.qb-roll-r .live-t { display: block; font-size: 25px; font-weight: 800; font-variant-numeric: tabular-nums; }
.qb-alarm .live-t { font-size: 19px; font-weight: 800; color: var(--danger); font-variant-numeric: tabular-nums; }
.qb-calm .live-t { font-size: 12px; font-weight: 700; font-variant-numeric: tabular-nums; }
.qb-rtl { font-size: 10.5px; color: var(--muted); }
.qb-roll-b { flex: 0 0 auto; display: flex; flex-direction: column; gap: 4px; align-items: flex-end; }

/* ریل فازها */
.qb-rail { display: flex; gap: 5px; }
.qb-step { flex: 1; text-align: center; padding: 6px 3px 5px; border-radius: 9px; font-size: 10.5px;
  color: var(--muted); background: var(--surface-2); border: 1px solid var(--border); }
.qb-step b { display: block; font-size: 12px; font-weight: 700; color: var(--text); }
.qb-step.done { color: var(--success); background: color-mix(in srgb, var(--success) 9%, transparent);
  border-color: color-mix(in srgb, var(--success) 30%, transparent); }
.qb-step.done b { color: var(--success); }
.qb-step.now { background: var(--text); border-color: var(--text); color: color-mix(in srgb, #fff 65%, transparent); }
.qb-step.now b { color: #fff; }
.qb-step.wait { opacity: .45; }

/* منطقه‌ی ورود */
.qb-entry { border: 2px solid var(--text); border-radius: 13px; overflow: hidden; }
.qb-entry.idle { border-color: var(--border); }
.qb-eh { display: flex; align-items: center; gap: 8px; padding: 8px 12px; font-size: 13px; font-weight: 700;
  background: var(--text); color: #fff; }
.qb-entry.idle .qb-eh { background: var(--surface-2); color: var(--muted); }
.qb-eh span { font-weight: 400; opacity: .72; font-size: 11.5px; }
.qb-tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; padding: 10px; }
@media (max-width: 1150px) { .qb-tiles { grid-template-columns: repeat(4, 1fr); } }
.qb-tile { display: flex; flex-direction: column; justify-content: center; gap: 2px; min-height: 70px;
  padding: 9px 6px; border: 2px solid var(--border); border-radius: 11px; background: var(--surface);
  font: inherit; color: inherit; text-align: center; cursor: pointer; transition: .14s; }
.qb-tl { font-size: 12px; font-weight: 600; color: var(--muted); }
.qb-tv { font-size: 20px; font-weight: 800; font-variant-numeric: tabular-nums; }
.qb-tile.empty .qb-tv { color: color-mix(in srgb, var(--muted) 45%, transparent); }
.qb-tile.done { background: color-mix(in srgb, var(--success) 7%, var(--surface)); border-color: var(--success); }
.qb-tile.done .qb-tv { color: var(--success); }
.qb-tile.done .qb-tl::after { content: " ✓"; color: var(--success); }
.qb-tile.opt .qb-tl::before { content: "اختیاری · "; font-size: 9.5px; opacity: .6; }
.qb-tile.sel { border-color: var(--primary); background: color-mix(in srgb, var(--primary) 6%, var(--surface));
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--primary) 13%, transparent); }
.qb-tile.sel .qb-tv { color: var(--primary); }
.qb-tile.lock { opacity: .45; cursor: not-allowed; border-style: dashed; }

/* شستی — سرِ جا */
.qb-padwrap:empty { display: none; }
.qb-padwrap { padding: 0 10px 10px; }
.qb-padh { display: flex; align-items: center; gap: 8px; font-size: 13px; margin-bottom: 7px; }
.qb-x { background: transparent; border: 0; font: inherit; font-size: 17px; color: var(--muted); cursor: pointer;
  line-height: 1; padding: 4px 8px; }
.qb-disp { text-align: center; font-size: 30px; font-weight: 800; font-variant-numeric: tabular-nums;
  padding: 6px 0 9px; letter-spacing: 1px; }
.qb-keys { display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; }
.qb-keys { direction: ltr; }  /* مثل ماشین‌حساب و صفحه‌کلید گوشی: ۱ چپ، ۲ وسط، ۳ راست (درخواست آزمایشگاه) */
.qb-k { padding: 11px 0; border: 1px solid var(--border); border-radius: 11px; background: var(--surface);
  color: inherit; font: inherit; font-size: 22px; font-weight: 700; cursor: pointer;
  font-variant-numeric: tabular-nums; transition: .1s; }
.qb-k:active { background: var(--text); color: #fff; transform: scale(.95); }
.qb-k.wide { grid-column: span 2; }
.qb-k.ok { background: var(--success); border-color: var(--success); color: #fff; font-size: 16px; }
.qb-k.del { background: color-mix(in srgb, var(--danger) 8%, var(--surface));
  border-color: color-mix(in srgb, var(--danger) 30%, transparent); color: var(--danger); font-size: 18px; }
.qb-opts { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 8px; }
.qb-opt { padding: 16px 8px; border: 2px solid var(--border); border-radius: 11px; background: var(--surface);
  color: inherit; font: inherit; font-size: 15px; font-weight: 600; cursor: pointer; }
.qb-opt.on { background: var(--primary); border-color: var(--primary); color: #fff; }

/* دکمه‌ی گذر به مرحله‌ی بعد */
.qb-cta { display: flex; gap: 8px; padding: 0 10px 10px; }
/* دکمه‌ها وقتی درست زیرِ نوارِ تیره‌ی عنوان می‌آیند (فاز ۱ با پروفایلِ ثبت‌شده) به آن می‌چسبیدند؛
   در بقیه‌ی حالت‌ها چیزی با فاصله‌ی خودش (خانه‌ها، پیامِ انتظار) پیش از آن‌هاست. */
.qb-eh + .qb-cta { padding-top: 10px; }
.qb-big { flex: 1; padding: 14px 20px; border: 0; border-radius: 11px; background: var(--primary); color: #fff;
  font: inherit; font-size: 15px; font-weight: 700; cursor: pointer; }
.qb-big.alt { background: var(--text); }
.qb-big.off { background: color-mix(in srgb, var(--muted) 30%, transparent); color: var(--muted); }
.qb-wait { padding: 15px 13px; text-align: center; }
.qb-wait b { display: block; font-size: 14.5px; margin-bottom: 3px; }
.qb-wait span { display: block; font-size: 12px; color: var(--muted); }
.qb-wait.big { border: 2px dashed var(--border); border-radius: 13px; padding: 22px 14px; }
.qb-wait.big .qb-big { margin-top: 13px; width: 100%; }
.qb-back { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; padding: 0 10px 10px;
  font-size: 11.5px; color: var(--muted); }
.qb-backb { padding: 6px 11px; border: 1px dashed var(--warning); border-radius: 8px; background: transparent;
  color: var(--warning); font: inherit; font-size: 11.5px; font-weight: 600; cursor: pointer; }

/* پروفایل عرضی + روند */
.qb-prof { border: 1px solid var(--border); border-radius: 12px; padding: 9px 11px; }
.qb-profh { display: flex; align-items: baseline; gap: 9px; flex-wrap: wrap; margin-bottom: 7px;
  font-size: 11.5px; color: var(--muted); }
.qb-profh b { font-size: 14.5px; color: var(--text); }
.qb-dev { font-weight: 800; color: var(--success); }
.qb-dev.bad { color: var(--danger); }
.qb-strip { display: flex; gap: 3px; }
.qb-cell { flex: 1; min-width: 0; height: 40px; border-radius: 7px; display: grid; place-items: center;
  font-size: 12.5px; font-weight: 800; color: #233; font-variant-numeric: tabular-nums; }
/* خانه‌ی پروفایل: علامت (qb-sg) و رقم دو تکه‌اند و کنار هم می‌نشینند، درست مثل قبل.
   اگر خانه برای هر دو جا نداشته باشد (نوارِ پرنقطه، مثلاً ۲۵ نقطه، در ستون باریک یا حالت تبلت)،
   flex-wrap علامت را خودبه‌خود به سطرِ بالای رقم می‌برد تا «+۱۲» روی خانه‌ی کناری نیفتد.
   عمداً CSS خالص است: ResizeObserver وقتی صفحه کشیده نمی‌شود صدا نمی‌خورد. */
.qb-cell { display: flex; flex-wrap: wrap; align-content: center; justify-content: center; line-height: 1; }
.qb-sg { font-size: inherit; }  /* <small> در مرورگر خودبه‌خود ریزتر است */
.qb-proff { display: flex; justify-content: space-between; margin-top: 5px; font-size: 10px; color: var(--muted); }
.qb-trend { margin-top: 9px; padding-top: 8px; border-top: 1px dashed var(--border); }
.qb-trh { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; font-size: 11px;
  color: var(--muted); margin-bottom: 5px; }
.qb-drift { color: var(--danger); font-weight: 700; }
.qb-trs { display: flex; align-items: flex-end; gap: 4px; }
.qb-tr { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 2px; }
.qb-trv { font-size: 9.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.qb-trb { width: 100%; border-radius: 4px 4px 2px 2px; }
.qb-trn { font-size: 9px; color: var(--muted); font-variant-numeric: tabular-nums; }
.qb-tr.now .qb-trv { color: var(--text); font-weight: 800; }
.qb-tr.now .qb-trb { outline: 2px solid var(--text); outline-offset: 1px; }

/* پاورقی */
.qb-foot { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; padding: 9px 11px;
  border-top: 1px solid var(--border); background: var(--surface-2); }
.qb-sup { display: flex; align-items: center; gap: 8px; min-width: 0; }
.qb-av.none { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center;
  background: color-mix(in srgb, var(--muted) 22%, transparent); color: var(--muted);
  font-size: 13px; font-weight: 700; }
.qb-supt { min-width: 0; line-height: 1.4; }
.qb-supt b { display: block; font-size: 12.5px; font-weight: 700; white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis; }
.qb-supt span { font-size: 10.5px; color: var(--muted); }
.qb-fbtn { padding: 8px 12px; border: 1px solid var(--border); border-radius: 9px; background: var(--surface);
  color: var(--muted); font: inherit; font-size: 12px; font-weight: 600; cursor: pointer; }
.qb-fbtn.warn { color: var(--warning); border-color: color-mix(in srgb, var(--warning) 40%, transparent); }
.qb-fbtn.danger { color: var(--danger); border-color: color-mix(in srgb, var(--danger) 35%, transparent); }

/* نمایشگر کوتاه: کمی جمع‌وجورتر تا بدون اسکرول جا شود */
@media (max-height: 800px) {
  .qb-no { font-size: 25px; }
  .qb-roll-r .live-t { font-size: 21px; }
  .qb-tile { min-height: 62px; }
  .qb-tv { font-size: 18px; }
  .qb-k { font-size: 19px; padding: 9px 0; }
  .qb-disp { font-size: 25px; }
  .qb-cell { height: 34px; }
  .qb-big { padding: 12px 18px; }
  .qb-body { gap: 8px; padding: 9px; }
  .qb-alarm, .qb-roll { padding: 9px 11px; }
  .qb-prof { padding: 7px 9px; }
  .qb-tiles { padding: 8px; gap: 7px; }
  .qb-head { padding: 8px 11px; }
  .qb-foot { padding: 7px 10px; }
}


/* ══ نوبت بارگیری ═══════════════════════════════════════════════════════
 * روی کارت سفارش: تا وقتی شرایط نیست می‌گوید چرا، و به‌محض فراهم‌شدن
 * دکمه‌ی نوبت‌گذاری می‌آید.                                            */
.lo-slot { display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  margin: 9px 0 4px; padding: 9px 12px; border-radius: 10px;
  background: var(--surface-2, #f8fafc); border: 1px solid var(--border, #e5e8ef); }
.lo-slot.has { background: color-mix(in srgb, var(--success, #16a34a) 7%, var(--surface, #fff));
  border-color: color-mix(in srgb, var(--success, #16a34a) 32%, transparent); }
.lo-slot-i { flex: 0 0 auto; width: 30px; height: 30px; border-radius: 8px;
  display: grid; place-items: center; }
.lo-slot-i.no { background: color-mix(in srgb, var(--danger, #dc2626) 12%, transparent); color: var(--danger, #dc2626); }
.lo-slot-i.part { background: color-mix(in srgb, var(--warning, #d97706) 14%, transparent); color: var(--warning, #d97706); }
.lo-slot-i.ok { background: color-mix(in srgb, var(--success, #16a34a) 14%, transparent); color: var(--success, #16a34a); }
.lo-slot-b { min-width: 0; line-height: 1.5; }
.lo-slot-b b { display: block; font-size: 12.5px; font-weight: 700; }
.lo-slot-b span { font-size: 11.5px; color: var(--muted, #6b7686); }
.lo-slot-live { font-size: 11.5px; color: var(--success, #16a34a); font-weight: 600; }
.lo-link.on { color: var(--success, #16a34a); border-color: color-mix(in srgb, var(--success, #16a34a) 40%, transparent); }

/* شبکه‌ی سه‌ستونیِ فرم نوبت */
.pf-grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
@media (max-width: 640px) { .pf-grid3 { grid-template-columns: 1fr; } }
.pf-f.full { grid-column: 1 / -1; }

/* ── نوبت‌های پیشِ‌رو در ایستگاه بارگیری (نمای انبار) ─────────────────── */
.sl-wrap { display: flex; flex-direction: column; gap: 8px; margin-bottom: 14px; }
.sl-head { display: flex; align-items: center; gap: 9px; font-size: 13px; font-weight: 700; margin-bottom: 2px; }
.sl-cnt { background: var(--primary, #c1272d); color: #fff; border-radius: 999px;
  padding: 1px 9px; font-size: 11.5px; font-weight: 700; }
.sl-card { display: flex; align-items: center; gap: 11px; padding: 10px 13px; border-radius: 11px;
  background: var(--surface, #fff); border: 1px solid var(--border, #e5e8ef);
  border-inline-start: 4px solid var(--border-strong, #cbd5e1); }
.sl-card.today { border-inline-start-color: var(--success, #16a34a);
  background: color-mix(in srgb, var(--success, #16a34a) 5%, var(--surface, #fff)); }
.sl-card.overdue { border-inline-start-color: var(--danger, #dc2626);
  background: color-mix(in srgb, var(--danger, #dc2626) 6%, var(--surface, #fff)); }
.sl-card.live { border-inline-start-color: var(--warning, #d97706); }
.sl-when { flex: 0 0 auto; text-align: center; min-width: 88px; }
.sl-when b { display: block; font-size: 13px; font-weight: 800; font-variant-numeric: tabular-nums; }
.sl-when span { font-size: 11px; color: var(--muted, #6b7686); font-variant-numeric: tabular-nums; }
.sl-b { flex: 1; min-width: 0; line-height: 1.55; }
.sl-b b { font-size: 13px; font-weight: 700; }
.sl-b span { display: block; font-size: 11.5px; color: var(--muted, #6b7686); }
.sl-tag { flex: 0 0 auto; font-size: 10.5px; font-weight: 700; padding: 3px 10px; border-radius: 999px; }
.sl-tag.today { background: color-mix(in srgb, var(--success, #16a34a) 15%, transparent); color: var(--success, #16a34a); }
.sl-tag.overdue { background: color-mix(in srgb, var(--danger, #dc2626) 13%, transparent); color: var(--danger, #dc2626); }
.sl-tag.live { background: color-mix(in srgb, var(--warning, #d97706) 15%, transparent); color: var(--warning, #d97706); }

/* فید خبرهای بارگیری برای انبار */
.sl-feed { display: flex; flex-direction: column; gap: 6px; }
.sl-ev { display: flex; align-items: baseline; gap: 8px; padding: 7px 11px; border-radius: 9px;
  font-size: 12px; background: var(--surface-2, #f8fafc);
  border-inline-start: 3px solid var(--border-strong, #cbd5e1); }
.sl-ev.fresh { background: color-mix(in srgb, var(--primary, #c1272d) 6%, transparent);
  border-inline-start-color: var(--primary, #c1272d); }
.sl-ev.k-cancelled { border-inline-start-color: var(--danger, #dc2626); }
.sl-ev.k-moved { border-inline-start-color: var(--warning, #d97706); }
.sl-ev.k-booked, .sl-ev.k-started { border-inline-start-color: var(--success, #16a34a); }
.sl-ev-t { flex: 1; min-width: 0; line-height: 1.7; }
.sl-ev-w { font-size: 10.5px; color: var(--muted, #6b7686); white-space: nowrap; }


/* ══ تقویم شمسی و انتخابگر ساعت ═════════════════════════════════════════ */
.in-wrap { position: relative; display: flex; align-items: stretch; gap: 0; }
.in-wrap input { flex: 1; min-width: 0; border-start-start-radius: 0; border-end-start-radius: 0; }
.in-btn { flex: 0 0 auto; display: grid; place-items: center; width: 38px; cursor: pointer;
  border: 1px solid var(--border, #e5e8ef); border-inline-end: 0; background: var(--surface-2, #f8fafc);
  color: var(--muted, #6b7686); border-start-end-radius: 0; border-end-end-radius: 0;
  border-start-start-radius: 9px; border-end-start-radius: 9px; }
.in-btn:hover { background: var(--surface, #fff); color: var(--primary, #c1272d); }
.in-hint { display: block; margin-top: 4px; font-size: 11px; color: var(--muted, #6b7686); }

.jc-pop { position: absolute; z-index: 80; top: calc(100% + 6px); inset-inline-start: 0;
  background: var(--surface, #fff); border: 1px solid var(--border, #e5e8ef); border-radius: 12px;
  box-shadow: 0 12px 30px rgba(16, 24, 40, .18); padding: 10px; width: 252px; }
.jc-head { display: flex; align-items: center; gap: 6px; margin-bottom: 7px; }
.jc-title { flex: 1; text-align: center; font-size: 13px; font-weight: 700; }
.jc-nav { width: 28px; height: 28px; border-radius: 8px; border: 1px solid var(--border, #e5e8ef);
  background: var(--surface-2, #f8fafc); color: inherit; font: inherit; font-size: 16px; cursor: pointer; }
.jc-nav:hover { background: var(--surface, #fff); color: var(--primary, #c1272d); }
.jc-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 3px; }
.jc-dow { display: grid; place-items: center; height: 24px; font-size: 10.5px; font-weight: 700;
  color: var(--muted, #6b7686); }
.jc-d { height: 30px; border-radius: 8px; border: 1px solid transparent; background: transparent;
  color: inherit; font: inherit; font-size: 12.5px; cursor: pointer; font-variant-numeric: tabular-nums; }
.jc-d:hover { background: var(--surface-2, #f8fafc); border-color: var(--border, #e5e8ef); }
.jc-d.today { color: var(--primary, #c1272d); font-weight: 800; }
.jc-d.on { background: var(--primary, #c1272d); border-color: var(--primary, #c1272d); color: #fff; font-weight: 700; }
.jc-foot { display: flex; gap: 6px; margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--border, #e5e8ef); }
.jc-today { flex: 1; padding: 7px 0; border-radius: 8px; border: 1px solid var(--border, #e5e8ef);
  background: var(--surface-2, #f8fafc); color: inherit; font: inherit; font-size: 12px; font-weight: 600; cursor: pointer; }
.jc-today:hover { color: var(--primary, #c1272d); border-color: var(--primary, #c1272d); }

.jc-pop.hours { width: 214px; }
.jc-hg { display: grid; grid-template-columns: repeat(2, 1fr); gap: 5px; max-height: 236px; overflow-y: auto; }
.jc-h { padding: 8px 6px; border-radius: 8px; border: 1px solid var(--border, #e5e8ef);
  background: var(--surface-2, #f8fafc); color: inherit; font: inherit; font-size: 12.5px; cursor: pointer; }
.jc-h:hover { border-color: var(--primary, #c1272d); color: var(--primary, #c1272d); }
.jc-h.on { background: var(--primary, #c1272d); border-color: var(--primary, #c1272d); color: #fff; font-weight: 700; }

/* ── دفترچهٔ ماشین‌ها: پیشنهاد پلاک ─────────────────────────────────────── */
.tk-sug { position: absolute; z-index: 80; top: calc(100% + 5px); inset-inline: 0;
  background: var(--surface, #fff); border: 1px solid var(--border, #e5e8ef); border-radius: 11px;
  box-shadow: 0 10px 26px rgba(16, 24, 40, .15); overflow: hidden; max-height: 220px; overflow-y: auto; }
.tk-sug.hidden { display: none; }
.tk-item { display: block; width: 100%; text-align: start; padding: 8px 11px; border: 0;
  background: transparent; color: inherit; font: inherit; cursor: pointer; line-height: 1.5; }
.tk-item:hover { background: var(--surface-2, #f8fafc); }
.tk-item b { display: block; font-size: 12.5px; font-weight: 700; font-variant-numeric: tabular-nums; }
.tk-item span { font-size: 11px; color: var(--muted, #6b7686); }
.tk-new, .tk-known { font-size: 11.5px; padding: 7px 11px; border-radius: 9px; line-height: 1.7; }
.tk-new { background: color-mix(in srgb, var(--warning, #d97706) 10%, transparent); color: var(--warning, #d97706); }
.tk-new b { font-weight: 700; }
.tk-known { background: color-mix(in srgb, var(--success, #16a34a) 9%, transparent); color: var(--success, #16a34a); }
.tk-new.hidden, .tk-known.hidden { display: none; }


/* ══ پلاک ایرانی ═══════════════════════════════════════════════════════
 * چیدمان همیشه چپ‌به‌راست است چون خودِ پلاک این‌طور است، نه متن فارسی. */
.pf-plate-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin: 2px 0 4px; }
.pf-lbl { font-size: 12.5px; font-weight: 600; color: var(--muted, #6b7686); }
.pl-box { direction: ltr; display: flex; align-items: stretch; height: 52px;
  border: 2px solid #111827; border-radius: 8px; overflow: hidden; background: #fff;
  box-shadow: 0 1px 3px rgba(16, 24, 40, .12); }
.pl-flag { flex: 0 0 auto; width: 30px; background: #1d4ed8; color: #fff;
  display: flex; flex-direction: column; align-items: center; justify-content: flex-end;
  padding-bottom: 3px; gap: 2px; }
.pl-flag i { display: block; width: 20px; height: 13px; border-radius: 2px; margin-top: 4px;
  background: linear-gradient(#239f40 0 33.3%, #fff 33.3% 66.6%, #da0000 66.6% 100%); }
.pl-flag span { font-size: 5.5px; font-weight: 700; line-height: 1.15; text-align: center; white-space: pre; }
.pl-mid { flex: 1; display: flex; align-items: center; justify-content: center; gap: 6px; padding: 0 8px; }
.pl-n { width: 100%; min-width: 0; text-align: center; border: 0; outline: 0; background: transparent;
  font-family: inherit; font-size: 21px; font-weight: 800; color: #111827;
  font-variant-numeric: tabular-nums; letter-spacing: 1px; padding: 0; }
.pl-mid .pl-n:first-child { max-width: 54px; }
.pl-mid .pl-n:last-child { max-width: 76px; }
.pl-n::placeholder { color: #cbd5e1; font-weight: 700; }
.pl-l { width: 46px; text-align: center; text-align-last: center; border: 1px solid transparent;
  border-radius: 6px; background: transparent; font-family: inherit; font-size: 18px; font-weight: 800;
  color: #111827; cursor: pointer; padding: 2px 0; }
.pl-l:hover, .pl-l:focus { border-color: var(--border, #e5e8ef); background: var(--surface-2, #f8fafc); outline: 0; }
.pl-n:focus { background: color-mix(in srgb, var(--primary, #c1272d) 8%, transparent); border-radius: 5px; }
.pl-iran { flex: 0 0 auto; width: 58px; border-inline-start: 2px solid #111827;
  display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 3px 0; }
.pl-iran b { font-size: 9px; font-weight: 700; color: #111827; }
.pl-iran .pl-n { font-size: 17px; letter-spacing: .5px; }

/* نشانِ دفترچه: آشنا یا تازه */
.tk-mark { font-size: 11.5px; padding: 8px 11px; border-radius: 9px; line-height: 1.7; }
.tk-mark.hidden { display: none; }
.tk-mark.known { background: color-mix(in srgb, var(--success, #16a34a) 9%, transparent); color: var(--success, #16a34a); }
.tk-mark.new { background: color-mix(in srgb, var(--warning, #d97706) 10%, transparent); color: var(--warning, #d97706); }

/* ── شبکه‌ی سه‌ستونیِ یکدست ─────────────────────────────────────────────
 * همه‌ی خانه‌ها یک ارتفاع دارند تا ردیف‌ها بهم نریزند. */
.pf-g3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 11px; align-items: end; }
@media (max-width: 700px) { .pf-g3 { grid-template-columns: 1fr; } }
.pf-g3 .pf-f { display: flex; flex-direction: column; gap: 5px; margin: 0; }
.pf-g3 .pf-f > span { font-size: 12.5px; font-weight: 600; color: var(--muted, #6b7686);
  display: flex; align-items: baseline; gap: 6px; min-height: 19px; }
.pf-lbl-x { font-style: normal; font-size: 11px; font-weight: 400; opacity: .75; }
.pf-g3 .pf-f > input, .pf-g3 .pf-f > select, .pf-g3 .in-wrap { height: 38px; }
.pf-g3 .pf-f > input, .pf-g3 .pf-f > select {
  padding: 0 11px; border: 1px solid var(--border, #e5e8ef); border-radius: 9px;
  font-family: inherit; font-size: 13.5px; background: var(--surface, #fff); color: var(--text, #1f2733); }
.in-wrap { position: relative; display: flex; align-items: stretch; }
.in-wrap input { flex: 1; min-width: 0; height: 100%; padding: 0 11px;
  border: 1px solid var(--border, #e5e8ef); border-inline-start: 0;
  border-start-end-radius: 9px; border-end-end-radius: 9px;
  border-start-start-radius: 0; border-end-start-radius: 0;
  font-family: inherit; font-size: 13.5px; background: var(--surface, #fff); color: var(--text, #1f2733); }
.in-btn { flex: 0 0 auto; width: 38px; display: grid; place-items: center; cursor: pointer;
  border: 1px solid var(--border, #e5e8ef); border-inline-end: 0;
  background: var(--surface-2, #f8fafc); color: var(--muted, #6b7686);
  border-start-start-radius: 9px; border-end-start-radius: 9px;
  border-start-end-radius: 0; border-end-end-radius: 0; }
.in-btn:hover { background: var(--surface, #fff); color: var(--primary, #c1272d); }


/* ── ایستگاه بارگیری: انتظار نوبت و راه اضطراری ────────────────────────── */
.ld-wait { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0;
  padding: 9px 12px; border-radius: 10px; color: var(--muted, #6b7686);
  background: var(--surface-2, #f8fafc); border: 1px dashed var(--border, #e5e8ef); }
.ld-wait b { display: block; font-size: 12.5px; font-weight: 700; color: var(--text, #1f2733); }
.ld-wait span { font-size: 11.5px; }
.ld-emg { color: var(--danger, #dc2626); border-color: color-mix(in srgb, var(--danger, #dc2626) 35%, transparent); }
.ld-emg-warn { padding: 10px 12px; border-radius: 10px; line-height: 1.8;
  background: color-mix(in srgb, var(--danger, #dc2626) 8%, transparent);
  border-inline-start: 3px solid var(--danger, #dc2626); }
.ld-emg-warn b { display: block; font-size: 12.5px; color: var(--danger, #dc2626); }
.ld-emg-warn span { font-size: 11.5px; color: var(--muted, #6b7686); }
.ld-stop { color: var(--danger, #dc2626); border-color: color-mix(in srgb, var(--danger, #dc2626) 35%, transparent); }


/* ══ انتخاب رول‌های نامزد ═══════════════════════════════════════════════ */
.rp-modal { display: flex; flex-direction: column; gap: 11px; }
.rp-modal > p { margin: 0; font-size: 12.5px; color: var(--muted, #6b7686); line-height: 1.8; }
.rp-filters { display: flex; align-items: flex-end; gap: 10px; flex-wrap: wrap;
  padding: 11px 12px; border-radius: 11px;
  background: var(--surface-2, #f8fafc); border: 1px solid var(--border, #e5e8ef); }
.rp-f { display: flex; flex-direction: column; gap: 4px; }
.rp-f span { font-size: 11px; font-weight: 600; color: var(--muted, #6b7686); }
.rp-f input { width: 92px; height: 34px; padding: 0 9px; border: 1px solid var(--border, #e5e8ef);
  border-radius: 8px; font-family: inherit; font-size: 13px;
  background: var(--surface, #fff); color: var(--text, #1f2733); }
.rp-fchk { display: flex; flex-direction: column; gap: 5px; }
.rp-chk { display: flex; align-items: center; gap: 6px; font-size: 12px; cursor: pointer; }
.rp-facts { display: flex; gap: 6px; margin-inline-start: auto; align-items: flex-end; flex-wrap: wrap; }

.rp-sum { display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
  padding: 10px 13px; border-radius: 11px;
  background: color-mix(in srgb, var(--primary, #c1272d) 5%, var(--surface, #fff));
  border: 1px solid color-mix(in srgb, var(--primary, #c1272d) 22%, transparent); }
.rp-stat { display: flex; align-items: baseline; gap: 5px; }
.rp-stat b { font-size: 19px; font-weight: 800; font-variant-numeric: tabular-nums; }
.rp-stat span { font-size: 11.5px; color: var(--muted, #6b7686); }
.rp-verdict { margin-inline-start: auto; font-size: 12.5px; font-weight: 700; padding: 5px 12px; border-radius: 999px; }
.rp-verdict.ok { background: color-mix(in srgb, var(--success, #16a34a) 13%, transparent); color: var(--success, #16a34a); }
.rp-verdict.low { background: color-mix(in srgb, var(--warning, #d97706) 15%, transparent); color: var(--warning, #d97706); }

.rp-scroll { max-height: 46vh; overflow: auto; border: 1px solid var(--border, #e5e8ef); border-radius: 11px; }
.rp-tbl { width: 100%; font-size: 12.5px; }
.rp-tbl thead th { position: sticky; top: 0; z-index: 1; background: var(--surface-2, #f8fafc);
  font-size: 11px; white-space: nowrap; }
.rp-tbl td { padding: 6px 8px; text-align: center; font-variant-numeric: tabular-nums; }
.rp-tbl td:first-child { width: 34px; }
.rp-no { font-weight: 700; letter-spacing: .3px; }
.rp-tbl tr.on { background: color-mix(in srgb, var(--success, #16a34a) 7%, transparent); }
.rp-tbl tr.bad { opacity: .55; }
.rp-tbl tr.loaded { background: color-mix(in srgb, var(--warning, #d97706) 9%, transparent); }
.rp-tbl input[type="checkbox"] { width: 17px; height: 17px; cursor: pointer; }
.rp-tag { font-size: 10.5px; font-weight: 700; padding: 2px 8px; border-radius: 999px; white-space: nowrap; }
.rp-tag.ok { background: color-mix(in srgb, var(--success, #16a34a) 14%, transparent); color: var(--success, #16a34a); }
.rp-tag.bad { background: color-mix(in srgb, var(--danger, #dc2626) 12%, transparent); color: var(--danger, #dc2626); }
.rp-tag.load { background: color-mix(in srgb, var(--warning, #d97706) 16%, transparent); color: var(--warning, #d97706); }


/* چیپ‌های چندانتخابیِ نوع کاغذ + ستون نوع در جدول انتخاب رول */
.rp-types { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.rp-tlbl { font-size: 11.5px; font-weight: 600; color: var(--muted, #6b7686); }
.rp-chip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 13px; border-radius: 999px;
  border: 1px solid var(--border, #e5e8ef); background: var(--surface, #fff); color: var(--muted, #6b7686);
  font-family: inherit; font-size: 12px; font-weight: 600; cursor: pointer; transition: .14s; }
.rp-chip i { font-style: normal; font-size: 10.5px; padding: 1px 7px; border-radius: 999px;
  background: color-mix(in srgb, currentColor 15%, transparent); font-variant-numeric: tabular-nums; }
.rp-chip.on { border-color: var(--primary, #c1272d); color: var(--primary, #c1272d);
  background: color-mix(in srgb, var(--primary, #c1272d) 7%, var(--surface, #fff)); }
.rp-chip:not(.on) { opacity: .55; text-decoration: line-through; }
.rp-paper { white-space: nowrap; font-size: 11.5px; }
.rp-stat.dim b { font-size: 15px; opacity: .7; }
.rp-stat.dim span { opacity: .8; }

/* انتخاب‌شده ولی خارج از فیلتر — نه سبز، نه محو؛ کهربایی و هشداردار */
.rp-tbl tr.on.bad { background: color-mix(in srgb, var(--warning, #d97706) 10%, transparent); opacity: 1; }
.rp-tbl tr.on.bad .rp-no { color: var(--warning, #d97706); }

/* ردیف‌های کنارگذاشته‌شده: پنهان، ولی نه فراموش‌شده */
.rp-hint { display: flex; justify-content: flex-start; }
.rp-more { background: none; border: none; padding: 2px 0; cursor: pointer;
  font-family: inherit; font-size: 12px; font-weight: 600;
  color: var(--muted, #6b7686); text-decoration: underline; text-underline-offset: 3px; }
.rp-more:hover { color: var(--primary, #c1272d); }
.rp-empty td { padding: 22px 8px !important; text-align: center;
  font-size: 12.5px; color: var(--muted, #6b7686); }

/* رول‌های خارج از فاکتور — جایگزینی که بازرگانی آگاهانه انتخاب می‌کند */
.rp-div td { padding: 7px 10px !important; text-align: right;
  background: color-mix(in srgb, var(--warning, #d97706) 9%, var(--surface-2, #f8fafc));
  font-size: 11.5px; font-weight: 700; color: var(--warning, #d97706); }
.rp-tag.alt { background: color-mix(in srgb, var(--warning, #d97706) 13%, transparent); color: var(--warning, #d97706); }
.rp-tag.alt.sug { background: color-mix(in srgb, var(--primary, #c1272d) 12%, transparent); color: var(--primary, #c1272d); }
.rp-more.sug { color: var(--primary, #c1272d); font-weight: 700; }
.rp-hint { gap: 16px; }
.rp-stat.off b { color: var(--warning, #d97706); }

/* فیلترهای انتخاب رول: گروه‌بندی‌شده تا معیارها با هم قاطی نشوند */
.rp-grp { display: flex; align-items: flex-end; gap: 9px; padding: 0 11px;
  border-inline-end: 1px solid var(--border, #e5e8ef); position: relative; }
.rp-grp:last-of-type { border-inline-end: none; }
.rp-grp > b { position: absolute; top: -19px; inset-inline-start: 11px;
  font-size: 10px; font-weight: 700; letter-spacing: .3px; color: var(--muted, #6b7686); }
.rp-filters { padding-top: 22px; row-gap: 20px; }
.rp-f select { height: 34px; padding: 0 8px; border: 1px solid var(--border, #e5e8ef);
  border-radius: 8px; font-family: inherit; font-size: 12.5px;
  background: var(--surface, #fff); color: var(--text, #1f2733); }
.rp-f input { width: 84px; }
.rp-fchk { flex-direction: row; flex-wrap: wrap; gap: 4px 12px; max-width: 260px; }
.rp-dev .dw { font-weight: 800; }
.rp-dev .dm { color: var(--muted, #6b7686); font-weight: 400; }
.rp-dev .dx { color: var(--danger, #dc2626); text-decoration: line-through; }
.rp-none { font-size: 12px; color: var(--muted, #6b7686); }
.rp-paper .rp-sub { display: block; font-style: normal; font-size: 10.5px; font-weight: 700;
  color: var(--warning, #d97706); margin-top: 1px; }
.rp-paper .rp-sub.sug { color: var(--primary, #c1272d); }

/* پیشنهادِ «بدون تولید» روی کارت سفارش */
.lo-alt { display: inline-flex; align-items: center; gap: 5px; margin-top: 5px;
  padding: 3px 9px; border-radius: 999px; cursor: pointer; font-family: inherit; font-size: 11.5px; font-weight: 700;
  background: color-mix(in srgb, var(--success, #16a34a) 12%, transparent);
  color: var(--success, #16a34a); border: 1px solid color-mix(in srgb, var(--success, #16a34a) 30%, transparent); }
.lo-alt:hover { background: color-mix(in srgb, var(--success, #16a34a) 20%, transparent); }
.ap-body { display: flex; flex-direction: column; gap: 13px; }
.ap-head { display: flex; align-items: flex-end; gap: 18px; flex-wrap: wrap;
  padding: 11px 13px; border-radius: 11px;
  background: var(--surface-2, #f8fafc); border: 1px solid var(--border, #e5e8ef); }
.ap-sum { display: flex; align-items: baseline; gap: 6px; }
.ap-sum b { font-size: 20px; font-weight: 800; font-variant-numeric: tabular-nums; }
.ap-sum span { font-size: 11.5px; color: var(--muted, #6b7686); margin-inline-end: 8px; }
.ap-head p { flex: 1 1 260px; margin: 0; font-size: 11.5px; line-height: 1.8; color: var(--muted, #6b7686); }
.ap-grp h4 { display: flex; align-items: baseline; gap: 9px; margin: 0 0 6px; font-size: 13px; }
.ap-grp h4 i { font-style: normal; font-size: 11.5px; font-weight: 600; color: var(--muted, #6b7686); }
.ap-load { padding: 20px; text-align: center; font-size: 12.5px; color: var(--muted, #6b7686); }
.pl-dem-alt { display: flex; align-items: center; gap: 6px; margin-top: 6px;
  padding: 5px 10px; border-radius: 9px; font-size: 11.5px; font-weight: 600; line-height: 1.7;
  background: color-mix(in srgb, var(--success, #16a34a) 10%, transparent);
  color: var(--success, #16a34a); }
.ap-lims { display: flex; align-items: flex-end; gap: 9px; flex-wrap: wrap; }
.ap-lims input.over { border-color: var(--warning, #d97706);
  background: color-mix(in srgb, var(--warning, #d97706) 8%, var(--surface, #fff)); }
.ap-warn { display: flex; align-items: flex-start; gap: 8px; padding: 9px 12px; border-radius: 10px;
  font-size: 12px; line-height: 1.8;
  background: color-mix(in srgb, var(--warning, #d97706) 12%, transparent);
  color: var(--warning, #d97706); }
.lo-alt.wide { background: color-mix(in srgb, var(--warning, #d97706) 12%, transparent);
  color: var(--warning, #d97706); border-color: color-mix(in srgb, var(--warning, #d97706) 30%, transparent); }
.ap-sum i { font-style: normal; font-size: 11.5px; font-weight: 700; padding: 3px 10px; border-radius: 999px;
  margin-inline-start: 4px; background: color-mix(in srgb, var(--warning, #d97706) 14%, transparent);
  color: var(--warning, #d97706); }
.rp-tbl tr.outstd { background: color-mix(in srgb, var(--warning, #d97706) 8%, transparent); }
.lo-altbtn { color: var(--success, #16a34a); font-weight: 700;
  border-color: color-mix(in srgb, var(--success, #16a34a) 35%, transparent);
  background: color-mix(in srgb, var(--success, #16a34a) 9%, transparent); }
.lo-altbtn:hover { background: color-mix(in srgb, var(--success, #16a34a) 17%, transparent); }
.lo-altbtn.wide { color: var(--warning, #d97706);
  border-color: color-mix(in srgb, var(--warning, #d97706) 35%, transparent);
  background: color-mix(in srgb, var(--warning, #d97706) 10%, transparent); }
.lo-altbtn.wide:hover { background: color-mix(in srgb, var(--warning, #d97706) 18%, transparent); }

/* ایستگاه بارگیری: ستون کناریِ چپ برای نوبت‌ها و خبرها */
.ld-cols { display: flex; align-items: flex-start; gap: 16px; }
.ld-cols > .pfl-page { flex: 1 1 auto; min-width: 0; }
.ld-cols > .sl-wrap { flex: 0 0 320px; margin-bottom: 0;
  position: sticky; top: 12px; max-height: calc(100vh - 96px); overflow-y: auto;
  padding: 12px; border-radius: 13px;
  background: var(--surface-2, #f8fafc); border: 1px solid var(--border, #e5e8ef); }
/* در ستون باریک، کارت نوبت عمودی می‌شود تا متن له نشود */
.ld-cols .sl-card { flex-wrap: wrap; gap: 6px 10px; padding: 9px 11px; }
.ld-cols .sl-when { min-width: 0; text-align: start; display: flex; align-items: baseline; gap: 6px; }
.ld-cols .sl-b { flex: 1 1 100%; }
.ld-cols .sl-ev { flex-direction: column; align-items: flex-start; gap: 2px; }
.ld-cols .sl-head:not(:first-child) { margin-top: 14px; padding-top: 12px;
  border-top: 1px solid var(--border, #e5e8ef); }
@media (max-width: 1180px) {
  /* ستون که می‌شکند، نوبت‌ها باید *بالای* سفارش‌ها بمانند — نه پایینِ همه‌شان */
  .ld-cols { flex-direction: column; }
  .ld-cols > .sl-wrap { order: -1; flex: 1 1 auto; width: 100%; position: static; max-height: none; }
}
.sl-card.soon { border-inline-start-color: var(--primary, #c1272d); }
.sl-tag.soon { background: color-mix(in srgb, var(--primary, #c1272d) 13%, transparent); color: var(--primary, #c1272d); }
.sl-tag:not(.today):not(.overdue):not(.live):not(.soon) {
  background: var(--surface-2, #f8fafc); color: var(--muted, #6b7686);
  border: 1px solid var(--border, #e5e8ef); }

/* هشدار مازاد بارگیری */
.ov-box { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-radius: 12px;
  background: color-mix(in srgb, var(--danger, #dc2626) 12%, transparent);
  border: 1px solid color-mix(in srgb, var(--danger, #dc2626) 32%, transparent); color: var(--danger, #dc2626); }
.ov-box b { display: block; font-size: 16px; font-weight: 800; }
.ov-box span { font-size: 12.5px; }
.ov-rows { display: flex; gap: 8px; flex-wrap: wrap; }
.ov-row { flex: 1 1 130px; display: flex; flex-direction: column; gap: 3px; padding: 9px 12px;
  border-radius: 10px; background: var(--surface-2, #f8fafc); border: 1px solid var(--border, #e5e8ef); }
.ov-row span { font-size: 11px; color: var(--muted, #6b7686); }
.ov-row b { font-size: 15px; font-weight: 800; font-variant-numeric: tabular-nums; }
.ov-row.bad { background: color-mix(in srgb, var(--danger, #dc2626) 9%, transparent);
  border-color: color-mix(in srgb, var(--danger, #dc2626) 28%, transparent); }
.ov-row.bad b { color: var(--danger, #dc2626); }

/* تصویرهای بار و بارنامه */
.ph-gal { display: flex; flex-wrap: wrap; gap: 9px; align-items: flex-start; }
.ph-cell { position: relative; width: 104px; border-radius: 10px; overflow: hidden;
  border: 1px solid var(--border, #e5e8ef); background: var(--surface-2, #f8fafc); }
.ph-cell img { display: block; width: 100%; height: 74px; object-fit: cover; }
.ph-k { display: block; font-size: 10.5px; text-align: center; padding: 3px 2px; color: var(--muted, #6b7686); }
.ph-x { position: absolute; top: 3px; inset-inline-end: 3px; width: 20px; height: 20px; line-height: 1;
  border-radius: 50%; border: none; cursor: pointer; font-size: 14px; font-weight: 700;
  background: rgba(0,0,0,.55); color: #fff; }
.ph-add { display: inline-flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  width: 104px; height: 99px; border-radius: 10px; cursor: pointer; font-family: inherit; font-size: 11px;
  border: 1px dashed var(--border, #e5e8ef); background: var(--surface, #fff); color: var(--muted, #6b7686); }
.ph-add:hover { border-color: var(--primary, #c1272d); color: var(--primary, #c1272d); }
.ld-over { display: flex; align-items: center; gap: 7px; width: 100%; margin-bottom: 7px;
  padding: 8px 11px; border-radius: 9px; font-size: 12px; font-weight: 700; line-height: 1.7;
  background: color-mix(in srgb, var(--danger, #dc2626) 11%, transparent);
  color: var(--danger, #dc2626); }
.jc-d.off { opacity: .3; cursor: not-allowed; text-decoration: line-through; }
.pf-lbl-x.bad { color: var(--danger, #dc2626); font-weight: 700; }
.in-row input.bad, input.bad { border-color: var(--danger, #dc2626); }
/* بارگیریِ بیش از سفارش: نوار و درصد باید خودشان بگویند */
.lo-prog.over .lo-prog-in { background: var(--danger, #dc2626); }
.lo-pct.over { color: var(--danger, #dc2626); font-weight: 800; }
.ld-notruck { border-inline-start-color: var(--danger, #dc2626); }
.ld-notruck b { color: var(--danger, #dc2626); }
.ld-truck { display: flex; align-items: center; gap: 12px; padding: 9px 12px; border-radius: 10px;
  background: var(--surface-2, #f8fafc); border: 1px solid var(--border, #e5e8ef); }
.ld-truck-p { font-size: 14px; font-weight: 800; letter-spacing: .5px; padding: 5px 12px; border-radius: 8px;
  background: var(--surface, #fff); border: 1px solid var(--border, #e5e8ef); font-variant-numeric: tabular-nums; }
.ld-truck-b b { display: block; font-size: 13px; }
.ld-truck-b span { font-size: 11.5px; color: var(--muted, #6b7686); }

/* ── داشبورد ──────────────────────────────────────────────────────────────
 * الگو از صفحه‌ی خانه‌ی اپ مدیرعامل (public/ceo) — همان ترتیب و همان معنای
 * رنگ‌ها، ولی برای عرضِ دسکتاپ پهن شده: خطوط کنار هم، شش عدد در یک ردیف. */
.dash-card { margin-bottom: 16px; }
.dash-h { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
.dash-h b { font-size: 15px; font-weight: 800; }
.dash-h .spacer { flex: 1; }
.dash-sub { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.c-ok { color: var(--success); } .c-mid { color: var(--warning); } .c-bad { color: var(--danger); }

/* نوار زنده‌ی خطوط */
.dash-lines { display: grid; gap: 16px; margin-bottom: 16px; }
/* کارت خط زیر ~۴۹۰ پیکسل جا نمی‌شود و نام محصول بریده می‌شود */
@media (max-width: 1260px) { .dash-lines { grid-template-columns: 1fr !important; } }
.dash-line {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 14px 16px; display: flex; align-items: center; gap: 12px;
  position: relative; overflow: hidden; min-width: 0;
}
.dash-line::before { content: ""; position: absolute; inset-inline-start: 0; top: 0; bottom: 0; width: 4px; background: var(--c); }
.dash-line.l1 { --c: #e8892b; } .dash-line.l2 { --c: #4e79a7; }
.dash-line.stop { background: linear-gradient(90deg, #fff6f6, var(--surface)); }
.dash-line > i { width: 9px; height: 9px; border-radius: 50%; flex: 0 0 auto; }
.dash-line.run > i { background: var(--success); }
.dash-line.stop > i { background: var(--danger); }
.dash-line > u {
  text-decoration: none; font-size: 11.5px; font-weight: 800; color: #fff;
  border-radius: 7px; padding: 3px 8px; flex: 0 0 auto; background: var(--c);
}
.dash-line.l1 > u { background: #b3660f; } .dash-line.l2 > u { background: #3d6389; }
.dl-tx { flex: 1; min-width: 0; }
.dl-tx b { display: block; font-size: 14px; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dl-tx span { display: block; font-size: 11.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dl-sc { flex: 0 0 auto; text-align: center; min-width: 62px; }
.dl-sc b { display: block; font-size: 21px; font-weight: 800; line-height: 1.25; font-variant-numeric: tabular-nums; }
.dl-sc span { display: block; font-size: 10.5px; color: var(--muted); }
.dash-line em {
  font-style: normal; font-size: 12.5px; font-weight: 800; flex: 0 0 auto;
  font-variant-numeric: tabular-nums;
}
.dash-line em.run { color: var(--success); } .dash-line em.stop { color: var(--danger); }

/* شش عدد */
/* شش عدد در یک ردیف — نه پنج‌تا و یکی تنها در ردیف بعد */
.dash-nums { display: grid; grid-template-columns: repeat(6, 1fr); gap: 12px; }
@media (max-width: 1180px) { .dash-nums { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 620px) { .dash-nums { grid-template-columns: repeat(2, 1fr); } }
.dash-num { background: var(--surface-2); border-radius: 12px; padding: 16px 8px; text-align: center; }
.dash-num b { display: block; font-size: 30px; font-weight: 800; line-height: 1.2; font-variant-numeric: tabular-nums; }
.dash-num u { display: block; text-decoration: none; font-size: 12px; color: var(--muted); margin-top: 3px; }
.dash-num.hot { background: #fdeaea; } .dash-num.hot b { color: var(--danger); }
.dash-num.wt { background: #fdf1e0; } .dash-num.wt b { color: #a4620a; }

/* جای رزروشده‌ی انبار */
.dash-pend { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; }
.dash-pend div {
  border: 1.5px dashed #c9d1dd; border-radius: 12px; padding: 16px 8px;
  text-align: center; background: #fbfcfe;
}
.dash-pend b { display: block; font-size: 30px; font-weight: 800; line-height: 1.2; color: #c3cbd8; }
.dash-pend u { display: block; text-decoration: none; font-size: 12px; color: var(--muted); margin-top: 3px; }

/* آلارم‌های باز */
.dash-alarms { display: grid; grid-template-columns: repeat(auto-fit, minmax(330px, 1fr)); gap: 10px; }
.dash-al {
  display: flex; align-items: center; gap: 10px; border: 1px solid var(--border);
  border-radius: 12px; padding: 11px 13px; background: var(--surface-2); min-width: 0;
}
.dash-al > i { width: 9px; height: 9px; border-radius: 50%; flex: 0 0 auto; }
.dash-al.r { border-color: #f4cdcf; background: #fffafa; }
.dash-al.r > i { background: var(--danger); }
.dash-al.y > i { background: var(--warning); }
.da-t { flex: 1; min-width: 0; }
.da-t b { display: block; font-size: 13.5px; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.da-t span { display: block; font-size: 11.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.da-v { font-size: 15px; font-weight: 800; flex: 0 0 auto; font-variant-numeric: tabular-nums; }
.dash-al.r .da-v { color: var(--danger); } .dash-al.y .da-v { color: var(--warning); }

/* ── داشبورد: بخش‌های تازه ─────────────────────────────────────────────── */
.dash-nums.small b { font-size: 22px; }
.dash-nums.small { grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); }
.dash-num.hi { background: #fdf1e0; } .dash-num.hi b { color: #a4620a; }
.dash-num.seg.t-act b { color: var(--success); }
.dash-num.seg.t-late b { color: var(--warning); }
.dash-num.seg.t-risk b { color: #ea580c; }
.dash-num.seg.t-dead b { color: var(--danger); }

/* انبار محصول: خانه‌ی پرشده تو‌پر است، خانه‌ی بی‌داده خط‌چین */
.dash-pend div.has { border: 1px solid var(--border); border-style: solid; background: var(--surface-2); }
.dash-pend div.has b { color: var(--text); }

/* جدول‌های داشبورد */
.dash-tbl { width: 100%; }
.dash-tbl td, .dash-tbl th { vertical-align: middle; white-space: nowrap; }
.dash-tbl tr.former { opacity: 0.62; }
.dash-tbl .past {
  font-size: 10.5px; font-weight: 700; color: var(--muted); background: var(--surface-2);
  border-radius: 6px; padding: 1px 6px; margin-inline-start: 6px;
}
.sc-cell { display: flex; align-items: center; gap: 8px; min-width: 92px; }
.sc-cell b { font-size: 15px; font-weight: 800; font-variant-numeric: tabular-nums; min-width: 26px; }
.sc-cell .bar { flex: 1; margin-top: 0; }
.seg-tag { font-size: 11.5px; font-weight: 700; border-radius: 7px; padding: 2px 8px; }
.seg-tag.t-act { background: #e7f7ed; color: #15803d; }
.seg-tag.t-late { background: #fdf1e0; color: #a4620a; }
.seg-tag.t-risk { background: #ffedd5; color: #c2410c; }
.seg-tag.t-dead { background: #fdeaea; color: #b0202a; }

/* سفارش‌های در جریان */
.dash-ords { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 12px; }
.dash-ord {
  border: 1px solid var(--border); border-radius: 12px; padding: 11px 13px;
  position: relative; overflow: hidden; background: var(--surface-2); min-width: 0;
}
.dash-ord::before { content: ""; position: absolute; inset-inline-start: 0; top: 0; bottom: 0; width: 4px; background: var(--c); }
.dash-ord.ok { --c: var(--success); } .dash-ord.soon { --c: var(--warning); } .dash-ord.late { --c: var(--danger); }
.do-1 { display: flex; align-items: baseline; gap: 8px; }
.do-1 b { font-size: 13.5px; font-weight: 800; font-variant-numeric: tabular-nums; }
.do-1 span { font-size: 12.5px; color: var(--muted); flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.do-1 em { font-style: normal; font-size: 11.5px; font-weight: 700; color: var(--muted); }
.do-2 { display: flex; justify-content: space-between; gap: 8px; margin-top: 5px; font-size: 11.5px; color: var(--muted); font-variant-numeric: tabular-nums; }

/* یادداشت و هشدار داخل کارت */
.dash-note { margin-top: 10px; font-size: 11.5px; color: var(--muted); text-align: center; line-height: 1.9; }
.dash-warn {
  display: flex; gap: 9px; align-items: flex-start; background: #fdf1e0; color: #8a5208;
  border: 1px solid #f3ddb8; border-radius: 12px; padding: 10px 12px;
  font-size: 12.5px; line-height: 1.9; margin-top: 12px;
}
.dash-warn b { color: #7a4806; }
.dash-warn svg { color: #c47d0d; margin-top: 3px; flex: 0 0 auto; }

/* نوار قفلِ روز نوبت در ایستگاه بارگیری — تا امروز فقط اپ راننده این را داشت
   و انباردار نمی‌دانست چرا کارت باز نمی‌شود، و راهی هم برای بازکردنش نبود. */
.ld-lock { display: flex; align-items: center; gap: 8px; margin: 0 0 10px;
  padding: 9px 12px; border-radius: 10px; font-size: 12.5px; font-weight: 600;
  color: var(--warning); background: color-mix(in srgb, var(--warning) 10%, transparent);
  border: 1px solid color-mix(in srgb, var(--warning) 35%, transparent); }
.ld-lock svg { flex: none; }
.ld-lock .btn { flex: none; }

/* ردیفِ رولی که آسیب‌دیده گزارش شده — می‌ماند تا جایگزین بیاید، ولی بار نمی‌رود */
.ld-row-bad > td { opacity: .62; }
.ld-row-bad > td:first-child { position: relative; }
.ld-row-bad > td:first-child::before { content: ''; position: absolute; inset-inline-start: -6px;
  top: 6px; bottom: 6px; width: 3px; border-radius: 2px; background: var(--warning); }

/* جدول میانگین نرخ عرض‌ها — زیر جدول بررسی سفارشِ ماشین حساب مدیرعامل */
.pc-avg { margin-top: 18px; padding-top: 14px; border-top: 1px dashed var(--border); }
.pc-avg h4 { margin: 0 0 10px; font-size: 13px; font-weight: 600; }
.pc-avg .ps-note { margin: 8px 0 0; }
.pc-avg b { color: var(--primary); }
.pc-sug { width: 130px; font-weight: 600; text-align: right; }
.pc-avg td b { color: var(--text); }

/* جعبه‌های کلیک‌پذیر داشبورد — هر کدام به صفحه‌ی خودش با همان فیلتر می‌رود */
.dash-num.dash-click { cursor: pointer; transition: background .15s, transform .1s; }
.dash-num.dash-click:hover { background: var(--surface-3, #eef2f7); }
.dash-num.dash-click:active { transform: translateY(1px); }

/* ── ورود اطلاعات ─────────────────────────────────────────────────────────── */
.imp-intro { font-size: 13px; line-height: 2; color: var(--muted); margin-bottom: 14px; }
.imp-intro b { color: var(--text); }
.imp-pick { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.imp-fname { font-size: 12.5px; color: var(--muted); }

.imp-nums { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin: 16px 0; }
.imp-num { background: var(--surface-2); border-radius: 12px; padding: 14px 10px; text-align: center; }
.imp-num b { display: block; font-size: 26px; font-weight: 800; font-variant-numeric: tabular-nums; }
.imp-num u { display: block; text-decoration: none; font-size: 12.5px; margin-top: 3px; }
.imp-num i { display: block; font-style: normal; font-size: 11px; color: var(--muted); margin-top: 2px; }
.imp-num.ok b { color: var(--success); }
.imp-num.warn { background: #fdf1e0; } .imp-num.warn b { color: #a4620a; }
.imp-num.bad { background: #fdeaea; } .imp-num.bad b { color: var(--danger); }

.imp-warn, .imp-note, .imp-done {
  display: flex; align-items: flex-start; gap: 8px; padding: 11px 13px;
  border-radius: 10px; font-size: 12.5px; line-height: 1.9; margin-bottom: 12px;
}
.imp-warn { color: #a4620a; background: #fdf1e0; border: 1px solid #f0dcbb; }
.imp-note { color: var(--muted); background: var(--surface-2); display: block; }
.imp-done { color: var(--success); background: #eaf7ee; border: 1px solid #cfe9d8; }
.imp-warn svg, .imp-done svg { flex: none; margin-top: 2px; }

.imp-sheets { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12px; color: var(--muted); margin-bottom: 12px; }
.imp-sheets b { color: var(--text); }

.imp-sect { margin-top: 20px; }
.imp-sect h3 { font-size: 14px; margin: 0 0 4px; }
.imp-hint { font-size: 12px; color: var(--muted); margin: 0 0 8px; line-height: 1.9; }
.imp-tbl { font-size: 12.5px; }
.imp-tbl .imp-v { font-variant-numeric: tabular-nums; }
.imp-hash { font-family: ui-monospace, monospace; font-size: 11px; color: var(--muted); }
.imp-ok { color: var(--success); }
.imp-dim td { opacity: .6; }
.imp-list { display: grid; gap: 4px; font-size: 12.5px; color: var(--muted); }

.imp-apply {
  margin-top: 22px; padding: 14px; border-radius: 12px;
  background: var(--surface-2); display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
}
.imp-apply-t { flex: 1 1 260px; font-size: 12.5px; line-height: 1.9; }
.imp-apply input { flex: 1 1 240px; }

/* ── جمع و باز شدن منوی کناری ──────────────────────────────────────────────
 * روی صفحه‌های بزرگ، دکمه‌ی ☰ نوار بالا منو را تا عرض یک ریلِ آیکونی جمع می‌کند
 * تا فضای جدول‌های پهن بیشتر شود. انتخاب کاربر در localStorage می‌ماند.
 * روی موبایل/تبلت باریک (≤۸۶۰px) همان کشوی قبلی کار می‌کند، پس این قاعده‌ها
 * عمداً فقط از ۸۶۱px به بالا اعمال می‌شوند.
 * ───────────────────────────────────────────────────────────────────────── */
@media (min-width: 861px) {
  .sidebar { transition: width .16s ease; }
  .main { transition: margin-inline-start .16s ease; }

  body.nav-collapsed { --sidebar-w: var(--sidebar-w-min); }
  body.nav-collapsed .sidebar { width: var(--sidebar-w-min); overflow: hidden; }
  body.nav-collapsed .nav { padding: 12px 8px; }

  /* در حالت جمع فقط آیکون می‌ماند */
  body.nav-collapsed .brand-text,
  body.nav-collapsed .nav-group-title,
  body.nav-collapsed .sidebar-footer,
  body.nav-collapsed .nav-item > span:not(.ico) { display: none; }
  body.nav-collapsed .nav-mod > .nav-sub { display: none; }
  body.nav-collapsed .sidebar-brand { justify-content: center; padding: 18px 0; }
  body.nav-collapsed .nav-item { justify-content: center; padding: 10px 0; gap: 0; }

  /* وقتی منو جمع است، ماژولِ صفحه‌ی جاری باید از روی آیکونش پیدا باشد */
  body.nav-collapsed .nav-mod.cur > .nav-parent { background: var(--primary); color: #fff; }
}

/* با ماوس: نگه‌داشتن نشانگر روی ریل، منو را موقتاً روی محتوا باز می‌کند
   (روی صفحه‌های لمسی این حالت فعال نیست؛ آن‌جا فقط دکمه‌ی ☰ کار می‌کند) */
@media (min-width: 861px) and (hover: hover) {
  body.nav-collapsed .sidebar:hover {
    width: var(--sidebar-w-full); overflow: visible;
    box-shadow: 0 12px 34px rgba(8, 12, 20, 0.42);
  }
  body.nav-collapsed .sidebar:hover .brand-text,
  body.nav-collapsed .sidebar:hover .nav-group-title,
  body.nav-collapsed .sidebar:hover .sidebar-footer,
  body.nav-collapsed .sidebar:hover .nav-item > span:not(.ico) { display: block; }
  body.nav-collapsed .sidebar:hover .nav-mod.open > .nav-sub { display: block; }
  body.nav-collapsed .sidebar:hover .sidebar-brand { justify-content: flex-start; padding: 18px 20px; }
  body.nav-collapsed .sidebar:hover .nav-item { justify-content: flex-start; padding: 9px 12px; gap: 10px; }
  body.nav-collapsed .sidebar:hover .nav-mod.cur > .nav-parent { background: transparent; }
  body.nav-collapsed .sidebar:hover .nav-mod.cur.open > .nav-parent { background: transparent; }
}

/* ── انتخاب چندتاییِ مغایرت‌ها ─────────────────────────────────────────────── */
.imp-chips { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; margin: 0 0 10px; }
.imp-chip {
  padding: 5px 11px; border-radius: 999px; cursor: pointer; font-size: 12px; font-weight: 600;
  color: var(--muted); background: var(--surface-2); border: 1px solid transparent;
}
.imp-chip:hover { color: var(--text); }
.imp-chip.on { color: #fff; background: var(--primary); border-color: var(--primary); }

.imp-cb { width: 34px; }
.imp-cb input { width: 16px; height: 16px; cursor: pointer; accent-color: var(--primary); }
/* مقدارِ فایل همان چیزی است که قرار است بنشیند — پررنگ‌تر از مقدار فعلی */
.imp-tbl .imp-file { font-weight: 700; color: var(--text); }

.imp-selbar {
  position: sticky; bottom: 0; margin-top: 10px; padding: 11px 13px; border-radius: 12px;
  display: flex; align-items: center; gap: 10px; font-size: 12.5px;
  background: var(--surface-2); border: 1px solid var(--border);
}
.imp-selbar b { font-variant-numeric: tabular-nums; font-size: 15px; }

/* نوار «بیشتر» زیر جدول مغایرت‌ها */
.imp-more { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.imp-more:empty { display: none; }

/* ══ داشبورد کنترل کیفیت — «حالت تبلت» ════════════════════════════════════
 * تبلت افقیِ آزمایشگاه (Galaxy Tab A11: حدود ۱۰۰۵×۶۰۰ در Chrome).
 * بدون این حالت، زیر ۱۱۵۰px داشبورد تک‌ستونه می‌شد و خط ۲ زیر صفحه می‌رفت.
 * این‌جا: منو و نوار بالا پنهان، سرِ صفحه یک نوار نازک (زنگوله و «اتصال زنده»
 * می‌مانند)، دو خط همیشه کنار هم، فاصله‌ها و قلم‌ها جمع‌وجور، و شستیِ عدد
 * به‌جای بلند کردنِ ستون، روی نیمه‌ی پایینِ همان خط باز می‌شود.
 * فقط چیدمان است؛ هیچ داده یا منطقی عوض نمی‌شود.                          */
.qct-only { display: none; }
body.qct .qct-only { display: inline-flex; }
body.qct .sidebar, body.qct .topbar { display: none !important; }
body.qct .main { margin-inline-start: 0 !important; }
body.qct .content { padding: 5px 7px 7px; }
body.qct .page-head { margin-bottom: 5px; gap: 7px; flex-wrap: nowrap; }
body.qct .page-head h2 { font-size: 14px; }
body.qct .page-head .btn { padding: 4px 10px; font-size: 12px; }

body.qct .qcb { grid-template-columns: 1fr 1fr; gap: 7px; }
body.qct .qb-line { position: relative; border-radius: 12px; }

body.qct .qb-head { padding: 5px 9px; gap: 8px; }
body.qct .qb-tag { font-size: 12px; padding: 3px 9px; }
body.qct .qb-camp b { font-size: 13px; }
body.qct .qb-camp span { font-size: 10.5px; }
body.qct .qb-body { gap: 6px; padding: 6px; }

body.qct .qb-calm { padding: 4px 8px; font-size: 12px; }
body.qct .qb-consin { width: 84px; padding: 5px 8px; font-size: 14px; }
body.qct .qb-alarm { padding: 6px 9px; gap: 5px 9px; }
body.qct .qb-alarm-i { width: 28px; height: 28px; font-size: 17px; }
body.qct .qb-alarm-b b { font-size: 13px; }
body.qct .qb-alarm .live-t { font-size: 16px; }
body.qct .qb-alarm-go { padding: 7px 14px; }

body.qct .qb-roll { padding: 5px 10px; gap: 10px; border-radius: 11px; }
body.qct .qb-no { font-size: 22px; }
body.qct .qb-rmeta { font-size: 11px; line-height: 1.45; }
body.qct .qb-roll-r .live-t { font-size: 18px; }

body.qct .qb-rail { gap: 4px; }
body.qct .qb-step { padding: 3px 2px; font-size: 9.5px; line-height: 1.3; border-radius: 8px; }
body.qct .qb-step b { font-size: 11px; }

body.qct .qb-eh { padding: 5px 10px; font-size: 12px; }
body.qct .qb-tiles { grid-template-columns: repeat(3, 1fr); padding: 6px; gap: 6px; }
body.qct .qb-tile { min-height: 50px; padding: 4px 6px; }
body.qct .qb-tv { font-size: 17px; }
body.qct .qb-cta { padding: 0 6px 6px; gap: 6px; }
body.qct .qb-eh + .qb-cta { padding-top: 6px; }
body.qct .qb-big { padding: 10px 14px; font-size: 14px; }
body.qct .qb-wait { padding: 8px 10px; }
body.qct .qb-back { padding: 0 6px 6px; }

body.qct .qb-prof { padding: 5px 8px; }
body.qct .qb-profh { margin-bottom: 4px; font-size: 11px; }
body.qct .qb-profh b { font-size: 12.5px; }
body.qct .qb-cell { height: 24px; font-size: 10px; }
body.qct .qb-trend { margin-top: 5px; padding-top: 5px; }

body.qct .qb-foot { padding: 4px 8px; gap: 5px; }
body.qct .qb-fbtn { padding: 5px 9px; font-size: 11.5px; }

/* شستیِ عدد: روی نیمه‌ی پایینِ همان خط، تا خط کناری و بالای همین خط دیده بمانند */
body.qct .qb-padwrap:not(:empty) {
  position: absolute; inset-inline: 0; bottom: 0; z-index: 5;
  padding: 8px 10px 10px; background: var(--surface);
  border-top: 2px solid var(--primary); border-radius: 16px 16px 0 0;
  box-shadow: 0 -10px 30px rgba(8, 12, 20, 0.22);
}
body.qct .qb-disp { font-size: 24px; }
body.qct .qb-keys { gap: 6px; }
body.qct .qb-k { padding: 8px 0; font-size: 18px; }
body.qct .qb-opt { padding: 12px 8px; }

/* فشرده‌سازی دوم — اندازه‌گیری در ۱۰۰۵×۶۰۰: خطی که آلارم کانس دارد حدود ۶۰px
   از صفحه بلندتر بود (پاورقی دو ردیف می‌شد، هر مرحله‌ی ریل دو سطر بود).
   این‌ها آن فضا را برمی‌گردانند بدون این‌که هیچ نوشته یا دکمه‌ای حذف شود. */
body.qct .qb-body { gap: 4px; }
body.qct .page-head h2 { font-size: 13px; }
body.qct .qb-step { display: flex; align-items: baseline; justify-content: center; gap: 4px;
  white-space: nowrap; overflow: hidden; padding: 4px 2px; }
body.qct .qb-step b { display: inline; }
body.qct .qb-alarm-go { padding: 5px 14px; }
body.qct .qb-alarm > .qb-consin { padding: 4px 8px; }
body.qct .qb-big { padding: 7px 14px; }
body.qct .qb-cell { height: 20px; }
body.qct .qb-foot { flex-wrap: nowrap; }
body.qct .qb-foot > .spacer { display: none; }
body.qct .qb-sup { flex: 1 1 auto; }
body.qct .qb-supt b, body.qct .qb-supt span { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
body.qct .qb-fbtn { flex: 0 0 auto; padding: 4px 8px; }

/* ══ پایان پیچش: بازبینیِ ظاهر رول + توضیح عیب (openWoundReview) ════════════ */
.wr { display: flex; flex-direction: column; gap: 12px; }
.wr-q { font-size: 15px; font-weight: 700; }
.wr-hint { font-size: 12.5px; color: var(--muted); margin-top: -6px; }
.wr-grid { display: grid; grid-template-columns: max-content 1fr; gap: 8px 14px; align-items: center; }
.wr-l { font-size: 13.5px; font-weight: 600; color: var(--text); white-space: nowrap; }
.wr-l.changed::after { content: ' · تغییر کرد'; color: var(--warning); font-size: 11.5px; font-weight: 700; }
.wr-opts { display: flex; gap: 6px; flex-wrap: wrap; }
.wr-opt { min-height: 38px; padding: 6px 14px; border: 1.5px solid var(--border); border-radius: 10px;
  background: var(--surface); color: var(--text); font: inherit; font-size: 13.5px; cursor: pointer; }
.wr-opt.on.good { border-color: var(--success); background: color-mix(in srgb, var(--success) 12%, var(--surface)); color: var(--success); font-weight: 700; }
.wr-opt.on.bad { border-color: var(--danger); background: color-mix(in srgb, var(--danger) 12%, var(--surface)); color: var(--danger); font-weight: 700; }
.wr-nl { display: flex; flex-direction: column; gap: 4px; font-size: 13.5px; font-weight: 600; }
.wr-nl small { font-size: 11.5px; color: var(--muted); font-weight: 400; }
.wr-note { width: 100%; padding: 9px 11px; border: 1px solid var(--border); border-radius: 10px;
  font: inherit; font-size: 14px; resize: vertical; background: var(--surface); color: var(--text); }

/* ══ داشبورد کنترل کیفیت: اصلاحِ داده‌های یک فاز با نگه‌داشتنِ ۳ ثانیه‌ای (qbHold) ══ */
.qb-step.holdable { position: relative; overflow: hidden; cursor: pointer; touch-action: none;
  user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
/* نوارِ پرشونده: اپراتور ببیند نگه‌داشتن دارد کار می‌کند و چقدر مانده */
.qb-step.holding { box-shadow: inset 0 0 0 2px var(--warning); }
.qb-step.holding::after { content: ''; position: absolute; inset-inline-start: 0; bottom: 0; height: 4px; width: 0;
  background: var(--warning); animation: qbHoldFill 3s linear forwards; }
@keyframes qbHoldFill { to { width: 100%; } }
/* حالت اصلاح: نارنجی تا با ورودِ عادیِ فازِ جاری اشتباه گرفته نشود */
.qb-entry.fix { border-color: var(--warning); }
.qb-entry.fix > .qb-eh { background: var(--warning); color: #fff; }
.qb-fixclose { margin-inline-start: auto; padding: 5px 12px; border: 0; border-radius: 8px; background: #fff;
  color: var(--warning); font: inherit; font-size: 12.5px; font-weight: 800; cursor: pointer; }
.qb-fixhint { padding: 8px 12px 0; font-size: 12px; color: var(--muted); }
body.qct .qb-fixhint { padding: 5px 10px 0; font-size: 11px; }

/* ══ ایستگاه وایندر: خانه‌های عدد هرگز روی «عیب گزارش‌شده» نیفتند ════════════════
 * تخته ۹۰۰px ثابت است و در باکس رول فقط ردیفِ عددها کوچک می‌شود. وقتی دلیلِ کارت‌های
 * پایین سه‌خطی می‌شد (یا نوارِ هشدار می‌آمد)، جای این ردیف از محتوایش (۱۱۰px) کمتر
 * می‌شد و خانه‌ها از قابِ خودشان بیرون می‌زدند. سه لایه:
 *   ۱) بخش‌های متغیر سقف دارند: دلیلِ کارت همیشه دو خط، توضیحِ عیب حداکثر دو خط؛
 *   ۲) ردیفِ عددها با container query قدم‌به‌قدم جمع می‌شود و عدد خوانا می‌ماند؛
 *   ۳) در بدترین حالت خانه داخلِ قابِ خودش بریده می‌شود، نه روی ردیفِ بعد. */
.wb-nums { container-type: size; grid-template-rows: minmax(0, 1fr); }
.wb-n { min-height: 0; overflow: hidden; }
@container (max-height: 109px) {
  .wb-n { padding: 5px 10px 4px; }
  .wb-nl, .wb-nf { line-height: 1.25; }
  .wb-nv { font-size: 36px; }
}
@container (max-height: 86px) {
  .wb-nf { display: none; }         /* تایمرِ «منتظر» با قابِ نارنجیِ خانه هم پیداست */
  .wb-nv { font-size: 32px; }
}
@container (max-height: 62px) {
  .wb-n { flex-direction: row; align-items: center; }
  .wb-nv { font-size: 28px; }
}
/* دلیلِ کارت‌های «آخرین رول‌ها»: همیشه جای دقیقاً دو خط، تا ارتفاعِ ردیفِ پایین با داده نپرد */
.wb-rc-why { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden;
  height: calc(13.5px * 1.45 * 2); min-height: 0; }
/* ردیف عیب‌ها: قانونِ ردشده هم همین‌جاست؛ سقفِ ارتفاع تا باکس رول را نخورد */
.wb-defs { flex-wrap: wrap; row-gap: 6px; max-height: 96px; overflow: hidden; }
.wb-defs .wb-fail-i { width: 30px; height: 30px; font-size: 19px; }
.wb-dl.fail { font-size: 16px; font-weight: 800; color: #fecaca; }
.wb-dtag.note { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }
