/* PLAYER.ID Academy Workspace -- Dark Theme V1
   Scoped entirely under html[data-theme="dark"] #adminPanel#adminPanel#adminPanel.academy-workspace-shell
   so none of this can affect the Developer or Coach workspaces (which render
   under a different ancestor class, or -- for Developer -- never carry a
   data-theme attribute at all today).

   Approach: redefine the existing --academy-* custom properties (already
   consumed ~220 times across the Academy shell and pane CSS) for the dark
   palette, then add explicit overrides only where a color was hardcoded
   instead of using one of those variables. */

html[data-theme="dark"] #adminPanel#adminPanel#adminPanel.academy-workspace-shell {
  /* --academy-navy and --academy-cobalt are deliberately left untouched:
     they double as the sidebar/mobile-topbar gradient background (which is
     already dark and looks correct in both themes) AND, in ~60 other rules,
     as a text/"ink" color for headings. Redefining them here would either
     wash out the sidebar gradient or -- as shipped in an earlier pass --
     make every heading that reads color:var(--academy-navy) render as dark
     text on a dark card. Those heading rules get an explicit color
     override to --academy-ink further down this file instead. */
  /* Batch 2 canonical foundation: --academy-teal/--academy-canvas/
     --academy-surface/--academy-ink/--academy-muted now alias
     playerid-theme.css's --pid-theme-* dark tokens (values verified
     identical — #22c7bb, #0a1822, #10222f, #eef4f7 and #93a8b6
     respectively — so this is a zero-visual-change compatibility alias,
     not a value change). --academy-teal-soft, --academy-surface-inset
     and --academy-line remain hardcoded LEGACY VISUAL EXCEPTIONS: their
     values do not exactly match the nearest canonical token
     (--pid-theme-surface-inset / --pid-theme-border-soft, or have no
     canonical equivalent yet), so aliasing them would shift the Academy
     dark-mode appearance. See the TOKEN RECONCILIATION LEDGER in
     playerid-design-system.css for details. */
  --academy-teal: var(--pid-theme-teal);
  --academy-teal-soft: #123331;
  --academy-canvas: var(--pid-theme-app-bg);
  --academy-surface: var(--pid-theme-surface);
  --academy-surface-inset: #0c1c28;
  --academy-line: rgba(255, 255, 255, .10);
  --academy-ink: var(--pid-theme-text-primary);
  --academy-muted: var(--pid-theme-text-secondary);

  --academy-status-positive-bg: rgba(34, 199, 187, .14);
  --academy-status-positive-border: rgba(34, 199, 187, .4);
  --academy-status-positive-text: #7fe0cf;
  --academy-status-warn-bg: rgba(230, 170, 60, .14);
  --academy-status-warn-border: rgba(230, 170, 60, .4);
  --academy-status-warn-text: #e8c77a;
  --academy-status-danger-bg: rgba(220, 90, 80, .14);
  --academy-status-danger-border: rgba(220, 90, 80, .4);
  --academy-status-danger-text: #f0a89e;
  --academy-status-neutral-bg: rgba(255, 255, 255, .06);
  --academy-status-neutral-border: rgba(255, 255, 255, .16);
  --academy-status-neutral-text: #93a8b6;
}

/* ---------- Shell chrome: properties that weren't variable-driven ---------- */
html[data-theme="dark"] #adminPanel#adminPanel#adminPanel.academy-workspace-shell > .academy-shell-topbar { background: var(--academy-surface) !important; }
html[data-theme="dark"] #adminPanel#adminPanel#adminPanel.academy-workspace-shell > .academy-shell-context { background: var(--academy-surface-inset) !important; }
html[data-theme="dark"] #adminPanel#adminPanel#adminPanel.academy-workspace-shell > .admin-pane { background: transparent !important; }
/* :not(.pid-premium-control) added in Batch 6B: this blanket rule forced
   every admin-pane button -- primary, secondary and ghost alike -- to the
   same flat --academy-surface background, collapsing the canonical
   .pid-btn--primary/--secondary/--ghost hierarchy in Academy dark mode.
   Legacy (non-canonical) buttons still need the dark surface fix, so only
   Batch 6A's migrated controls are excluded here. */
html[data-theme="dark"] #adminPanel#adminPanel#adminPanel.academy-workspace-shell > .admin-pane button:not(.pid-premium-control):not(.academy-player-drawer-backdrop) { background: var(--academy-surface) !important; }
html[data-theme="dark"] #adminPanel#adminPanel#adminPanel.academy-workspace-shell .academy-player-primary:not(.academy-player-assign-team),
html[data-theme="dark"] #adminPanel#adminPanel#adminPanel.academy-workspace-shell .academy-assignment-cancel { background: var(--academy-surface) !important; }
html[data-theme="dark"] #adminPanel#adminPanel#adminPanel.academy-workspace-shell .btn.danger,
html[data-theme="dark"] #adminPanel#adminPanel#adminPanel.academy-workspace-shell button.is-destructive {
  background: var(--academy-status-danger-bg) !important;
  color: var(--academy-status-danger-text) !important;
  border-color: var(--academy-status-danger-border) !important;
}
html[data-theme="dark"] #adminPanel#adminPanel#adminPanel.academy-workspace-shell .academy-member-side .btn.danger {
  background: var(--academy-status-danger-bg) !important;
  color: var(--academy-status-danger-text) !important;
  border-color: var(--academy-status-danger-border) !important;
}
html[data-theme="dark"] #adminPanel#adminPanel#adminPanel.academy-workspace-shell .academy-member-side .btn.primary {
  background: var(--academy-status-positive-bg) !important;
  color: var(--academy-status-positive-text) !important;
  border-color: var(--academy-status-positive-border) !important;
}
html[data-theme="dark"] #adminPanel#adminPanel#adminPanel.academy-workspace-shell input,
html[data-theme="dark"] #adminPanel#adminPanel#adminPanel.academy-workspace-shell select,
html[data-theme="dark"] #adminPanel#adminPanel#adminPanel.academy-workspace-shell textarea {
  background: var(--academy-surface) !important;
  color: var(--academy-ink) !important;
  border-color: var(--academy-line) !important;
}
html[data-theme="dark"] #adminPanel#adminPanel#adminPanel.academy-workspace-shell ::placeholder { color: var(--academy-muted); opacity: .8; }

