/* ==========================================================
   لوحة الإشراف — تخصيصات
   ========================================================== */

.boot-screen {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  background: var(--bg-body);
  z-index: 60;
}

.user-chip { display: flex; align-items: center; gap: var(--sp-2); }
.user-meta { display: flex; flex-direction: column; line-height: 1.25; }
.user-name { font-size: var(--fs-xs); font-weight: var(--fw-bold); color: var(--text-strong); }
.user-role { font-size: var(--fs-2xs); color: var(--text-muted); }
@media (max-width: 900px) { .user-meta { display: none; } }

/* ---------- صفوف الفريق ---------- */
.team-row {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  padding: var(--sp-2) var(--sp-3);
  border-bottom: 1px solid var(--border-subtle);
}
.team-row:last-child { border-bottom: 0; }
.team-name { font-size: var(--fs-sm); font-weight: var(--fw-medium); color: var(--text-strong); }
.team-meta { font-size: var(--fs-2xs); color: var(--text-muted); }
.load-pill {
  min-width: 30px;
  text-align: center;
  padding: 1px var(--sp-2);
  border-radius: var(--r-full);
  font-size: var(--fs-2xs);
  font-weight: var(--fw-bold);
  background: var(--bg-surface-3);
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}
.load-pill.busy { background: var(--warning-50); color: var(--warning-700); }
.load-pill.full { background: var(--danger-50); color: var(--danger-600); }

/* ---------- صفوف المكالمات ---------- */
.call-row {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  padding: var(--sp-2) var(--sp-3);
  border-bottom: 1px solid var(--border-subtle);
  font-size: var(--fs-sm);
}
.call-row:last-child { border-bottom: 0; }

/* ---------- تمييز التنبيه ---------- */
tr.alerted { animation: alertFlash 2.4s ease-out 2; }
@keyframes alertFlash {
  0%, 100% { background: transparent; }
  40% { background: var(--danger-50); }
}

/* ---------- المخططات ---------- */
.chart-bars { display: flex; align-items: flex-end; gap: 5px; height: 150px; }
.chart-col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: var(--sp-1); min-width: 0; }
.chart-stack { width: 100%; display: flex; flex-direction: column; justify-content: flex-end; height: 130px; }
.chart-bar {
  width: 100%;
  background: var(--accent);
  border-radius: var(--r-xs) var(--r-xs) 0 0;
  min-height: 2px;
  transition: height var(--t-slow);
}
.chart-bar.closed { background: var(--teal-500); border-radius: 0; }
.chart-label {
  font-size: 9px;
  color: var(--text-subtle);
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  white-space: nowrap;
}
.legend { display: flex; gap: var(--sp-4); justify-content: center; margin-top: var(--sp-3); font-size: var(--fs-2xs); color: var(--text-muted); }
.legend span { display: flex; align-items: center; gap: var(--sp-1); }
.legend i { width: 10px; height: 10px; border-radius: 2px; display: inline-block; }

.hbar-row { display: flex; align-items: center; gap: var(--sp-3); margin-bottom: var(--sp-3); font-size: var(--fs-xs); }
.hbar-row .hbar-name { width: 120px; flex: none; }
.hbar-row .hbar-track { flex: 1; height: 9px; background: var(--bg-surface-3); border-radius: var(--r-full); overflow: hidden; }
.hbar-row .hbar-fill { height: 100%; background: var(--accent); border-radius: var(--r-full); }
.hbar-row .hbar-fill.gold { background: var(--gold-400); }
.hbar-row .hbar-val { width: 44px; text-align: left; flex: none; font-variant-numeric: tabular-nums; color: var(--text-muted); }

.unhappy-item {
  padding: var(--sp-3);
  border-bottom: 1px solid var(--border-subtle);
  font-size: var(--fs-xs);
}
.unhappy-item:last-child { border-bottom: 0; }

.hours-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--sp-2) var(--sp-3);
  border-bottom: 1px solid var(--border-subtle);
  font-size: var(--fs-sm);
}
.hours-row:last-child { border-bottom: 0; }
.hours-row.today { background: var(--accent-soft); font-weight: var(--fw-medium); }

.text-2xs { font-size: var(--fs-2xs); }
.sortable { cursor: pointer; user-select: none; }
.sortable::after { content: ' ↕'; opacity: 0.4; font-size: 10px; }

@media print {
  .sidebar, .header, .page-head, .sidebar-foot { display: none !important; }
  .app { display: block; height: auto; }
  .main-scroll { overflow: visible; padding: 0; }
  .card, .table-wrap { break-inside: avoid; box-shadow: none; }
  body { background: #fff; }
}
