/* ═══════════════════════════════════════════════════════════════════════════
   Detail Panel v2 - quick stats strip, status pills, mini band scale, direct
   reports preview, action chips, section heads with icons.
   Scope: .dp-v2-* classes. Legacy .dp-* + .dp-section untouched.
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── Quick-stats strip ─────────────────────────────────────────────────── */
/* 4 mini-tiles at top of body: Status, Reports, Layer, Compa.
   Reads at-a-glance, replaces having to scan plain text rows. */
.dp-v2-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(60px, 1fr));
  gap: 6px;
  margin: 0 0 10px;
  padding: 10px;
  background: linear-gradient(180deg, #FAFAFA 0%, #F5F5F5 100%);
  border: 1px solid #E5E7EB;
  border-radius: 8px;
}
.dp-v2-stat {
  text-align: center;
  padding: 4px 6px;
  border-right: 1px solid rgba(0,0,0,0.06);
  cursor: help;
}
.dp-v2-stat:last-child { border-right: 0; }
.dp-v2-stat-lbl {
  font-size: 8.5px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #6B7280;
  margin-bottom: 4px;
}
.dp-v2-stat-val {
  font-size: 16px;
  font-weight: 800;
  color: #111827;
  line-height: 1;
  letter-spacing: -0.02em;
}
.dp-v2-stat-val .dp-v2-pill { font-size: 10px; }

/* ── Status & span-status pills ────────────────────────────────────────── */
.dp-v2-pill {
  display: inline-block;
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: 0.04em;
  padding: 2px 8px;
  border-radius: 11px;
  text-transform: capitalize;
  white-space: nowrap;
  line-height: 1.4;
}

/* ── Cross-reference badges ────────────────────────────────────────────── */
/* Surfaces signals from other modules so the user doesn't have to click
   through to find them: HC pending for this position, succession-slate
   membership of the incumbent, recent disposition/status changes.
   Each badge sits between QuickStats and QuickActions and is clickable
   (where applicable) to jump into the relevant tab. */