/* ---------- Generic Academy "white surface card" pattern ----------
   Every KPI tile, row, drawer and empty-state box across Overview, Players,
   Teams, Members and Reports follows the same white-card-on-light-canvas
   pattern. These selectors are the concrete set found to hardcode a light
   background/border/text instead of an --academy-* variable. */
html[data-theme="dark"] #adminPanel#adminPanel#adminPanel.academy-workspace-shell .dashboard-welcome-card,
html[data-theme="dark"] #adminPanel#adminPanel#adminPanel.academy-workspace-shell .dashboard-metric-card,
html[data-theme="dark"] #adminPanel#adminPanel#adminPanel.academy-workspace-shell .dashboard-activity-card,
html[data-theme="dark"] #adminPanel#adminPanel#adminPanel.academy-workspace-shell .dashboard-list-row,
html[data-theme="dark"] #adminPanel#adminPanel#adminPanel.academy-workspace-shell .dashboard-empty,
html[data-theme="dark"] #adminPanel#adminPanel#adminPanel.academy-workspace-shell .academy-player-attention,
html[data-theme="dark"] #adminPanel#adminPanel#adminPanel.academy-workspace-shell .academy-player-attention .pending-row,
html[data-theme="dark"] #adminPanel#adminPanel#adminPanel.academy-workspace-shell .academy-player-attention .progress-empty,
html[data-theme="dark"] #adminPanel#adminPanel#adminPanel.academy-workspace-shell .academy-player-row,
html[data-theme="dark"] #adminPanel#adminPanel#adminPanel.academy-workspace-shell .academy-player-row.inactive,
html[data-theme="dark"] #adminPanel#adminPanel#adminPanel.academy-workspace-shell .academy-player-status.inactive,
html[data-theme="dark"] #adminPanel#adminPanel#adminPanel.academy-workspace-shell .academy-player-menu>div,
html[data-theme="dark"] #adminPanel#adminPanel#adminPanel.academy-workspace-shell #academyCloudPlayerDirectory .player-empty,
html[data-theme="dark"] #adminPanel#adminPanel#adminPanel.academy-workspace-shell :is(#academyPlayerFormCard,#academyExistingPlayerFormCard),
html[data-theme="dark"] #adminPanel#adminPanel#adminPanel.academy-workspace-shell .academy-cloud-player-toolbar,
html[data-theme="dark"] #adminPanel#adminPanel#adminPanel.academy-workspace-shell .academy-team-summary article,
html[data-theme="dark"] #adminPanel#adminPanel#adminPanel.academy-workspace-shell .academy-team-status.inactive,
html[data-theme="dark"] #adminPanel#adminPanel#adminPanel.academy-workspace-shell .academy-team-card-metrics span,
html[data-theme="dark"] #adminPanel#adminPanel#adminPanel.academy-workspace-shell .academy-team-staff,
html[data-theme="dark"] #adminPanel#adminPanel#adminPanel.academy-workspace-shell .academy-team-menu>div,
html[data-theme="dark"] #adminPanel#adminPanel#adminPanel.academy-workspace-shell #academyTeamForm,
html[data-theme="dark"] #adminPanel#adminPanel#adminPanel.academy-workspace-shell .academy-team-detail,
html[data-theme="dark"] #adminPanel#adminPanel#adminPanel.academy-workspace-shell .academy-team-overview-grid article,
html[data-theme="dark"] #adminPanel#adminPanel#adminPanel.academy-workspace-shell .academy-team-assignment-drawer,
html[data-theme="dark"] #adminPanel#adminPanel#adminPanel.academy-workspace-shell .academy-team-assignment-player,
html[data-theme="dark"] #adminPanel#adminPanel#adminPanel.academy-workspace-shell .academy-team-assignment-actions {
  background: var(--academy-surface) !important;
  border-color: var(--academy-line) !important;
  color: var(--academy-ink);
}
html[data-theme="dark"] #adminPanel#adminPanel#adminPanel.academy-workspace-shell .academy-attention-card .dashboard-count { background: var(--academy-status-warn-bg) !important; color: var(--academy-status-warn-text) !important; }
html[data-theme="dark"] #adminPanel#adminPanel#adminPanel.academy-workspace-shell .academy-player-row.inactive,
html[data-theme="dark"] #adminPanel#adminPanel#adminPanel.academy-workspace-shell .academy-team-card-metrics span,
html[data-theme="dark"] #adminPanel#adminPanel#adminPanel.academy-workspace-shell .academy-player-attention .progress-empty { background: var(--academy-surface-inset) !important; }
html[data-theme="dark"] #adminPanel#adminPanel#adminPanel.academy-workspace-shell .academy-player-status.inactive,
html[data-theme="dark"] #adminPanel#adminPanel#adminPanel.academy-workspace-shell .academy-team-status.inactive { background: var(--academy-status-neutral-bg) !important; border-color: var(--academy-status-neutral-border) !important; color: var(--academy-status-neutral-text) !important; }

