/* Staff operations dashboard — index.html */
.staff-dash {
  margin-bottom: 1.75rem;
  padding: 1.35rem 1.4rem 1.5rem;
  border-radius: 22px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.94) 0%, rgba(248, 250, 252, 0.88) 100%);
  border: 1px solid rgba(148, 163, 184, 0.35);
  box-shadow:
    0 22px 50px rgba(15, 23, 42, 0.08),
    0 0 0 1px rgba(255, 255, 255, 0.65) inset;
  backdrop-filter: blur(10px);
}

.staff-dash__head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.staff-dash__intro {
  display: flex;
  align-items: center;
  gap: 1rem;
  min-width: 0;
}

.staff-dash__badge {
  flex-shrink: 0;
  width: 3.5rem;
  height: 3.5rem;
  display: grid;
  place-items: center;
  border-radius: 18px;
  background: linear-gradient(135deg, #2563eb 0%, #7c3aed 100%);
  color: #fff;
  font-size: 1.45rem;
  box-shadow: 0 10px 24px rgba(37, 99, 235, 0.35);
}

.staff-dash__title {
  margin: 0;
  font-family: "Plus Jakarta Sans", Inter, system-ui, sans-serif;
  font-size: clamp(1.15rem, 2.4vw, 1.45rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #0f172a;
}

.staff-dash__sub {
  margin: 0.2rem 0 0;
  font-size: 0.875rem;
  color: #64748b;
  max-width: 42ch;
}

.staff-dash__month {
  display: grid;
  gap: 0.25rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #64748b;
}

.staff-dash__month input {
  padding: 0.45rem 0.55rem;
  border-radius: 10px;
  border: 1px solid #cbd5e1;
  background: #fff;
  font: inherit;
  font-size: 0.875rem;
  font-weight: 600;
  color: #0f172a;
}

.staff-dash__goal {
  margin-bottom: 1.15rem;
  padding: 1rem 1.1rem;
  border-radius: 16px;
  background: linear-gradient(90deg, #eff6ff 0%, #f5f3ff 55%, #fdf4ff 100%);
  border: 1px solid rgba(99, 102, 241, 0.18);
}

.staff-dash__goal-label {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin: 0 0 0.65rem;
  font-size: 0.8125rem;
  font-weight: 700;
  color: #4338ca;
}

.staff-dash__goal-label span {
  font-weight: 600;
  color: #64748b;
}

.staff-dash__track {
  position: relative;
  height: 2.75rem;
  margin: 0 0.15rem;
}

.staff-dash__track-rail {
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: 10px;
  transform: translateY(-50%);
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.25);
  overflow: hidden;
}

.staff-dash__track-fill {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #3b82f6 0%, #8b5cf6 70%, #ec4899 100%);
  transition: width 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

.staff-dash__runner {
  position: absolute;
  top: 50%;
  transform: translate(-50%, -58%);
  width: 2.35rem;
  height: 2.35rem;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #fff;
  color: #2563eb;
  font-size: 1.15rem;
  box-shadow: 0 8px 20px rgba(37, 99, 235, 0.28);
  transition: left 0.6s cubic-bezier(0.22, 1, 0.36, 1);
  z-index: 2;
}

.staff-dash__target {
  position: absolute;
  right: -0.15rem;
  top: 50%;
  transform: translateY(-50%);
  width: 2.1rem;
  height: 2.1rem;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(135deg, #f59e0b, #ef4444);
  color: #fff;
  font-size: 0.95rem;
  box-shadow: 0 6px 16px rgba(239, 68, 68, 0.35);
  z-index: 1;
}

.staff-dash__goal-note {
  margin: 0.55rem 0 0;
  font-size: 0.78rem;
  color: #64748b;
}

.staff-dash__kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.staff-dash__kpi {
  position: relative;
  overflow: hidden;
  padding: 0.95rem 1rem;
  border-radius: 16px;
  border: 1px solid rgba(148, 163, 184, 0.28);
  background: #fff;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.05);
}

.staff-dash__kpi::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  border-radius: 4px 0 0 4px;
  background: var(--staff-kpi-accent, #64748b);
}

.staff-dash__kpi--works {
  --staff-kpi-accent: #2563eb;
}
.staff-dash__kpi--bill {
  --staff-kpi-accent: #059669;
}
.staff-dash__kpi--commission {
  --staff-kpi-accent: #7c3aed;
}
.staff-dash__kpi--mistake {
  --staff-kpi-accent: #dc2626;
}

.staff-dash__kpi-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.35rem;
  margin-bottom: 0.45rem;
}

.staff-dash__kpi-icon {
  width: 2rem;
  height: 2rem;
  display: grid;
  place-items: center;
  border-radius: 10px;
  font-size: 0.9rem;
  background: color-mix(in srgb, var(--staff-kpi-accent) 12%, white);
  color: var(--staff-kpi-accent);
}

.staff-dash__kpi-tag {
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #94a3b8;
}

.staff-dash__kpi-value {
  display: block;
  font-family: "Plus Jakarta Sans", Inter, system-ui, sans-serif;
  font-size: clamp(1.05rem, 2vw, 1.25rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #0f172a;
}

.staff-dash__kpi-label {
  display: block;
  margin-top: 0.15rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: #64748b;
}

.staff-dash__chart-card {
  padding: 1rem 1.05rem 1.1rem;
  border-radius: 16px;
  background: #fff;
  border: 1px solid rgba(148, 163, 184, 0.28);
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.04);
}

.staff-dash__chart-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.85rem;
}

.staff-dash__chart-title {
  margin: 0;
  font-size: 0.875rem;
  font-weight: 800;
  color: #0f172a;
}

.staff-dash__legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  font-size: 0.72rem;
  font-weight: 700;
  color: #64748b;
}

.staff-dash__legend span {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

.staff-dash__legend i {
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 2px;
  display: inline-block;
}

.staff-dash__legend .leg-commission i {
  background: #8b5cf6;
}
.staff-dash__legend .leg-mistake i {
  background: #ef4444;
}

.staff-dash__chart {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 0.55rem;
  align-items: end;
  min-height: 9rem;
  padding-top: 0.35rem;
}

.staff-dash__col {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  min-width: 0;
}

.staff-dash__bars {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 3px;
  width: 100%;
  height: 7rem;
}

.staff-dash__bar {
  width: 42%;
  min-height: 4px;
  border-radius: 6px 6px 2px 2px;
  transition: height 0.45s ease;
}

.staff-dash__bar--commission {
  background: linear-gradient(180deg, #a78bfa 0%, #7c3aed 100%);
}

.staff-dash__bar--mistake {
  background: linear-gradient(180deg, #f87171 0%, #dc2626 100%);
}

.staff-dash__col-label {
  font-size: 0.68rem;
  font-weight: 700;
  color: #64748b;
  text-align: center;
}

.staff-dash__col--current .staff-dash__col-label {
  color: #2563eb;
}

.staff-dash__deductions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-top: 0.85rem;
  padding-top: 0.85rem;
  border-top: 1px dashed #e2e8f0;
}

.staff-dash__deduction-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.4rem 0.7rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  color: #334155;
}

.staff-dash__deduction-pill i {
  opacity: 0.85;
}

.staff-dash__goal-note {
  margin: 0.65rem 0 0;
  font-size: 0.8125rem;
  color: #64748b;
}

.staff-dash__bonus {
  margin-bottom: 1.1rem;
}

.staff-dash__bonus-card {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 0.85rem;
  padding: 1rem 1.1rem;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(254, 249, 195, 0.55) 0%, rgba(255, 255, 255, 0.92) 45%, rgba(219, 234, 254, 0.5) 100%);
  border: 1px solid rgba(251, 191, 36, 0.35);
  box-shadow: 0 12px 28px rgba(245, 158, 11, 0.1);
}

.staff-dash__bonus-card strong {
  display: block;
  font-size: 0.95rem;
  color: #0f172a;
}

.staff-dash__bonus-card p {
  margin: 0.15rem 0 0;
  font-size: 0.8125rem;
  color: #475569;
  line-height: 1.45;
}

.staff-dash__bonus-card--off,
.staff-dash__bonus-card--wait {
  background: rgba(248, 250, 252, 0.9);
  border-color: rgba(148, 163, 184, 0.35);
  box-shadow: none;
}

.staff-dash__bonus-card--live {
  border-color: rgba(34, 197, 94, 0.35);
  background: linear-gradient(135deg, rgba(240, 253, 244, 0.95) 0%, rgba(255, 255, 255, 0.92) 100%);
}

.staff-dash__bonus-card--paid {
  border-color: rgba(59, 130, 246, 0.35);
  background: linear-gradient(135deg, rgba(239, 246, 255, 0.95) 0%, rgba(255, 255, 255, 0.92) 100%);
}

.staff-dash__bonus-card--preview {
  border-color: rgba(245, 158, 11, 0.35);
  background: linear-gradient(135deg, rgba(255, 251, 235, 0.95) 0%, rgba(255, 255, 255, 0.92) 100%);
}

.staff-dash__bonus-card--track {
  border-color: rgba(251, 191, 36, 0.4);
}

.staff-dash__bonus-head {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.75rem;
  align-items: center;
}

.staff-dash__bonus-head strong,
.staff-dash__bonus-amount strong {
  display: block;
  font-size: 0.95rem;
  color: #0f172a;
}

.staff-dash__bonus-head p,
.staff-dash__bonus-amount p {
  margin: 0.15rem 0 0;
  font-size: 0.8125rem;
  color: #475569;
}

.staff-dash__bonus-amount {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.75rem;
  align-items: center;
  padding: 0.75rem 0.85rem;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(148, 163, 184, 0.25);
}

.staff-dash__bonus-amount--live {
  border-color: rgba(34, 197, 94, 0.35);
  background: rgba(240, 253, 244, 0.85);
}

.staff-dash__bonus-amount--paid {
  border-color: rgba(59, 130, 246, 0.35);
  background: rgba(239, 246, 255, 0.9);
}

.staff-dash__bonus-amount--preview {
  border-color: rgba(245, 158, 11, 0.35);
  background: rgba(255, 251, 235, 0.9);
}

.staff-dash__bonus-amount em {
  font-style: normal;
  font-weight: 800;
  color: #0f172a;
}

.staff-dash__bonus-emoji {
  font-size: 1.65rem;
  line-height: 1;
}

.staff-dash__bonus-emoji-lg {
  font-size: 2rem;
  line-height: 1;
}

.staff-dash__loading {
  padding: 2rem 1rem;
  text-align: center;
  color: #64748b;
  font-size: 0.875rem;
}

@media (max-width: 960px) {
  .staff-dash__kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 520px) {
  .staff-dash {
    padding: 1rem;
  }

  .staff-dash__kpis {
    grid-template-columns: 1fr;
  }

  .staff-dash__chart {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    row-gap: 0.85rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .staff-dash__track-fill,
  .staff-dash__runner,
  .staff-dash__bar {
    transition: none;
  }
}

.dash-staff-dash-admin {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.85rem 1rem;
  margin: 0 0 1.25rem;
  padding: 0.85rem 1rem;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(148, 163, 184, 0.35);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
}

.dash-staff-dash-admin__copy {
  display: grid;
  gap: 0.15rem;
}

.dash-staff-dash-admin__copy strong {
  font-size: 0.92rem;
  color: #0f172a;
}

.dash-staff-dash-admin__copy span {
  font-size: 0.78rem;
  color: #64748b;
}

.dash-staff-dash-admin__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.dash-staff-dash-admin__btn--active {
  border-color: rgba(37, 99, 235, 0.45) !important;
  background: rgba(239, 246, 255, 0.95) !important;
  color: #1d4ed8 !important;
}

html.tasleem-staff-session:not([data-staff-dash-staff-visible="true"]) #staffDash,
html[data-staff-dash-staff-visible="false"] #staffDash {
  display: none !important;
}