.dp-v2-xrefs {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 0 0 12px;
}
.dp-v2-xref {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  background: #FFFFFF;
  border: 1px solid #E5E7EB;
  border-left: 3px solid #D1D5DB;
  border-radius: 6px;
  font-family: inherit;
  font-size: 11px;
  font-weight: 600;
  color: #374151;
  text-align: left;
  width: 100%;
  transition: all 0.12s ease;
}
button.dp-v2-xref { cursor: pointer; }
button.dp-v2-xref:hover {
  background: #F9FAFB;
  border-color: #9CA3AF;
}
button.dp-v2-xref:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px rgba(21, 101, 192, 0.18);
}
.dp-v2-xref-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: 4px;
  background: var(--xref-accent, #6B7280);
  color: #FFFFFF;
  font-size: 11px;
  font-weight: 800;
  flex: 0 0 20px;
}
.dp-v2-xref-label {
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.dp-v2-xref-arrow {
  flex: 0 0 auto;
  color: #D1D5DB;
  font-size: 14px;
  transition: color 0.12s ease, transform 0.12s ease;
}
button.dp-v2-xref:hover .dp-v2-xref-arrow {
  color: #4B5563;
  transform: translateX(2px);
}

/* HC-pending: blue accent - actionable workflow context */
.dp-v2-xref-hc {
  border-left-color: #1565C0;
  --xref-accent: #1565C0;
  background: linear-gradient(90deg, rgba(21, 101, 192, 0.04), transparent 60%);
}
.dp-v2-xref-hc:hover { background: rgba(21, 101, 192, 0.08); }
.dp-v2-xref-hc .dp-v2-xref-label { color: #111827; }

/* Slate (this position has its own slate): purple */
.dp-v2-xref-slate {
  border-left-color: #7C3AED;
  --xref-accent: #7C3AED;
  background: linear-gradient(90deg, rgba(124, 58, 237, 0.04), transparent 60%);
}
.dp-v2-xref-slate:hover { background: rgba(124, 58, 237, 0.08); }

/* Successor (this person on someone else's slate): amber */
.dp-v2-xref-succ {
  border-left-color: #F59E0B;
  --xref-accent: #F59E0B;
  background: linear-gradient(90deg, rgba(245, 158, 11, 0.04), transparent 60%);
}
.dp-v2-xref-succ:hover { background: rgba(245, 158, 11, 0.08); }

/* Recent change: green (informational only, not clickable) */
.dp-v2-xref-recent {
  border-left-color: #059669;
  --xref-accent: #059669;
  background: linear-gradient(90deg, rgba(5, 150, 105, 0.04), transparent 60%);
  cursor: default;
}

/* ── Quick-action chips ────────────────────────────────────────────────── */
/* Sit just under the dark header. One-click affordances for common nav. */
.dp-v2-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin: 0 0 12px;
}
.dp-v2-action {
  flex: 0 0 auto;
  padding: 4px 10px;
  border: 1px solid #D1D5DB;
  background: #FFFFFF;
  border-radius: 14px;
  font-size: 10.5px;
  font-weight: 700;
  font-family: inherit;
  color: #4B5563;
  cursor: pointer;
  letter-spacing: 0.02em;
  transition: all 0.12s ease;
}
.dp-v2-action:hover {
  background: #F3F4F6;
  border-color: #9CA3AF;
  color: #111827;
}
.dp-v2-action:active {
  transform: scale(0.97);
}

/* ── Section header v2 (icon + accent) ─────────────────────────────────── */
/* Replaces old .dp-section flat colored bar. CSS var --accent on the head
   drives the icon color and the bottom border. */
.dp-v2-section-head {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 9.5px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #111827;
  padding: 6px 0 5px;
  border-bottom: 2px solid var(--accent, #D1D5DB);
  margin-bottom: 8px;
}
.dp-v2-section-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 4px;
  background: var(--accent, #D1D5DB);
  color: #FFFFFF;
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
  flex: 0 0 18px;
}

/* ── Compensation band-position scale (mini) ───────────────────────────── */
.dp-v2-bandscale {
  margin: 8px 0 12px;
  padding: 28px 6px 6px;
  position: relative;
}
.dp-v2-bs-labels {
  position: absolute;
  top: 0;
  left: 6px;
  right: 6px;
  height: 22px;
}
.dp-v2-bs-labels span {
  position: absolute;
  font-size: 9px;
  font-weight: 700;
  color: #6B7280;
  white-space: nowrap;
  transform: translateX(-50%);
}
.dp-v2-bs-labels .dp-v2-bs-mid {
  color: #111827;
  font-weight: 800;
}
.dp-v2-bs-track {
  position: relative;
  height: 8px;
  background: #F3F4F6;
  border-radius: 4px;
  margin: 0 0 8px;
}
.dp-v2-bs-band {
  position: absolute;
  top: 0;
  bottom: 0;
  background: linear-gradient(90deg, #D1FAE5 0%, #A7F3D0 50%, #D1FAE5 100%);
  border-radius: 4px;
}
.dp-v2-bs-tick {
  position: absolute;
  top: -2px;
  bottom: -2px;
  width: 1.5px;
  background: #6B7280;
  transform: translateX(-50%);
}
.dp-v2-bs-tick-mid {
  background: #111827;
  width: 2px;
  top: -4px;
  bottom: -4px;
}
.dp-v2-bs-dot {
  position: absolute;
  top: -4px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  transform: translateX(-50%);
  z-index: 2;
  cursor: help;
  transition: transform 0.12s ease;
}
.dp-v2-bs-dot:hover { transform: translateX(-50%) scale(1.3); }
.dp-v2-bs-caption {
  font-size: 11px;
  color: #4B5563;
}

/* ── Direct reports preview ────────────────────────────────────────────── */
.dp-v2-reports {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.dp-v2-report {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  border-radius: 5px;
  border: 1px solid #F3F4F6;
  background: #FAFAFA;
  cursor: pointer;
  transition: all 0.12s ease;
}
.dp-v2-report:hover {
  border-color: #D97706;
  background: #FFFBEB;
}
.dp-v2-report-info {
  flex: 1;
  min-width: 0;
}
.dp-v2-report-name {
  font-size: 11px;
  font-weight: 700;
  color: #111827;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.dp-v2-report-title {
  font-size: 9.5px;
  color: #6B7280;
  margin-top: 1px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.dp-v2-report-span {
  flex: 0 0 auto;
  font-size: 9.5px;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 9px;
  background: #E5E7EB;
  color: #374151;
  letter-spacing: 0.04em;
  cursor: help;
}
.dp-v2-report-span::after {
  content: ' ⊕';
  font-size: 8px;
  color: #9CA3AF;
}
.dp-v2-report-more {
  font-size: 10px;
  font-weight: 600;
  color: #9CA3AF;
  text-align: center;
  padding: 4px 0 2px;
  font-style: italic;
}