/* ---------- Reports pane (assessment/css/playerid-academy-reports.css) ---------- */
html[data-theme="dark"] #adminPanel#adminPanel#adminPanel.academy-workspace-shell .academy-report-summary article,
html[data-theme="dark"] #adminPanel#adminPanel#adminPanel.academy-workspace-shell .academy-report-filters,
html[data-theme="dark"] #adminPanel#adminPanel#adminPanel.academy-workspace-shell .academy-report-directory,
html[data-theme="dark"] #adminPanel#adminPanel#adminPanel.academy-workspace-shell .academy-report-progress,
html[data-theme="dark"] #adminPanel#adminPanel#adminPanel.academy-workspace-shell .academy-report-card {
  background: var(--academy-surface) !important;
  border-color: var(--academy-line) !important;
}
html[data-theme="dark"] #adminPanel#adminPanel#adminPanel.academy-workspace-shell .academy-report-state { background: var(--academy-surface-inset) !important; border-color: var(--academy-line) !important; color: var(--academy-muted) !important; }
html[data-theme="dark"] #adminPanel#adminPanel#adminPanel.academy-workspace-shell .academy-report-state.error { background: var(--academy-status-danger-bg) !important; border-color: var(--academy-status-danger-border) !important; color: var(--academy-status-danger-text) !important; }
html[data-theme="dark"] #adminPanel#adminPanel#adminPanel.academy-workspace-shell .academy-report-summary strong,
html[data-theme="dark"] #adminPanel#adminPanel#adminPanel.academy-workspace-shell .academy-report-state strong,
html[data-theme="dark"] #adminPanel#adminPanel#adminPanel.academy-workspace-shell .academy-report-identity strong,
html[data-theme="dark"] #adminPanel#adminPanel#adminPanel.academy-workspace-shell .academy-report-primary strong,
html[data-theme="dark"] #adminPanel#adminPanel#adminPanel.academy-workspace-shell .academy-report-score strong,
html[data-theme="dark"] #adminPanel#adminPanel#adminPanel.academy-workspace-shell .academy-report-directory-head h2 { color: var(--academy-ink) !important; }
html[data-theme="dark"] #adminPanel#adminPanel#adminPanel.academy-workspace-shell .academy-report-primary span,
html[data-theme="dark"] #adminPanel#adminPanel#adminPanel.academy-workspace-shell .academy-report-primary small,
html[data-theme="dark"] #adminPanel#adminPanel#adminPanel.academy-workspace-shell .academy-report-score small,
html[data-theme="dark"] #adminPanel#adminPanel#adminPanel.academy-workspace-shell .academy-report-score span,
html[data-theme="dark"] #adminPanel#adminPanel#adminPanel.academy-workspace-shell .academy-report-state-block small,
html[data-theme="dark"] #adminPanel#adminPanel#adminPanel.academy-workspace-shell .academy-report-summary span,
html[data-theme="dark"] #adminPanel#adminPanel#adminPanel.academy-workspace-shell .academy-report-directory-head>span { color: var(--academy-muted) !important; }
html[data-theme="dark"] #adminPanel#adminPanel#adminPanel.academy-workspace-shell .academy-report-status { background: var(--academy-status-neutral-bg) !important; border-color: var(--academy-status-neutral-border) !important; color: var(--academy-status-neutral-text) !important; }
html[data-theme="dark"] #adminPanel#adminPanel#adminPanel.academy-workspace-shell .academy-report-status.published { background: var(--academy-status-positive-bg) !important; border-color: var(--academy-status-positive-border) !important; color: var(--academy-status-positive-text) !important; }
html[data-theme="dark"] #adminPanel#adminPanel#adminPanel.academy-workspace-shell .academy-report-status.draft { background: var(--academy-status-warn-bg) !important; border-color: var(--academy-status-warn-border) !important; color: var(--academy-status-warn-text) !important; }

