/* =========================================================
   أفضل الصنايعية / Ranking (بند 16) - Top 3 بتمييز واضح + بقية
   الصنايعية بالكارت الموحّد (.svc-card من global.css) داخل .workers-grid
   ========================================================= */

.top-workers-intro { margin: 0 0 14px; color: var(--text-muted); font-size: 12.5px; font-weight: 800; line-height: 1.7; }

/* فلتر الحرفة - شرائح أفقية قابلة للـ Scroll */
.trade-filter-row { display: flex; align-items: center; gap: 8px; overflow-x: auto; padding-bottom: 4px; margin-bottom: 16px; scrollbar-width: thin; }
.trade-filter-row::-webkit-scrollbar { height: 6px; }
.trade-filter-chip {
  flex: 0 0 auto; border: 1.5px solid var(--color-border); background: var(--color-surface); color: var(--text-secondary);
  border-radius: var(--radius-full); padding: 7px 14px; font-family: inherit; font-weight: 800; font-size: 12px;
  cursor: pointer; white-space: nowrap; transition: 0.2s ease;
}
.trade-filter-chip:hover { border-color: var(--color-primary); }
.trade-filter-chip.active { background: var(--color-primary); border-color: var(--color-primary); color: #fff; }

/* Top 3 */
.top3-section { margin-bottom: 22px; }
.top3-grid { display: grid; grid-template-columns: 1fr; gap: 10px; }
.top3-card {
  position: relative; display: flex; align-items: center; gap: 12px;
  background: var(--color-surface); border-radius: var(--radius-lg); padding: 14px;
  box-shadow: var(--shadow-sm); border: 1.5px solid var(--color-border); cursor: pointer;
  transition: transform var(--duration-base) ease, box-shadow var(--duration-base) ease;
}
.top3-card:hover { transform: translateY(-2px); }
.top3-card:active { transform: scale(0.98); }
.top3-rank-1 { border-color: rgba(245,158,11,.5); background: linear-gradient(135deg, rgba(245,158,11,.08), rgba(255,255,255,0)); box-shadow: 0 10px 24px rgba(245,158,11,.16); }
.top3-rank-2 { border-color: rgba(148,163,184,.55); background: linear-gradient(135deg, rgba(148,163,184,.10), rgba(255,255,255,0)); }
.top3-rank-3 { border-color: rgba(180,83,9,.4); background: linear-gradient(135deg, rgba(180,83,9,.08), rgba(255,255,255,0)); }

.top3-medal { flex-shrink: 0; font-size: 30px; line-height: 1; width: 42px; text-align: center; }
.top3-avatar { position: relative; width: 54px; height: 54px; border-radius: 50%; overflow: hidden; flex-shrink: 0; background: #dbeafe; }
.top3-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }

.top3-info { flex: 1; min-width: 0; }
.top3-name { margin: 0; font-size: 14.5px; font-weight: 900; color: var(--text-primary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.top3-trade { font-size: 11.5px; font-weight: 700; color: var(--text-secondary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.top3-metrics { display: flex; align-items: center; gap: 8px; margin-top: 3px; font-size: 10.5px; font-weight: 800; color: var(--text-muted); flex-wrap: wrap; }
.top3-metrics i { color: var(--gold); font-size: 10px; }
.top3-metrics .top3-dot { color: var(--color-border); font-weight: 400; }

.top3-view-btn {
  flex-shrink: 0; min-height: 32px; padding: 0 12px; border: 0; border-radius: var(--radius-sm);
  background: var(--color-primary); color: #fff; font-family: inherit; font-weight: 900; font-size: 11.5px; cursor: pointer;
}

.top-workers-rest-head { margin: 4px 0 12px; font-size: 15px; font-weight: 900; color: var(--text-primary); }

.top-workers-empty { border: 1px dashed rgba(148,163,184,.65); border-radius: var(--radius-md); padding: 20px; color: var(--text-muted); background: var(--color-surface-soft); font-weight: 900; text-align: center; }

@media (min-width: 640px) {
  .top3-grid { grid-template-columns: repeat(3, 1fr); }
  .top3-card { flex-direction: column; text-align: center; }
  .top3-info { width: 100%; }
  .top3-name, .top3-trade { white-space: normal; }
  .top3-metrics { justify-content: center; }
  .top3-view-btn { width: 100%; }
}