/* ---------- Academy Intelligence pane (assessment/css/playerid-academy-intelligence.css) ---------- */
html[data-theme="dark"] #adminPanel#adminPanel#adminPanel.academy-workspace-shell .academy-intelligence-summary article,
html[data-theme="dark"] #adminPanel#adminPanel#adminPanel.academy-workspace-shell .academy-intelligence-panel,
html[data-theme="dark"] #adminPanel#adminPanel#adminPanel.academy-workspace-shell .academy-priority-card,
html[data-theme="dark"] #adminPanel#adminPanel#adminPanel.academy-workspace-shell .academy-development-row,
html[data-theme="dark"] #adminPanel#adminPanel#adminPanel.academy-workspace-shell .academy-intelligence-detail,
html[data-theme="dark"] #adminPanel#adminPanel#adminPanel.academy-workspace-shell #academyIntelligenceDetail .pid-development-detail-identity,
html[data-theme="dark"] #adminPanel#adminPanel#adminPanel.academy-workspace-shell #academyIntelligenceDetail .pid-development-detail-summary article,
html[data-theme="dark"] #adminPanel#adminPanel#adminPanel.academy-workspace-shell #academyIntelligenceDetail .pid-development-section,
html[data-theme="dark"] #adminPanel#adminPanel#adminPanel.academy-workspace-shell #academyIntelligenceDetail .academy-current-development,
html[data-theme="dark"] #adminPanel#adminPanel#adminPanel.academy-workspace-shell #academyIntelligenceDetail .pid-development-pillar-tab,
html[data-theme="dark"] #adminPanel#adminPanel#adminPanel.academy-workspace-shell #academyIntelligenceDetail .pid-development-priority-item,
html[data-theme="dark"] #adminPanel#adminPanel#adminPanel.academy-workspace-shell #academyIntelligenceDetail .pid-development-evidence-group article {
  background: var(--academy-surface) !important;
  border-color: var(--academy-line) !important;
}
html[data-theme="dark"] #adminPanel#adminPanel#adminPanel.academy-workspace-shell .academy-intelligence-filters,
html[data-theme="dark"] #adminPanel#adminPanel#adminPanel.academy-workspace-shell .academy-intelligence-state,
html[data-theme="dark"] #adminPanel#adminPanel#adminPanel.academy-workspace-shell #academyIntelligenceDetail .pid-development-explorer-panel,
html[data-theme="dark"] #adminPanel#adminPanel#adminPanel.academy-workspace-shell #academyIntelligenceDetail .academy-current-development-grid article,
html[data-theme="dark"] #adminPanel#adminPanel#adminPanel.academy-workspace-shell #academyIntelligenceDetail .pid-development-recent article,
html[data-theme="dark"] #adminPanel#adminPanel#adminPanel.academy-workspace-shell #academyIntelligenceDetail .pid-development-inline-empty,
html[data-theme="dark"] #adminPanel#adminPanel#adminPanel.academy-workspace-shell #academyIntelligenceDetail .pid-development-empty {
  background: var(--academy-surface-inset) !important;
  border-color: var(--academy-line) !important;
}
html[data-theme="dark"] #adminPanel#adminPanel#adminPanel.academy-workspace-shell .academy-intelligence-toolbar,
html[data-theme="dark"] #adminPanel#adminPanel#adminPanel.academy-workspace-shell .academy-positive-head,
html[data-theme="dark"] #adminPanel#adminPanel#adminPanel.academy-workspace-shell .academy-pattern-row { border-color: var(--academy-line) !important; }
html[data-theme="dark"] #adminPanel#adminPanel#adminPanel.academy-workspace-shell .academy-intelligence-summary strong,
html[data-theme="dark"] #adminPanel#adminPanel#adminPanel.academy-workspace-shell .academy-priority-card strong,
html[data-theme="dark"] #adminPanel#adminPanel#adminPanel.academy-workspace-shell .academy-pattern-row strong,
html[data-theme="dark"] #adminPanel#adminPanel#adminPanel.academy-workspace-shell .academy-development-row strong,
html[data-theme="dark"] #adminPanel#adminPanel#adminPanel.academy-workspace-shell #academyIntelligenceDetail .pid-development-detail-identity h2,
html[data-theme="dark"] #adminPanel#adminPanel#adminPanel.academy-workspace-shell #academyIntelligenceDetail .pid-development-detail-summary strong,
html[data-theme="dark"] #adminPanel#adminPanel#adminPanel.academy-workspace-shell #academyIntelligenceDetail .pid-development-section-heading h2,
html[data-theme="dark"] #adminPanel#adminPanel#adminPanel.academy-workspace-shell #academyIntelligenceDetail .pid-development-radar h3,
html[data-theme="dark"] #adminPanel#adminPanel#adminPanel.academy-workspace-shell #academyIntelligenceDetail .pid-development-explorer>h3,
html[data-theme="dark"] #adminPanel#adminPanel#adminPanel.academy-workspace-shell #academyIntelligenceDetail .pid-development-explorer-head strong,
html[data-theme="dark"] #adminPanel#adminPanel#adminPanel.academy-workspace-shell #academyIntelligenceDetail .pid-development-explorer-sequence,
html[data-theme="dark"] #adminPanel#adminPanel#adminPanel.academy-workspace-shell #academyIntelligenceDetail .pid-development-explorer-value,
html[data-theme="dark"] #adminPanel#adminPanel#adminPanel.academy-workspace-shell #academyIntelligenceDetail .pid-development-explorer-metrics b,
html[data-theme="dark"] #adminPanel#adminPanel#adminPanel.academy-workspace-shell #academyIntelligenceDetail .academy-current-development-grid strong,
html[data-theme="dark"] #adminPanel#adminPanel#adminPanel.academy-workspace-shell #academyIntelligenceDetail .pid-development-priority-head strong,
html[data-theme="dark"] #adminPanel#adminPanel#adminPanel.academy-workspace-shell #academyIntelligenceDetail .pid-development-evidence-group h3,
html[data-theme="dark"] #adminPanel#adminPanel#adminPanel.academy-workspace-shell #academyIntelligenceDetail .pid-development-recent strong { color: var(--academy-ink) !important; }
html[data-theme="dark"] #adminPanel#adminPanel#adminPanel.academy-workspace-shell .academy-intelligence-summary small,
html[data-theme="dark"] #adminPanel#adminPanel#adminPanel.academy-workspace-shell .academy-intelligence-summary span,
html[data-theme="dark"] #adminPanel#adminPanel#adminPanel.academy-workspace-shell .academy-intelligence-section-head>span,
html[data-theme="dark"] #adminPanel#adminPanel#adminPanel.academy-workspace-shell .academy-intelligence-state,
html[data-theme="dark"] #adminPanel#adminPanel#adminPanel.academy-workspace-shell .academy-priority-card small,
html[data-theme="dark"] #adminPanel#adminPanel#adminPanel.academy-workspace-shell .academy-priority-evidence span,
html[data-theme="dark"] #adminPanel#adminPanel#adminPanel.academy-workspace-shell .academy-pattern-row small,
html[data-theme="dark"] #adminPanel#adminPanel#adminPanel.academy-workspace-shell .academy-development-row small,
html[data-theme="dark"] #adminPanel#adminPanel#adminPanel.academy-workspace-shell .academy-development-cell,
html[data-theme="dark"] #adminPanel#adminPanel#adminPanel.academy-workspace-shell .academy-development-history,
html[data-theme="dark"] #adminPanel#adminPanel#adminPanel.academy-workspace-shell .academy-intelligence-list-head,
html[data-theme="dark"] #adminPanel#adminPanel#adminPanel.academy-workspace-shell #academyIntelligenceDetail,
html[data-theme="dark"] #adminPanel#adminPanel#adminPanel.academy-workspace-shell #academyIntelligenceDetail .pid-development-detail-identity p,
html[data-theme="dark"] #adminPanel#adminPanel#adminPanel.academy-workspace-shell #academyIntelligenceDetail .pid-development-detail-summary small,
html[data-theme="dark"] #adminPanel#adminPanel#adminPanel.academy-workspace-shell #academyIntelligenceDetail .pid-development-detail-summary span,
html[data-theme="dark"] #adminPanel#adminPanel#adminPanel.academy-workspace-shell #academyIntelligenceDetail .pid-development-section-heading p,
html[data-theme="dark"] #adminPanel#adminPanel#adminPanel.academy-workspace-shell #academyIntelligenceDetail .pid-development-radar-body>p,
html[data-theme="dark"] #adminPanel#adminPanel#adminPanel.academy-workspace-shell #academyIntelligenceDetail .pid-development-explorer-dates,
html[data-theme="dark"] #adminPanel#adminPanel#adminPanel.academy-workspace-shell #academyIntelligenceDetail .pid-development-explorer-metrics small,
html[data-theme="dark"] #adminPanel#adminPanel#adminPanel.academy-workspace-shell #academyIntelligenceDetail .pid-development-priority-evidence,
html[data-theme="dark"] #adminPanel#adminPanel#adminPanel.academy-workspace-shell #academyIntelligenceDetail .pid-development-evidence-group p,
html[data-theme="dark"] #adminPanel#adminPanel#adminPanel.academy-workspace-shell #academyIntelligenceDetail .pid-development-recent time,
html[data-theme="dark"] #adminPanel#adminPanel#adminPanel.academy-workspace-shell #academyIntelligenceDetail .pid-development-recent small { color: var(--academy-muted) !important; }
html[data-theme="dark"] #adminPanel#adminPanel#adminPanel.academy-workspace-shell .academy-development-status { background: var(--academy-status-neutral-bg) !important; border-color: var(--academy-status-neutral-border) !important; color: var(--academy-status-neutral-text) !important; }
html[data-theme="dark"] #adminPanel#adminPanel#adminPanel.academy-workspace-shell .academy-development-status.is-attention { background: var(--academy-status-warn-bg) !important; border-color: var(--academy-status-warn-border) !important; color: var(--academy-status-warn-text) !important; }
html[data-theme="dark"] #adminPanel#adminPanel#adminPanel.academy-workspace-shell .academy-development-status.is-progress,
html[data-theme="dark"] #adminPanel#adminPanel#adminPanel.academy-workspace-shell .academy-priority-card.is-progress .academy-priority-evidence span { background: var(--academy-status-positive-bg) !important; border-color: var(--academy-status-positive-border) !important; color: var(--academy-status-positive-text) !important; }
html[data-theme="dark"] #adminPanel#adminPanel#adminPanel.academy-workspace-shell #academyIntelligenceDetail .pid-development-pillar-tab.is-active { background: var(--academy-status-positive-bg) !important; border-color: var(--academy-teal) !important; color: var(--academy-status-positive-text) !important; }
html[data-theme="dark"] #adminPanel#adminPanel#adminPanel.academy-workspace-shell #academyIntelligenceDetail .pid-development-explorer-states span,
html[data-theme="dark"] #adminPanel#adminPanel#adminPanel.academy-workspace-shell #academyIntelligenceDetail .pid-development-priority-badges span { background: var(--academy-status-neutral-bg) !important; color: var(--academy-muted) !important; }
html[data-theme="dark"] #adminPanel#adminPanel#adminPanel.academy-workspace-shell #academyIntelligenceDetail .pid-development-insight-strip { background: var(--academy-status-positive-bg) !important; color: var(--academy-status-positive-text) !important; }
/* Radar / trend chart line-art: keep the teal "latest" series, lighten the
   grid/axis and the "first" comparison series for contrast on a dark card. */
html[data-theme="dark"] #adminPanel#adminPanel#adminPanel.academy-workspace-shell #academyIntelligenceDetail .pid-development-radar-grid,
html[data-theme="dark"] #adminPanel#adminPanel#adminPanel.academy-workspace-shell #academyIntelligenceDetail .pid-development-explorer-guide { stroke: rgba(255, 255, 255, .14) !important; }
html[data-theme="dark"] #adminPanel#adminPanel#adminPanel.academy-workspace-shell #academyIntelligenceDetail .pid-development-radar-axis { stroke: rgba(255, 255, 255, .22) !important; }
html[data-theme="dark"] #adminPanel#adminPanel#adminPanel.academy-workspace-shell #academyIntelligenceDetail .pid-development-radar-label,
html[data-theme="dark"] #adminPanel#adminPanel#adminPanel.academy-workspace-shell #academyIntelligenceDetail .pid-development-explorer-value { fill: var(--academy-ink) !important; }
html[data-theme="dark"] #adminPanel#adminPanel#adminPanel.academy-workspace-shell #academyIntelligenceDetail .pid-development-radar-first { fill: rgba(147, 168, 182, .16) !important; stroke: #93a8b6 !important; }
html[data-theme="dark"] #adminPanel#adminPanel#adminPanel.academy-workspace-shell #academyIntelligenceDetail .pid-development-radar-point-first { fill: #93a8b6 !important; stroke: var(--academy-surface) !important; }
html[data-theme="dark"] #adminPanel#adminPanel#adminPanel.academy-workspace-shell #academyIntelligenceDetail .pid-development-radar-legend span { color: var(--academy-muted) !important; }
html[data-theme="dark"] #adminPanel#adminPanel#adminPanel.academy-workspace-shell #academyIntelligenceDetail .pid-development-radar-legend span:before { background: #93a8b6; }
html[data-theme="dark"] #adminPanel#adminPanel#adminPanel.academy-workspace-shell #academyIntelligenceDetail .pid-development-radar-legend .is-latest:before { background: var(--academy-teal); }

/* ---------- Members pane (assessment/css/playerid-academy-members.css) ---------- */
html[data-theme="dark"] #adminPanel#adminPanel#adminPanel.academy-workspace-shell .academy-members-summary article,
html[data-theme="dark"] #adminPanel#adminPanel#adminPanel.academy-workspace-shell .academy-members-empty { background: var(--academy-surface) !important; border-color: var(--academy-line) !important; }
html[data-theme="dark"] #adminPanel#adminPanel#adminPanel.academy-workspace-shell .academy-member-row { background: var(--academy-surface-inset) !important; border-color: var(--academy-line) !important; }
html[data-theme="dark"] #adminPanel#adminPanel#adminPanel.academy-workspace-shell .academy-members-card,
html[data-theme="dark"] #adminPanel#adminPanel#adminPanel.academy-workspace-shell .developer-member-legacy-tools { border-color: var(--academy-line) !important; }
html[data-theme="dark"] #adminPanel#adminPanel#adminPanel.academy-workspace-shell .academy-members-summary strong,
html[data-theme="dark"] #adminPanel#adminPanel#adminPanel.academy-workspace-shell .academy-members-section-head h3,
html[data-theme="dark"] #adminPanel#adminPanel#adminPanel.academy-workspace-shell .academy-member-name strong,
html[data-theme="dark"] #adminPanel#adminPanel#adminPanel.academy-workspace-shell .academy-member-team-context b { color: var(--academy-ink) !important; }
html[data-theme="dark"] #adminPanel#adminPanel#adminPanel.academy-workspace-shell .academy-members-summary small,
html[data-theme="dark"] #adminPanel#adminPanel#adminPanel.academy-workspace-shell .academy-members-summary span,
html[data-theme="dark"] #adminPanel#adminPanel#adminPanel.academy-workspace-shell .academy-members-section-head p,
html[data-theme="dark"] #adminPanel#adminPanel#adminPanel.academy-workspace-shell .academy-members-section-head>div>small,
html[data-theme="dark"] #adminPanel#adminPanel#adminPanel.academy-workspace-shell .academy-member-meta,
html[data-theme="dark"] #adminPanel#adminPanel#adminPanel.academy-workspace-shell .academy-member-team-context,
html[data-theme="dark"] #adminPanel#adminPanel#adminPanel.academy-workspace-shell .academy-members-empty { color: var(--academy-muted) !important; }
html[data-theme="dark"] #adminPanel#adminPanel#adminPanel.academy-workspace-shell .academy-member-badge { background: var(--academy-status-neutral-bg) !important; border-color: var(--academy-status-neutral-border) !important; color: var(--academy-status-neutral-text) !important; }
html[data-theme="dark"] #adminPanel#adminPanel#adminPanel.academy-workspace-shell .academy-member-badge.role { background: var(--academy-teal) !important; border-color: var(--academy-teal) !important; color: #042832 !important; }
html[data-theme="dark"] #adminPanel#adminPanel#adminPanel.academy-workspace-shell .academy-member-badge.active,
html[data-theme="dark"] #adminPanel#adminPanel#adminPanel.academy-workspace-shell .academy-member-badge.approved { background: var(--academy-status-positive-bg) !important; border-color: var(--academy-status-positive-border) !important; color: var(--academy-status-positive-text) !important; }
html[data-theme="dark"] #adminPanel#adminPanel#adminPanel.academy-workspace-shell .academy-member-badge.pending { background: var(--academy-status-warn-bg) !important; border-color: var(--academy-status-warn-border) !important; color: var(--academy-status-warn-text) !important; }
html[data-theme="dark"] #adminPanel#adminPanel#adminPanel.academy-workspace-shell .academy-member-badge.inactive,
html[data-theme="dark"] #adminPanel#adminPanel#adminPanel.academy-workspace-shell .academy-member-badge.rejected { background: var(--academy-status-neutral-bg) !important; border-color: var(--academy-status-neutral-border) !important; color: var(--academy-status-neutral-text) !important; }

/* ---------- Focus-visible stays legible on dark surfaces ---------- */
html[data-theme="dark"] #adminPanel#adminPanel#adminPanel.academy-workspace-shell > .admin-pane button:focus-visible { outline-color: rgba(34, 199, 187, .45) !important; }

/* ---------- Headings/"ink" text pinned to color:var(--academy-navy) ----------
   --academy-navy doubles as the sidebar/mobile-topbar gradient background, so
   it is deliberately left unchanged for dark mode (see note above). That
   means every rule below, which uses --academy-navy purely as a heading/
   label text color, needs an explicit override to the (now light)
   --academy-ink value instead. A legacy global reset --
   `h1,h2,h3,h4,h5,h6,.title,body.access-active h1...{color:#0a0a0a!important}`
   -- already outranks the *original* (non-!important) versions of several of
   these rules in both themes; it just reads as a plausible dark heading
   color in light mode, so the bug was invisible until now. !important plus
   the boosted ID specificity below is required to beat it. */
/* ---------- Bare small/p text (eyebrows, captions, descriptions) ----------
   Same masked-!important story: a legacy global reset --
   `p,small,.muted,.subtitle,.helper,...{color:#666!important}` -- already
   outranks every non-!important academy small/p color rule (var-driven or
   hardcoded alike) in both themes; only visible now that dark mode makes a
   uniform mid-grey read as too low-contrast against a dark card. Default
   every bare small/p in the Academy shell to --academy-muted, then restore
   the teal accent on the specific "eyebrow" labels that use it in light
   mode. */
html[data-theme="dark"] #adminPanel#adminPanel#adminPanel.academy-workspace-shell small,
html[data-theme="dark"] #adminPanel#adminPanel#adminPanel.academy-workspace-shell p { color: var(--academy-muted) !important; }
html[data-theme="dark"] #adminPanel#adminPanel#adminPanel.academy-workspace-shell .academy-shell-page-heading small,
html[data-theme="dark"] #adminPanel#adminPanel#adminPanel.academy-workspace-shell .academy-shell-topbar-title small,
html[data-theme="dark"] #adminPanel#adminPanel#adminPanel.academy-workspace-shell .academy-shell-context small,
html[data-theme="dark"] #adminPanel#adminPanel#adminPanel.academy-workspace-shell .academy-report-summary small,
html[data-theme="dark"] #adminPanel#adminPanel#adminPanel.academy-workspace-shell .academy-report-directory-head small,
html[data-theme="dark"] #adminPanel#adminPanel#adminPanel.academy-workspace-shell .academy-positive-head small,
html[data-theme="dark"] #adminPanel#adminPanel#adminPanel.academy-workspace-shell .academy-pattern-row b,
html[data-theme="dark"] #adminPanel#adminPanel#adminPanel.academy-workspace-shell .academy-intelligence-toolbar small,
html[data-theme="dark"] #adminPanel#adminPanel#adminPanel.academy-workspace-shell .academy-intelligence-section-head small { color: var(--academy-teal) !important; }
html[data-theme="dark"] #adminPanel#adminPanel#adminPanel.academy-workspace-shell .academy-report-filters label>span,
html[data-theme="dark"] #adminPanel#adminPanel#adminPanel.academy-workspace-shell .academy-report-progress label>span,
html[data-theme="dark"] #adminPanel#adminPanel#adminPanel.academy-workspace-shell .academy-intelligence-filters label>span,
html[data-theme="dark"] #adminPanel#adminPanel#adminPanel.academy-workspace-shell .academy-cloud-player-toolbar label>span,
html[data-theme="dark"] #adminPanel#adminPanel#adminPanel.academy-workspace-shell .academy-team-assignment-fields label>span { color: var(--academy-muted) !important; }
html[data-theme="dark"] #adminPanel#adminPanel#adminPanel.academy-workspace-shell .progress-empty { color: var(--academy-muted) !important; }

html[data-theme="dark"] #adminPanel#adminPanel#adminPanel.academy-workspace-shell h1,
html[data-theme="dark"] #adminPanel#adminPanel#adminPanel.academy-workspace-shell h2,
html[data-theme="dark"] #adminPanel#adminPanel#adminPanel.academy-workspace-shell h3,
html[data-theme="dark"] #adminPanel#adminPanel#adminPanel.academy-workspace-shell h4,
html[data-theme="dark"] #adminPanel#adminPanel#adminPanel.academy-workspace-shell h5,
html[data-theme="dark"] #adminPanel#adminPanel#adminPanel.academy-workspace-shell h6,
html[data-theme="dark"] #adminPanel#adminPanel#adminPanel.academy-workspace-shell .title { color: var(--academy-ink) !important; }

html[data-theme="dark"] #adminPanel#adminPanel#adminPanel.academy-workspace-shell .admin-pane button:not(.pid-premium-control):not(.academy-player-drawer-backdrop),
html[data-theme="dark"] #adminPanel#adminPanel#adminPanel.academy-workspace-shell .academy-player-primary:not(.academy-player-assign-team),
html[data-theme="dark"] #adminPanel#adminPanel#adminPanel.academy-workspace-shell .academy-assignment-cancel,
html[data-theme="dark"] #adminPanel#adminPanel#adminPanel.academy-workspace-shell .academy-dashboard-quick-heading h3,
html[data-theme="dark"] #adminPanel#adminPanel#adminPanel.academy-workspace-shell #developerPaneOverview .dashboard-metric-card strong,
html[data-theme="dark"] #adminPanel#adminPanel#adminPanel.academy-workspace-shell #developerPaneOverview .dashboard-section-head h3,
html[data-theme="dark"] #adminPanel#adminPanel#adminPanel.academy-workspace-shell #developerPaneOverview .dashboard-section-head .btn,
html[data-theme="dark"] #adminPanel#adminPanel#adminPanel.academy-workspace-shell .academy-player-page-actions h3,
html[data-theme="dark"] #adminPanel#adminPanel#adminPanel.academy-workspace-shell .academy-player-subhead h3,
html[data-theme="dark"] #adminPanel#adminPanel#adminPanel.academy-workspace-shell .academy-player-refresh,
html[data-theme="dark"] #adminPanel#adminPanel#adminPanel.academy-workspace-shell .academy-player-category,
html[data-theme="dark"] #adminPanel#adminPanel#adminPanel.academy-workspace-shell .academy-player-category>strong,
html[data-theme="dark"] #adminPanel#adminPanel#adminPanel.academy-workspace-shell .academy-player-category>b,
html[data-theme="dark"] #adminPanel#adminPanel#adminPanel.academy-workspace-shell .academy-player-identity h4,
html[data-theme="dark"] #adminPanel#adminPanel#adminPanel.academy-workspace-shell .academy-player-menu summary,
html[data-theme="dark"] #adminPanel#adminPanel#adminPanel.academy-workspace-shell :is(#academyPlayerFormCard,#academyExistingPlayerFormCard) .title,
html[data-theme="dark"] #adminPanel#adminPanel#adminPanel.academy-workspace-shell .academy-player-form-head button,
html[data-theme="dark"] #adminPanel#adminPanel#adminPanel.academy-workspace-shell .academy-player-menu button,
html[data-theme="dark"] #adminPanel#adminPanel#adminPanel.academy-workspace-shell #academyCloudPlayerDirectory .academy-player-actions .academy-player-primary:not(.academy-player-assign-team),
html[data-theme="dark"] #adminPanel#adminPanel#adminPanel.academy-workspace-shell #academyCloudPlayerDirectory .academy-player-menu summary,
html[data-theme="dark"] #adminPanel#adminPanel#adminPanel.academy-workspace-shell .academy-team-page-head h2,
html[data-theme="dark"] #adminPanel#adminPanel#adminPanel.academy-workspace-shell .academy-team-summary strong,
html[data-theme="dark"] #adminPanel#adminPanel#adminPanel.academy-workspace-shell .academy-team-category,
html[data-theme="dark"] #adminPanel#adminPanel#adminPanel.academy-workspace-shell .academy-team-card-head h4,
html[data-theme="dark"] #adminPanel#adminPanel#adminPanel.academy-workspace-shell .academy-team-card-metrics strong,
html[data-theme="dark"] #adminPanel#adminPanel#adminPanel.academy-workspace-shell .academy-team-staff,
html[data-theme="dark"] #adminPanel#adminPanel#adminPanel.academy-workspace-shell .academy-team-menu summary,
html[data-theme="dark"] #adminPanel#adminPanel#adminPanel.academy-workspace-shell .academy-team-menu button,
html[data-theme="dark"] #adminPanel#adminPanel#adminPanel.academy-workspace-shell #academyTeamForm .player-form-head h3,
html[data-theme="dark"] #adminPanel#adminPanel#adminPanel.academy-workspace-shell .academy-team-detail-head h3,
html[data-theme="dark"] #adminPanel#adminPanel#adminPanel.academy-workspace-shell .academy-team-detail-counts,
html[data-theme="dark"] #adminPanel#adminPanel#adminPanel.academy-workspace-shell .academy-team-detail-close,
html[data-theme="dark"] #adminPanel#adminPanel#adminPanel.academy-workspace-shell .academy-team-section-head h3,
html[data-theme="dark"] #adminPanel#adminPanel#adminPanel.academy-workspace-shell .academy-team-overview-grid strong,
html[data-theme="dark"] #adminPanel#adminPanel#adminPanel.academy-workspace-shell .team-squad-current>h4,
html[data-theme="dark"] #adminPanel#adminPanel#adminPanel.academy-workspace-shell .team-squad-history summary,
html[data-theme="dark"] #adminPanel#adminPanel#adminPanel.academy-workspace-shell .team-squad-history-row b,
html[data-theme="dark"] #adminPanel#adminPanel#adminPanel.academy-workspace-shell .team-staff-group>h4,
html[data-theme="dark"] #adminPanel#adminPanel#adminPanel.academy-workspace-shell .team-staff-history summary,
html[data-theme="dark"] #adminPanel#adminPanel#adminPanel.academy-workspace-shell .academy-team-assignment-head h3,
html[data-theme="dark"] #adminPanel#adminPanel#adminPanel.academy-workspace-shell .academy-team-assignment-head>button,
html[data-theme="dark"] #adminPanel#adminPanel#adminPanel.academy-workspace-shell .academy-team-assignment-player strong,
html[data-theme="dark"] #adminPanel#adminPanel#adminPanel.academy-workspace-shell .academy-rollover-head h3,
html[data-theme="dark"] #adminPanel#adminPanel#adminPanel.academy-workspace-shell .academy-rollover-head>button,
html[data-theme="dark"] #adminPanel#adminPanel#adminPanel.academy-workspace-shell .rollover-step-head b,
html[data-theme="dark"] #adminPanel#adminPanel#adminPanel.academy-workspace-shell .rollover-step-head strong,
html[data-theme="dark"] #adminPanel#adminPanel#adminPanel.academy-workspace-shell .rollover-source strong,
html[data-theme="dark"] #adminPanel#adminPanel#adminPanel.academy-workspace-shell .rollover-destination-card strong,
html[data-theme="dark"] #adminPanel#adminPanel#adminPanel.academy-workspace-shell .rollover-player-copy strong,
html[data-theme="dark"] #adminPanel#adminPanel#adminPanel.academy-workspace-shell .rollover-preview-summary strong,
html[data-theme="dark"] #adminPanel#adminPanel#adminPanel.academy-workspace-shell .rollover-preview-player strong,
html[data-theme="dark"] #adminPanel#adminPanel#adminPanel.academy-workspace-shell .rollover-confirm strong,
html[data-theme="dark"] #adminPanel#adminPanel#adminPanel.academy-workspace-shell .rollover-option span,
html[data-theme="dark"] #adminPanel#adminPanel#adminPanel.academy-workspace-shell .rollover-success h4,
html[data-theme="dark"] #adminPanel#adminPanel#adminPanel.academy-workspace-shell .rollover-derived-season strong,
html[data-theme="dark"] #adminPanel#adminPanel#adminPanel.academy-workspace-shell .academy-intelligence-toolbar h2,
html[data-theme="dark"] #adminPanel#adminPanel#adminPanel.academy-workspace-shell .academy-intelligence-summary strong,
html[data-theme="dark"] #adminPanel#adminPanel#adminPanel.academy-workspace-shell .academy-intelligence-section-head h3 { color: var(--academy-ink) !important; }

/* The active Team-detail tab pill keeps a light teal fill in the original
   design; give it a dark-safe equivalent instead of leaving it as a bright
   light-teal chip. */
html[data-theme="dark"] #adminPanel#adminPanel#adminPanel.academy-workspace-shell .academy-team-detail-tabs button.is-active {
  background: var(--academy-status-positive-bg) !important;
  color: var(--academy-status-positive-text) !important;
}
