/* Academy Admin > Teams: Teams Directory + Team Command Center, aligned
   with the Academy Players page (playerid-academy-players.css).
   #developerPaneTeams and the Team Workspace markup
   (team-workspace.cloud.js) are shared with the Developer Workspace, so
   every visual rule is scoped to the Academy shell
   (#adminPanel.academy-workspace-shell), which Developer never carries.
   In the Academy shell the directory has no team cards: the selected
   team's Command Center renders inline, with a compact selector when more
   than one team passes the filters (renderInlineCommandCenter).
   Academy tabs are Overview, Squad, Coaching Staff and Development: the
   tournament workflow belongs to Reports, so the shared Tournaments tab
   and panel stay Developer-only.
   The repeated #adminPanel ids out-rank the older layered Teams rules
   (index.html inline, premium, workspace and dark stylesheets, up to four
   ids). Colours use the --academy-* tokens so the dark theme follows. */

/* ---------- Outside the Academy shell (Developer / legacy) ---------- */
.academy-team-toolbar,
.academy-team-directory-head { display: none; }

/* ---------- Tokens ---------- */
#adminPanel#adminPanel#adminPanel#adminPanel#adminPanel.academy-workspace-shell #developerPaneTeams {
  --act-card: var(--academy-surface, #fff);
  --act-ink: var(--academy-ink, #122334);
  --act-heading: #0b1f3a;
  --act-muted: var(--academy-muted, #657687);
  --act-line: var(--academy-line, #dce5ea);
  --act-teal: var(--academy-teal, #10a9b5);
  --act-teal-strong: #0e97a3;
  --act-teal-soft: #e3f6f6;
  --act-inset: #f5f8fa;
  --act-danger: #a33c3c;
  --act-danger-line: #e6c3c3;
  --act-shadow: 0 1px 2px rgba(11, 31, 58, .04), 0 6px 18px rgba(11, 31, 58, .05);
  --act-radius: 12px;
  min-width: 0;
  font-family: "Plus Jakarta Sans", ui-sans-serif, system-ui, sans-serif;
}
html[data-theme="dark"] #adminPanel#adminPanel#adminPanel#adminPanel#adminPanel.academy-workspace-shell #developerPaneTeams {
  --act-heading: var(--academy-ink);
  --act-teal-soft: rgba(34, 199, 187, .14);
  --act-teal-strong: var(--academy-teal);
  --act-inset: var(--academy-surface-inset, #0c1c28);
  --act-danger: #f0a3a3;
  --act-danger-line: rgba(240, 163, 163, .35);
  --act-shadow: 0 1px 2px rgba(0, 0, 0, .25);
}
#adminPanel#adminPanel#adminPanel#adminPanel#adminPanel.academy-workspace-shell #developerPaneTeams * { box-sizing: border-box; }
#adminPanel#adminPanel#adminPanel#adminPanel#adminPanel.academy-workspace-shell #developerPaneTeams .team-management-shell {
  display: grid !important;
  gap: 14px !important;
  min-width: 0;
  max-width: 100%;
}
#adminPanel#adminPanel#adminPanel#adminPanel#adminPanel.academy-workspace-shell #developerPaneTeams .team-management-shell > * { min-width: 0; max-width: 100%; margin: 0 !important; }

/* ---------- 1. Page header: Add Team joins the shell heading ---------- */
/* The in-pane action bar and age chips are replaced (Academy only) by the
   heading button and the Age Group filter; both call the same handlers. */
#adminPanel#adminPanel#adminPanel#adminPanel#adminPanel.academy-workspace-shell #developerPaneTeams :is(.academy-team-page-head, #academyTeamCategories) { display: none !important; }
#adminPanel#adminPanel#adminPanel#adminPanel#adminPanel.academy-workspace-shell[data-academy-pane="teams"] > .academy-shell-page-heading {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto;
  column-gap: 20px;
  align-items: center;
  padding-bottom: 12px !important;
}
#adminPanel#adminPanel#adminPanel#adminPanel#adminPanel.academy-workspace-shell[data-academy-pane="teams"] > .academy-shell-page-heading > :not(.academy-shell-page-actions) { grid-column: 1; min-width: 0; }
#adminPanel#adminPanel#adminPanel#adminPanel#adminPanel.academy-workspace-shell[data-academy-pane="teams"] > .academy-shell-page-heading > h1 { margin-bottom: 3px !important; }
#adminPanel#adminPanel#adminPanel#adminPanel#adminPanel.academy-workspace-shell[data-academy-pane="teams"] > .academy-shell-page-heading > p { margin-bottom: 0 !important; }
#adminPanel#adminPanel#adminPanel#adminPanel#adminPanel.academy-workspace-shell[data-academy-pane="teams"] .academy-teams-page-actions {
  grid-column: 2;
  grid-row: 1 / span 3;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  min-width: 0;
}
#adminPanel#adminPanel#adminPanel#adminPanel#adminPanel.academy-workspace-shell .academy-teams-page-actions .academy-add-team {
  min-height: 44px !important;
  margin: 0 !important;
  padding: 10px 18px !important;
  border-radius: 10px !important;
  font-size: 13px !important;
  font-weight: 700 !important;
  white-space: nowrap;
}
/* ---------- 2. KPI row ---------- */
#adminPanel#adminPanel#adminPanel#adminPanel#adminPanel.academy-workspace-shell #developerPaneTeams #academyTeamSummary {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 12px !important;
  padding: 0 !important;
  border: 0 !important;
  background: none !important;
  box-shadow: none !important;
}
#adminPanel#adminPanel#adminPanel#adminPanel#adminPanel.academy-workspace-shell #developerPaneTeams #academyTeamSummary .academy-team-kpi {
  display: grid !important;
  grid-template-columns: 40px minmax(0, 1fr);
  grid-template-areas: "icon label" "icon count" "icon helper";
  column-gap: 12px;
  align-items: center;
  align-content: center;
  min-width: 0;
  min-height: 78px !important;
  margin: 0 !important;
  padding: 12px 14px !important;
  border: 1px solid var(--act-line) !important;
  border-radius: var(--act-radius) !important;
  background: var(--act-card) !important;
  background-image: none !important;
  box-shadow: var(--act-shadow) !important;
  transform: none !important;
}
#adminPanel#adminPanel#adminPanel#adminPanel#adminPanel.academy-workspace-shell #developerPaneTeams #academyTeamSummary .academy-team-kpi > i {
  grid-area: icon;
  display: grid;
  width: 40px !important;
  height: 40px !important;
  place-items: center;
  border-radius: 50% !important;
  background: var(--act-teal-soft) !important;
  color: var(--act-teal-strong) !important;
}
#adminPanel#adminPanel#adminPanel#adminPanel#adminPanel.academy-workspace-shell #developerPaneTeams #academyTeamSummary .academy-team-kpi svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
#adminPanel#adminPanel#adminPanel#adminPanel#adminPanel.academy-workspace-shell #developerPaneTeams #academyTeamSummary .academy-team-kpi > strong {
  grid-area: label;
  margin: 0 !important;
  overflow: hidden;
  color: var(--act-ink) !important;
  font-size: 12px !important;
  font-weight: 600 !important;
  line-height: 1.3 !important;
  letter-spacing: 0 !important;
  text-transform: none !important;
  text-overflow: ellipsis;
  white-space: nowrap;
}
#adminPanel#adminPanel#adminPanel#adminPanel#adminPanel.academy-workspace-shell #developerPaneTeams #academyTeamSummary .academy-team-kpi > b {
  grid-area: count;
  margin: 1px 0 0 !important;
  color: var(--act-heading) !important;
  font-size: 22px !important;
  font-weight: 800 !important;
  line-height: 1.1 !important;
  letter-spacing: -.02em;
  font-variant-numeric: tabular-nums;
}
#adminPanel#adminPanel#adminPanel#adminPanel#adminPanel.academy-workspace-shell #developerPaneTeams #academyTeamSummary .academy-team-kpi > small {
  grid-area: helper;
  margin: 1px 0 0 !important;
  overflow: hidden;
  color: var(--act-muted) !important;
  font-size: 11px !important;
  font-weight: 500 !important;
  line-height: 1.35 !important;
  letter-spacing: 0 !important;
  text-transform: none !important;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ---------- 3. Search + filter toolbar ---------- */
#adminPanel#adminPanel#adminPanel#adminPanel#adminPanel.academy-workspace-shell #developerPaneTeams .academy-team-toolbar {
  display: grid !important;
  grid-template-columns: minmax(0, 1.6fr) repeat(3, minmax(0, 1fr));
  gap: 12px;
  align-items: end;
  padding: 12px 14px;
  border: 1px solid var(--act-line);
  border-radius: var(--act-radius);
  background: var(--act-card);
  box-shadow: var(--act-shadow);
}
#adminPanel#adminPanel#adminPanel#adminPanel#adminPanel.academy-workspace-shell #developerPaneTeams .academy-team-toolbar label { display: block; min-width: 0; margin: 0 !important; }
#adminPanel#adminPanel#adminPanel#adminPanel#adminPanel.academy-workspace-shell #developerPaneTeams .academy-team-toolbar label > span {
  display: block;
  margin: 0 0 5px;
  color: var(--act-muted);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .02em;
}
#adminPanel#adminPanel#adminPanel#adminPanel#adminPanel.academy-workspace-shell #developerPaneTeams .academy-team-toolbar :is(input, select) {
  width: 100% !important;
  height: 44px !important;
  min-height: 44px !important;
  margin: 0 !important;
  padding: 9px 12px !important;
  border: 1px solid var(--act-line) !important;
  border-radius: 9px !important;
  background-color: var(--act-card) !important;
  color: var(--act-heading) !important;
  box-shadow: none !important;
  font-family: inherit !important;
  font-size: 13px !important;
  font-weight: 500 !important;
}
#adminPanel#adminPanel#adminPanel#adminPanel#adminPanel.academy-workspace-shell #developerPaneTeams :is(.academy-team-toolbar, .team-squad-add, .team-squad-row, .team-staff-assignment-form) :is(input, select):focus-visible {
  border-color: var(--act-teal) !important;
  outline: 2px solid rgba(16, 169, 181, .2) !important;
  outline-offset: 1px;
}

/* ---------- 4. Team directory ---------- */
#adminPanel#adminPanel#adminPanel#adminPanel#adminPanel.academy-workspace-shell #developerPaneTeams .academy-team-directory-head {
  display: flex !important;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding-top: 2px;
}
#adminPanel#adminPanel#adminPanel#adminPanel#adminPanel.academy-workspace-shell #developerPaneTeams .academy-team-directory-head h3 {
  margin: 0 !important;
  color: var(--act-heading) !important;
  font-size: 15px !important;
  font-weight: 700 !important;
  line-height: 1.3 !important;
}
#adminPanel#adminPanel#adminPanel#adminPanel#adminPanel.academy-workspace-shell #developerPaneTeams #academyTeamResultCount { color: var(--act-muted); font-size: 12px; font-weight: 500; white-space: nowrap; }
#adminPanel#adminPanel#adminPanel#adminPanel#adminPanel.academy-workspace-shell #developerPaneTeams #academyTeamDirectory > :is(.progress-empty, .status) {
  margin: 0 !important;
  padding: 18px !important;
  border: 1px dashed var(--act-line) !important;
  border-radius: var(--act-radius) !important;
  background: var(--act-card) !important;
  color: var(--act-muted) !important;
  font-size: 13px;
  text-align: left;
}
#adminPanel#adminPanel#adminPanel#adminPanel#adminPanel.academy-workspace-shell #developerPaneTeams #academyTeamDirectory:empty { display: none !important; }

/* Team selector: compact options, shown only for two or more visible teams. */
#adminPanel#adminPanel#adminPanel#adminPanel#adminPanel.academy-workspace-shell #developerPaneTeams .academy-team-selector {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 190px), 1fr));
  gap: 8px;
}
#adminPanel#adminPanel#adminPanel#adminPanel#adminPanel.academy-workspace-shell #developerPaneTeams .academy-team-option {
  display: grid !important;
  align-content: center;
  gap: 2px;
  min-width: 0;
  min-height: 56px !important;
  margin: 0 !important;
  padding: 9px 14px !important;
  border: 1px solid var(--act-line) !important;
  border-radius: 10px !important;
  background: var(--act-card) !important;
  background-image: none !important;
  box-shadow: none !important;
  color: var(--act-heading) !important;
  font-family: inherit !important;
  text-align: left !important;
  cursor: pointer;
  transform: none !important;
  transition: border-color .16s ease, background-color .16s ease;
}
#adminPanel#adminPanel#adminPanel#adminPanel#adminPanel.academy-workspace-shell #developerPaneTeams .academy-team-option:hover { border-color: var(--act-teal) !important; }
#adminPanel#adminPanel#adminPanel#adminPanel#adminPanel.academy-workspace-shell #developerPaneTeams .academy-team-option[aria-pressed="true"] {
  border-color: var(--act-teal) !important;
  background: var(--act-teal-soft) !important;
  box-shadow: inset 0 0 0 1px var(--act-teal) !important;
}
#adminPanel#adminPanel#adminPanel#adminPanel#adminPanel.academy-workspace-shell #developerPaneTeams .academy-team-option:focus-visible { outline: 2px solid var(--act-teal) !important; outline-offset: 2px; }
#adminPanel#adminPanel#adminPanel#adminPanel#adminPanel.academy-workspace-shell #developerPaneTeams .academy-team-option strong {
  display: block;
  overflow: hidden;
  color: var(--act-heading) !important;
  font-size: 13px !important;
  font-weight: 700 !important;
  line-height: 1.3 !important;
  text-overflow: ellipsis;
  white-space: nowrap;
}
#adminPanel#adminPanel#adminPanel#adminPanel#adminPanel.academy-workspace-shell #developerPaneTeams .academy-team-option small { display: block; color: var(--act-muted) !important; font-size: 11.5px !important; font-weight: 600 !important; line-height: 1.3 !important; }
#adminPanel#adminPanel#adminPanel#adminPanel#adminPanel.academy-workspace-shell #developerPaneTeams .academy-team-option.is-inactive:not([aria-pressed="true"]) strong { color: var(--act-muted) !important; }

#adminPanel#adminPanel#adminPanel#adminPanel#adminPanel.academy-workspace-shell #developerPaneTeams .academy-team-status {
  display: inline-flex !important;
  flex: 0 0 auto;
  align-items: center;
  width: max-content;
  min-height: 24px;
  padding: 3px 10px !important;
  border: 1px solid transparent !important;
  border-radius: 999px !important;
  font-size: 11px !important;
  font-weight: 700 !important;
  letter-spacing: .02em !important;
  line-height: 1.2 !important;
  text-transform: capitalize !important;
  white-space: nowrap;
}
#adminPanel#adminPanel#adminPanel#adminPanel#adminPanel.academy-workspace-shell #developerPaneTeams .academy-team-status.active { border-color: rgba(16, 169, 181, .3) !important; background: var(--act-teal-soft) !important; color: var(--act-teal-strong) !important; }
#adminPanel#adminPanel#adminPanel#adminPanel#adminPanel.academy-workspace-shell #developerPaneTeams .academy-team-status.inactive { border-color: var(--act-line) !important; background: var(--act-inset) !important; color: var(--act-muted) !important; }

#adminPanel#adminPanel#adminPanel#adminPanel#adminPanel.academy-workspace-shell #developerPaneTeams .academy-team-manage-squad {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  min-height: 40px !important;
  margin: 0 !important;
  padding: 8px 14px !important;
  border-radius: 9px !important;
  box-shadow: none !important;
  font-family: inherit !important;
  font-size: 13px !important;
  font-weight: 700 !important;
  line-height: 1.2 !important;
  white-space: nowrap;
  transform: none !important;
}
#adminPanel#adminPanel#adminPanel#adminPanel#adminPanel.academy-workspace-shell #developerPaneTeams .academy-team-manage-squad {
  border: 1px solid var(--act-teal) !important;
  background: var(--act-teal) !important;
  background-image: none !important;
  color: #052b34 !important;
}
#adminPanel#adminPanel#adminPanel#adminPanel#adminPanel.academy-workspace-shell #developerPaneTeams .academy-team-manage-squad:hover { background: var(--act-teal-strong) !important; border-color: var(--act-teal-strong) !important; }
#adminPanel#adminPanel#adminPanel#adminPanel#adminPanel.academy-workspace-shell #developerPaneTeams .academy-team-menu { position: relative; flex: 0 0 auto; width: auto; margin: 0 !important; }
#adminPanel#adminPanel#adminPanel#adminPanel#adminPanel.academy-workspace-shell #developerPaneTeams .academy-team-menu summary {
  display: grid !important;
  width: 40px !important;
  height: 40px !important;
  place-items: center;
  border: 1px solid var(--act-line) !important;
  border-radius: 9px !important;
  background: var(--act-card) !important;
  color: var(--act-heading) !important;
  font-size: 12px;
}
#adminPanel#adminPanel#adminPanel#adminPanel#adminPanel.academy-workspace-shell #developerPaneTeams .academy-team-menu > div {
  z-index: 20 !important;
  min-width: 170px !important;
  border: 1px solid var(--act-line) !important;
  border-radius: 10px !important;
  background: var(--act-card) !important;
  box-shadow: 0 12px 28px rgba(11, 31, 58, .14) !important;
}
#adminPanel#adminPanel#adminPanel#adminPanel#adminPanel.academy-workspace-shell #developerPaneTeams .academy-team-menu button { min-height: 40px !important; font-size: 13px !important; font-weight: 600 !important; }

/* Create / edit team form (inline card). */
#adminPanel#adminPanel#adminPanel#adminPanel#adminPanel.academy-workspace-shell #developerPaneTeams #academyTeamForm {
  padding: 18px !important;
  border: 1px solid var(--act-line) !important;
  border-radius: var(--act-radius) !important;
  background: var(--act-card) !important;
  box-shadow: var(--act-shadow) !important;
}
#adminPanel#adminPanel#adminPanel#adminPanel#adminPanel.academy-workspace-shell #developerPaneTeams #academyTeamForm :is(input, select) { height: 44px; border-radius: 9px !important; }
#adminPanel#adminPanel#adminPanel#adminPanel#adminPanel.academy-workspace-shell #developerPaneTeams #academyTeamSaveButton { min-height: 44px !important; margin-top: 12px !important; border-radius: 10px !important; }

/* ---------- 5. Team Command Center ---------- */
#adminPanel#adminPanel#adminPanel#adminPanel#adminPanel.academy-workspace-shell #developerPaneTeams #academyTeamDetailView {
  position: relative;
  min-width: 0;
  margin: 0 !important;
  border: 1px solid var(--act-line) !important;
  border-radius: 14px !important;
  background: var(--act-card) !important;
  box-shadow: var(--act-shadow) !important;
  overflow: visible; /* header ••• menu may extend past short tab content */
}
#adminPanel#adminPanel#adminPanel#adminPanel#adminPanel.academy-workspace-shell #developerPaneTeams .academy-team-detail-head {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center !important;
  gap: 16px !important;
  padding: 20px 22px 16px !important;
  border: 0 !important;
  background: transparent !important;
}
#adminPanel#adminPanel#adminPanel#adminPanel#adminPanel.academy-workspace-shell #developerPaneTeams .academy-team-detail-head > div:first-child { min-width: 0; }
/* Inline Command Center: no eyebrow, no Back to Teams (nothing to go back to). */
#adminPanel#adminPanel#adminPanel#adminPanel#adminPanel.academy-workspace-shell #developerPaneTeams :is(.academy-team-detail-head .eyebrow, .academy-team-detail-close) { display: none !important; }
#adminPanel#adminPanel#adminPanel#adminPanel#adminPanel.academy-workspace-shell #developerPaneTeams .academy-team-detail-head h3 {
  margin: 0 0 4px !important;
  color: var(--act-heading) !important;
  font-size: 22px !important;
  font-weight: 800 !important;
  line-height: 1.2 !important;
  letter-spacing: -.01em;
  text-transform: uppercase;
  overflow-wrap: anywhere;
}
#adminPanel#adminPanel#adminPanel#adminPanel#adminPanel.academy-workspace-shell #developerPaneTeams .academy-team-detail-head p {
  margin: 0 !important;
  color: var(--act-muted) !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  letter-spacing: .04em;
  text-transform: uppercase;
}
/* Counts repeat the Overview cards; the Command Center shows them once. */
#adminPanel#adminPanel#adminPanel#adminPanel#adminPanel.academy-workspace-shell #developerPaneTeams #academyTeamDetailCounts { display: none !important; }
#adminPanel#adminPanel#adminPanel#adminPanel#adminPanel.academy-workspace-shell #developerPaneTeams .academy-team-detail-head > div:last-child {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  align-self: center !important;
  gap: 10px !important;
  width: auto !important;
  margin: 0 !important;
}
/* Tabs: underline strip; only this strip may scroll horizontally. */
#adminPanel#adminPanel#adminPanel#adminPanel#adminPanel.academy-workspace-shell #developerPaneTeams .academy-team-detail-tabs {
  display: flex !important;
  gap: 4px !important;
  max-width: 100%;
  margin: 0 !important;
  padding: 0 16px !important;
  border-top: 0 !important;
  border-bottom: 1px solid var(--act-line) !important;
  background: transparent !important;
  overflow-x: auto !important;
  overflow-y: hidden !important;
  overscroll-behavior-x: contain;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
#adminPanel#adminPanel#adminPanel#adminPanel#adminPanel.academy-workspace-shell #developerPaneTeams .academy-team-detail-tabs::-webkit-scrollbar { display: none; }
#adminPanel#adminPanel#adminPanel#adminPanel#adminPanel.academy-workspace-shell #developerPaneTeams :is([data-team-detail-tab="tournaments"], [data-team-detail-panel="tournaments"]) { display: none !important; }
#adminPanel#adminPanel#adminPanel#adminPanel#adminPanel.academy-workspace-shell #developerPaneTeams .academy-team-detail-tabs button {
  position: relative;
  flex: 0 0 auto;
  min-height: 46px !important;
  margin: 0 !important;
  padding: 10px 12px !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  color: var(--act-muted) !important;
  box-shadow: none !important;
  font-family: inherit !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  white-space: nowrap;
}
#adminPanel#adminPanel#adminPanel#adminPanel#adminPanel.academy-workspace-shell #developerPaneTeams .academy-team-detail-tabs button::after {
  content: "";
  position: absolute;
  right: 10px;
  bottom: -1px;
  left: 10px;
  height: 2px;
  border-radius: 2px 2px 0 0;
  background: transparent;
}
#adminPanel#adminPanel#adminPanel#adminPanel#adminPanel.academy-workspace-shell #developerPaneTeams .academy-team-detail-tabs button:hover { color: var(--act-heading) !important; }
#adminPanel#adminPanel#adminPanel#adminPanel#adminPanel.academy-workspace-shell #developerPaneTeams .academy-team-detail-tabs button.is-active { background: transparent !important; color: var(--act-heading) !important; font-weight: 700 !important; }
#adminPanel#adminPanel#adminPanel#adminPanel#adminPanel.academy-workspace-shell #developerPaneTeams .academy-team-detail-tabs button.is-active::after { background: var(--act-teal); }
#adminPanel#adminPanel#adminPanel#adminPanel#adminPanel.academy-workspace-shell #developerPaneTeams .academy-team-detail-tabs button:focus-visible { outline: 2px solid var(--act-teal) !important; outline-offset: -2px; }

#adminPanel#adminPanel#adminPanel#adminPanel#adminPanel.academy-workspace-shell #developerPaneTeams .academy-team-detail-panel {
  min-width: 0;
  margin: 0 !important;
  padding: 20px 22px 22px !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}
#adminPanel#adminPanel#adminPanel#adminPanel#adminPanel.academy-workspace-shell #developerPaneTeams .academy-team-detail-panel.hidden { display: none !important; }
#adminPanel#adminPanel#adminPanel#adminPanel#adminPanel.academy-workspace-shell #developerPaneTeams .academy-team-section-head { display: flex !important; flex-direction: row !important; align-items: flex-start !important; justify-content: space-between; gap: 14px !important; margin: 0 0 14px !important; }
#adminPanel#adminPanel#adminPanel#adminPanel#adminPanel.academy-workspace-shell #developerPaneTeams .academy-team-section-head > div { min-width: 0; }
#adminPanel#adminPanel#adminPanel#adminPanel#adminPanel.academy-workspace-shell #developerPaneTeams :is(.academy-team-section-head, .development-intelligence-head) .eyebrow {
  display: block;
  color: var(--act-teal-strong) !important;
  font-size: 11px !important;
  font-weight: 800 !important;
  letter-spacing: .12em !important;
}
#adminPanel#adminPanel#adminPanel#adminPanel#adminPanel.academy-workspace-shell #developerPaneTeams :is(.academy-team-section-head, .development-intelligence-head) h3 {
  margin: 4px 0 0 !important;
  color: var(--act-heading) !important;
  font-size: 17px !important;
  font-weight: 700 !important;
  line-height: 1.3 !important;
  overflow-wrap: anywhere;
}
#adminPanel#adminPanel#adminPanel#adminPanel#adminPanel.academy-workspace-shell #developerPaneTeams .academy-team-section-head small { display: block; margin-top: 4px; color: var(--act-muted); font-size: 12px; line-height: 1.45; }

/* Shared inset panels (add player, assign coach). */
#adminPanel#adminPanel#adminPanel#adminPanel#adminPanel.academy-workspace-shell #developerPaneTeams :is(.team-squad-add, .team-staff-assignment-form) {
  margin: 0 0 16px !important;
  padding: 14px !important;
  border: 1px solid var(--act-line) !important;
  border-radius: var(--act-radius) !important;
  background: var(--act-inset) !important;
  box-shadow: none !important;
}
#adminPanel#adminPanel#adminPanel#adminPanel#adminPanel.academy-workspace-shell #developerPaneTeams :is(.team-squad-add, .team-squad-row, .team-staff-assignment-form) :is(input, select) {
  width: 100%;
  min-width: 0;
  height: 42px !important;
  min-height: 42px !important;
  margin: 0 !important;
  padding: 8px 11px !important;
  border: 1px solid var(--act-line) !important;
  border-radius: 9px !important;
  background: var(--act-card) !important;
  color: var(--act-heading) !important;
  box-shadow: none !important;
  font-family: inherit !important;
  font-size: 13px !important;
}
#adminPanel#adminPanel#adminPanel#adminPanel#adminPanel.academy-workspace-shell #developerPaneTeams .team-staff-assignment-form label { color: var(--act-muted) !important; font-size: 11px !important; font-weight: 600 !important; letter-spacing: .02em !important; }
#adminPanel#adminPanel#adminPanel#adminPanel#adminPanel.academy-workspace-shell #developerPaneTeams .team-staff-assignment-form .player-form-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
#adminPanel#adminPanel#adminPanel#adminPanel#adminPanel.academy-workspace-shell #developerPaneTeams .team-staff-assignment-form .player-form-head h3 { margin: 3px 0 0 !important; color: var(--act-heading) !important; font-size: 15px !important; }
#adminPanel#adminPanel#adminPanel#adminPanel#adminPanel.academy-workspace-shell #developerPaneTeams .team-staff-assignment-form .grid { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; gap: 10px !important; }
#adminPanel#adminPanel#adminPanel#adminPanel#adminPanel.academy-workspace-shell #developerPaneTeams :is(.team-squad-add, .team-squad-row, .team-staff-assignment-form, .team-staff-row) button {
  min-height: 40px !important;
  margin: 0 !important;
  padding: 8px 13px !important;
  border-radius: 9px !important;
  box-shadow: none !important;
  font-family: inherit !important;
  font-size: 12.5px !important;
  font-weight: 700 !important;
  line-height: 1.2 !important;
  transform: none !important;
}
#adminPanel#adminPanel#adminPanel#adminPanel#adminPanel.academy-workspace-shell #developerPaneTeams :is(#academyTeamSaveButton, #academyTeamCoachSave) { min-height: 44px !important; margin-top: 12px !important; }
#adminPanel#adminPanel#adminPanel#adminPanel#adminPanel.academy-workspace-shell #developerPaneTeams .is-destructive:is(button) {
  border: 1px solid var(--act-danger-line) !important;
  background: var(--act-card) !important;
  background-image: none !important;
  color: var(--act-danger) !important;
}

/* Overview */
#adminPanel#adminPanel#adminPanel#adminPanel#adminPanel.academy-workspace-shell #developerPaneTeams .academy-team-overview-grid { display: grid !important; grid-template-columns: repeat(4, minmax(0, 1fr)) !important; gap: 12px !important; }
#adminPanel#adminPanel#adminPanel#adminPanel#adminPanel.academy-workspace-shell #developerPaneTeams .academy-team-overview-grid article {
  min-width: 0;
  padding: 14px 16px !important;
  border: 1px solid var(--act-line) !important;
  border-radius: var(--act-radius) !important;
  background: var(--act-inset) !important;
  box-shadow: none !important;
}
#adminPanel#adminPanel#adminPanel#adminPanel#adminPanel.academy-workspace-shell #developerPaneTeams .academy-team-overview-grid small {
  display: block;
  color: var(--act-muted) !important;
  font-size: 10.5px !important;
  font-weight: 700 !important;
  letter-spacing: .06em !important;
}
#adminPanel#adminPanel#adminPanel#adminPanel#adminPanel.academy-workspace-shell #developerPaneTeams .academy-team-overview-grid strong {
  display: block;
  margin-top: 6px !important;
  color: var(--act-heading) !important;
  font-size: 20px !important;
  font-weight: 800 !important;
  line-height: 1.25 !important;
  overflow-wrap: anywhere;
}
#adminPanel#adminPanel#adminPanel#adminPanel#adminPanel.academy-workspace-shell #developerPaneTeams .academy-team-overview-grid article:nth-child(2) strong,
#adminPanel#adminPanel#adminPanel#adminPanel#adminPanel.academy-workspace-shell #developerPaneTeams .academy-team-overview-grid article:nth-child(4) strong { font-size: 15px !important; font-weight: 700 !important; }
#adminPanel#adminPanel#adminPanel#adminPanel#adminPanel.academy-workspace-shell #developerPaneTeams .academy-team-overview-grid article:nth-child(4) strong { text-transform: capitalize; }
#adminPanel#adminPanel#adminPanel#adminPanel#adminPanel.academy-workspace-shell #developerPaneTeams .academy-team-overview-note { display: block; margin-top: 4px; color: var(--act-muted); font-size: 12px; line-height: 1.4; overflow-wrap: anywhere; }
#adminPanel#adminPanel#adminPanel#adminPanel#adminPanel.academy-workspace-shell #developerPaneTeams .academy-team-manage-squad { margin-top: 16px !important; }

/* Squad */
#adminPanel#adminPanel#adminPanel#adminPanel#adminPanel.academy-workspace-shell #developerPaneTeams .team-squad-add {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) 110px 150px auto !important;
  gap: 10px !important;
  align-items: center;
}
#adminPanel#adminPanel#adminPanel#adminPanel#adminPanel.academy-workspace-shell #developerPaneTeams .team-squad-add > strong { grid-column: 1 / -1; color: var(--act-heading) !important; font-size: 13px !important; font-weight: 700 !important; }
#adminPanel#adminPanel#adminPanel#adminPanel#adminPanel.academy-workspace-shell #developerPaneTeams .team-squad-add > small { grid-column: 1 / -1; color: var(--act-muted); font-size: 12px; }
#adminPanel#adminPanel#adminPanel#adminPanel#adminPanel.academy-workspace-shell #developerPaneTeams .team-squad-add > button { min-height: 42px !important; }
#adminPanel#adminPanel#adminPanel#adminPanel#adminPanel.academy-workspace-shell #developerPaneTeams .team-squad-current { display: grid; gap: 8px; margin: 0 !important; padding: 0 !important; border: 0 !important; background: none !important; box-shadow: none !important; }
#adminPanel#adminPanel#adminPanel#adminPanel#adminPanel.academy-workspace-shell #developerPaneTeams .team-squad-current > h4 {
  margin: 0 0 2px !important;
  color: var(--act-muted) !important;
  font-size: 11px !important;
  font-weight: 800 !important;
  letter-spacing: .1em !important;
  text-transform: uppercase;
}
#adminPanel#adminPanel#adminPanel#adminPanel#adminPanel.academy-workspace-shell #developerPaneTeams .team-squad-current > .progress-empty,
#adminPanel#adminPanel#adminPanel#adminPanel#adminPanel.academy-workspace-shell #developerPaneTeams .team-staff-group .progress-empty {
  min-height: 0 !important;
  margin: 0 !important;
  padding: 12px 14px !important;
  border: 1px dashed var(--act-line) !important;
  border-radius: 10px !important;
  background: var(--act-inset) !important;
  color: var(--act-muted) !important;
  font-size: 12.5px !important;
  text-align: left !important;
}
#adminPanel#adminPanel#adminPanel#adminPanel#adminPanel.academy-workspace-shell #developerPaneTeams .team-squad-row.has-avatar {
  display: grid !important;
  grid-template-columns: 44px minmax(0, 1fr) 96px 140px auto auto !important;
  grid-template-areas: "avatar identity number type status actions";
  gap: 12px !important;
  align-items: center;
  margin: 0 !important;
  padding: 12px 14px !important;
  border: 1px solid var(--act-line) !important;
  border-radius: var(--act-radius) !important;
  background: var(--act-card) !important;
}
#adminPanel#adminPanel#adminPanel#adminPanel#adminPanel.academy-workspace-shell #developerPaneTeams .team-squad-row.has-avatar > .team-squad-avatar { grid-area: avatar; }
#adminPanel#adminPanel#adminPanel#adminPanel#adminPanel.academy-workspace-shell #developerPaneTeams .team-squad-row.has-avatar > div:not(.mini-actions):not(.team-squad-avatar) { grid-area: identity; min-width: 0; }
#adminPanel#adminPanel#adminPanel#adminPanel#adminPanel.academy-workspace-shell #developerPaneTeams .team-squad-row.has-avatar > .team-squad-field:nth-of-type(1) { grid-area: number; }
#adminPanel#adminPanel#adminPanel#adminPanel#adminPanel.academy-workspace-shell #developerPaneTeams .team-squad-row.has-avatar > .team-squad-field:nth-of-type(2) { grid-area: type; }
#adminPanel#adminPanel#adminPanel#adminPanel#adminPanel.academy-workspace-shell #developerPaneTeams .team-squad-row.has-avatar > .academy-team-status { grid-area: status; justify-self: start; }
#adminPanel#adminPanel#adminPanel#adminPanel#adminPanel.academy-workspace-shell #developerPaneTeams .team-squad-row.has-avatar > .mini-actions { grid-area: actions; }
#adminPanel#adminPanel#adminPanel#adminPanel#adminPanel.academy-workspace-shell #developerPaneTeams .team-squad-avatar {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  overflow: hidden;
  border-radius: 50%;
  background: var(--act-teal-soft);
  color: var(--act-teal-strong);
  font-size: 13px;
  font-weight: 800;
}
#adminPanel#adminPanel#adminPanel#adminPanel#adminPanel.academy-workspace-shell #developerPaneTeams .team-squad-avatar img { width: 100%; height: 100%; object-fit: cover; }
#adminPanel#adminPanel#adminPanel#adminPanel#adminPanel.academy-workspace-shell #developerPaneTeams .team-squad-row strong { display: block; color: var(--act-heading) !important; font-size: 14px !important; font-weight: 700 !important; line-height: 1.3 !important; overflow-wrap: anywhere; }
#adminPanel#adminPanel#adminPanel#adminPanel#adminPanel.academy-workspace-shell #developerPaneTeams .team-squad-row small { display: block; margin-top: 2px; color: var(--act-muted) !important; font-size: 12px !important; line-height: 1.4 !important; overflow-wrap: anywhere; }
#adminPanel#adminPanel#adminPanel#adminPanel#adminPanel.academy-workspace-shell #developerPaneTeams .team-squad-field { display: block; min-width: 0; margin: 0 !important; }
#adminPanel#adminPanel#adminPanel#adminPanel#adminPanel.academy-workspace-shell #developerPaneTeams .team-squad-field > span { display: block; margin-bottom: 4px; color: var(--act-muted); font-size: 10.5px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; }
#adminPanel#adminPanel#adminPanel#adminPanel#adminPanel.academy-workspace-shell #developerPaneTeams .team-squad-row .mini-actions { display: flex !important; flex-wrap: nowrap !important; gap: 6px !important; justify-content: flex-end; }
#adminPanel#adminPanel#adminPanel#adminPanel#adminPanel.academy-workspace-shell #developerPaneTeams .team-squad-row .mini-actions button { white-space: nowrap; }
#adminPanel#adminPanel#adminPanel#adminPanel#adminPanel.academy-workspace-shell #developerPaneTeams .team-squad-row .mini-actions button:not(.is-destructive) {
  border: 1px solid var(--act-line) !important;
  background: var(--act-card) !important;
  background-image: none !important;
  color: var(--act-heading) !important;
}
#adminPanel#adminPanel#adminPanel#adminPanel#adminPanel.academy-workspace-shell #developerPaneTeams .team-squad-history { margin-top: 16px !important; padding-top: 12px !important; border-top: 1px solid var(--act-line) !important; }
#adminPanel#adminPanel#adminPanel#adminPanel#adminPanel.academy-workspace-shell #developerPaneTeams :is(.team-squad-history, .team-staff-history) summary { min-height: 40px; display: flex; align-items: center; color: var(--act-heading) !important; font-size: 13px !important; font-weight: 700 !important; cursor: pointer; }
#adminPanel#adminPanel#adminPanel#adminPanel#adminPanel.academy-workspace-shell #developerPaneTeams .team-squad-history-row { grid-template-columns: minmax(0, 1fr) auto auto !important; gap: 12px !important; padding: 10px 2px !important; border-bottom: 1px solid var(--act-line) !important; }
#adminPanel#adminPanel#adminPanel#adminPanel#adminPanel.academy-workspace-shell #developerPaneTeams .team-squad-history-row strong { color: var(--act-heading) !important; font-size: 13px !important; overflow-wrap: anywhere; }
#adminPanel#adminPanel#adminPanel#adminPanel#adminPanel.academy-workspace-shell #developerPaneTeams .team-squad-history-row small,
#adminPanel#adminPanel#adminPanel#adminPanel#adminPanel.academy-workspace-shell #developerPaneTeams .team-squad-history-row > span:nth-child(2) { color: var(--act-muted) !important; font-size: 12px !important; }
#adminPanel#adminPanel#adminPanel#adminPanel#adminPanel.academy-workspace-shell #developerPaneTeams .team-squad-history-row b { color: var(--act-heading) !important; font-size: 12px !important; }

/* Coaching Staff: grouped by role, compact rows. */
#adminPanel#adminPanel#adminPanel#adminPanel#adminPanel.academy-workspace-shell #developerPaneTeams .team-staff-view { overflow: visible !important; }
#adminPanel#adminPanel#adminPanel#adminPanel#adminPanel.academy-workspace-shell #developerPaneTeams #academyTeamStaffCurrent { display: grid; gap: 16px; }
#adminPanel#adminPanel#adminPanel#adminPanel#adminPanel.academy-workspace-shell #developerPaneTeams .team-staff-group { display: grid; gap: 8px; margin: 0 !important; }
#adminPanel#adminPanel#adminPanel#adminPanel#adminPanel.academy-workspace-shell #developerPaneTeams .team-staff-group > h4 {
  margin: 0 !important;
  color: var(--act-muted) !important;
  font-size: 11px !important;
  font-weight: 800 !important;
  letter-spacing: .1em !important;
  text-transform: uppercase;
}
#adminPanel#adminPanel#adminPanel#adminPanel#adminPanel.academy-workspace-shell #developerPaneTeams .team-staff-row {
  position: relative;
  display: grid !important;
  grid-template-columns: 40px minmax(0, 1fr) auto !important;
  gap: 12px !important;
  align-items: center;
  margin: 0 !important;
  padding: 12px 14px !important;
  border: 1px solid var(--act-line) !important;
  border-radius: var(--act-radius) !important;
  background: var(--act-card) !important;
  box-shadow: none !important;
}
#adminPanel#adminPanel#adminPanel#adminPanel#adminPanel.academy-workspace-shell #developerPaneTeams .team-staff-avatar {
  position: static !important;
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  border-radius: 50% !important;
  background: var(--act-teal-soft) !important;
  color: var(--act-teal-strong) !important;
  font-size: 12px;
  font-weight: 800;
}
#adminPanel#adminPanel#adminPanel#adminPanel#adminPanel.academy-workspace-shell #developerPaneTeams .team-staff-row > div { min-width: 0; }
#adminPanel#adminPanel#adminPanel#adminPanel#adminPanel.academy-workspace-shell #developerPaneTeams .team-staff-row strong { display: block; color: var(--act-heading) !important; font-size: 14px !important; font-weight: 700 !important; overflow-wrap: anywhere; }
#adminPanel#adminPanel#adminPanel#adminPanel#adminPanel.academy-workspace-shell #developerPaneTeams .team-staff-row small { display: block; margin-top: 2px; color: var(--act-muted) !important; font-size: 12px !important; line-height: 1.4; overflow-wrap: anywhere; }
#adminPanel#adminPanel#adminPanel#adminPanel#adminPanel.academy-workspace-shell #developerPaneTeams .team-staff-row > span:not(.team-staff-avatar) { color: var(--act-muted) !important; font-size: 12px !important; }
#adminPanel#adminPanel#adminPanel#adminPanel#adminPanel.academy-workspace-shell #developerPaneTeams .team-staff-row > button { grid-column: auto !important; width: auto !important; justify-self: end !important; white-space: nowrap; }
#adminPanel#adminPanel#adminPanel#adminPanel#adminPanel.academy-workspace-shell #developerPaneTeams .team-staff-assign-open {
  flex: 0 0 auto;
  min-height: 42px !important;
  padding: 9px 16px !important;
  border: 1px solid var(--act-teal) !important;
  border-radius: 10px !important;
  background: var(--act-teal) !important;
  background-image: none !important;
  color: #052b34 !important;
  font-size: 13px !important;
  font-weight: 700 !important;
  white-space: nowrap;
}
#adminPanel#adminPanel#adminPanel#adminPanel#adminPanel.academy-workspace-shell #developerPaneTeams .team-staff-assign-open:disabled { cursor: not-allowed; opacity: .55; }
#adminPanel#adminPanel#adminPanel#adminPanel#adminPanel.academy-workspace-shell #developerPaneTeams .team-staff-history { margin-top: 16px !important; padding-top: 8px; border-top: 1px solid var(--act-line); }
#adminPanel#adminPanel#adminPanel#adminPanel#adminPanel.academy-workspace-shell #developerPaneTeams .team-staff-history > div { display: grid; gap: 8px; }

/* Development: responsive cards. */
#adminPanel#adminPanel#adminPanel#adminPanel#adminPanel.academy-workspace-shell #developerPaneTeams .development-intelligence-panel { padding: 20px 22px 22px !important; }
#adminPanel#adminPanel#adminPanel#adminPanel#adminPanel.academy-workspace-shell #developerPaneTeams .development-intelligence-head { display: block !important; min-width: 0; margin: 0 0 14px !important; }
/* The team selector + Load control are hidden: Development follows the
   Command Center's selected team (loadAcademyTeamDevelopment). */
#adminPanel#adminPanel#adminPanel#adminPanel#adminPanel.academy-workspace-shell #developerPaneTeams .development-intelligence-head > div:last-child { display: none !important; }
#adminPanel#adminPanel#adminPanel#adminPanel#adminPanel.academy-workspace-shell #developerPaneTeams #academyDevelopmentIntelligence { min-width: 0; max-width: 100%; }
#adminPanel#adminPanel#adminPanel#adminPanel#adminPanel.academy-workspace-shell #developerPaneTeams #academyDevelopmentIntelligence.development-intelligence-empty,
#adminPanel#adminPanel#adminPanel#adminPanel#adminPanel.academy-workspace-shell #developerPaneTeams #academyDevelopmentIntelligence > .progress-empty {
  padding: 16px !important;
  border: 1px dashed var(--act-line) !important;
  border-radius: 10px !important;
  background: var(--act-inset) !important;
  color: var(--act-muted) !important;
  font-size: 13px;
}
#adminPanel#adminPanel#adminPanel#adminPanel#adminPanel.academy-workspace-shell #developerPaneTeams #academyDevelopmentIntelligence :is(.shared-pattern-row, .development-attention-card) {
  min-width: 0;
  padding: 14px 16px !important;
  border: 1px solid var(--act-line) !important;
  border-radius: var(--act-radius) !important;
  background: var(--act-card) !important;
  overflow-wrap: anywhere;
}
#adminPanel#adminPanel#adminPanel#adminPanel#adminPanel.academy-workspace-shell #developerPaneTeams #academyDevelopmentIntelligence .shared-pattern-row > strong { color: var(--act-heading); font-size: 14px; }
#adminPanel#adminPanel#adminPanel#adminPanel#adminPanel.academy-workspace-shell #developerPaneTeams #academyDevelopmentIntelligence .shared-pattern-row > span { color: var(--act-teal-strong); font-size: 12.5px; }
#adminPanel#adminPanel#adminPanel#adminPanel#adminPanel.academy-workspace-shell #developerPaneTeams #academyDevelopmentIntelligence .shared-pattern-row > small { color: var(--act-muted); font-size: 12px; line-height: 1.5; }
#adminPanel#adminPanel#adminPanel#adminPanel#adminPanel.academy-workspace-shell #developerPaneTeams #academyDevelopmentIntelligence .development-flag-badge { font-size: 11px; font-weight: 700; }
#adminPanel#adminPanel#adminPanel#adminPanel#adminPanel.academy-workspace-shell #developerPaneTeams #academyDevelopmentIntelligence :is(img, svg, canvas, table) { max-width: 100%; }

/* ---------- Tablet ---------- */
@media (max-width: 1180px) {
  #adminPanel#adminPanel#adminPanel#adminPanel#adminPanel.academy-workspace-shell #developerPaneTeams .team-squad-row.has-avatar {
    grid-template-columns: 44px minmax(0, 120px) minmax(0, 170px) minmax(0, 1fr) !important;
    grid-template-areas:
      "avatar identity identity status"
      "avatar number   type     actions";
    row-gap: 10px !important;
  }
  #adminPanel#adminPanel#adminPanel#adminPanel#adminPanel.academy-workspace-shell #developerPaneTeams .team-squad-row.has-avatar > .academy-team-status { justify-self: end; }
  #adminPanel#adminPanel#adminPanel#adminPanel#adminPanel.academy-workspace-shell #developerPaneTeams .team-squad-row.has-avatar > .mini-actions { align-self: end; }
}
@media (max-width: 1100px) {
  #adminPanel#adminPanel#adminPanel#adminPanel#adminPanel.academy-workspace-shell #developerPaneTeams #academyTeamSummary { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
  #adminPanel#adminPanel#adminPanel#adminPanel#adminPanel.academy-workspace-shell #developerPaneTeams .academy-team-overview-grid { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
  #adminPanel#adminPanel#adminPanel#adminPanel#adminPanel.academy-workspace-shell #developerPaneTeams .academy-team-toolbar { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  #adminPanel#adminPanel#adminPanel#adminPanel#adminPanel.academy-workspace-shell #developerPaneTeams .academy-team-toolbar .academy-team-search { grid-column: 1 / -1; }
}

/* ---------- Mobile (<=768px): stacked, recomposed layout ---------- */
@media (max-width: 768px) {
  #adminPanel#adminPanel#adminPanel#adminPanel#adminPanel.academy-workspace-shell[data-academy-pane="teams"] > .academy-shell-page-heading { grid-template-columns: minmax(0, 1fr); padding-bottom: 10px !important; }
  #adminPanel#adminPanel#adminPanel#adminPanel#adminPanel.academy-workspace-shell[data-academy-pane="teams"] .academy-teams-page-actions { grid-column: 1; grid-row: auto; display: grid; margin-top: 12px; }
  #adminPanel#adminPanel#adminPanel#adminPanel#adminPanel.academy-workspace-shell .academy-teams-page-actions .academy-add-team { width: 100%; }

  #adminPanel#adminPanel#adminPanel#adminPanel#adminPanel.academy-workspace-shell #developerPaneTeams .team-management-shell { gap: 12px !important; }
  #adminPanel#adminPanel#adminPanel#adminPanel#adminPanel.academy-workspace-shell #developerPaneTeams #academyTeamSummary { gap: 10px !important; }
  #adminPanel#adminPanel#adminPanel#adminPanel#adminPanel.academy-workspace-shell #developerPaneTeams #academyTeamSummary .academy-team-kpi { min-height: 72px !important; padding: 11px 12px !important; column-gap: 10px; grid-template-columns: 36px minmax(0, 1fr); }
  #adminPanel#adminPanel#adminPanel#adminPanel#adminPanel.academy-workspace-shell #developerPaneTeams #academyTeamSummary .academy-team-kpi > i { width: 36px !important; height: 36px !important; }
  #adminPanel#adminPanel#adminPanel#adminPanel#adminPanel.academy-workspace-shell #developerPaneTeams #academyTeamSummary .academy-team-kpi > strong { display: -webkit-box; white-space: normal; overflow-wrap: anywhere; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
  #adminPanel#adminPanel#adminPanel#adminPanel#adminPanel.academy-workspace-shell #developerPaneTeams #academyTeamSummary .academy-team-kpi > b { font-size: 20px !important; }

  #adminPanel#adminPanel#adminPanel#adminPanel#adminPanel.academy-workspace-shell #developerPaneTeams .academy-team-toolbar { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; padding: 12px; }
  #adminPanel#adminPanel#adminPanel#adminPanel#adminPanel.academy-workspace-shell #developerPaneTeams .academy-team-toolbar .academy-team-search { grid-column: 1 / -1; }
  #adminPanel#adminPanel#adminPanel#adminPanel#adminPanel.academy-workspace-shell #developerPaneTeams .academy-team-toolbar label:last-child { grid-column: 1 / -1; }

  /* Selector: two compact columns. */
  #adminPanel#adminPanel#adminPanel#adminPanel#adminPanel.academy-workspace-shell #developerPaneTeams .academy-team-selector { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  #adminPanel#adminPanel#adminPanel#adminPanel#adminPanel.academy-workspace-shell #developerPaneTeams .academy-team-option { min-height: 52px !important; padding: 8px 12px !important; }
  #adminPanel#adminPanel#adminPanel#adminPanel#adminPanel.academy-workspace-shell #developerPaneTeams .academy-team-option strong { display: -webkit-box; white-space: normal; overflow-wrap: anywhere; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }

  /* Command Center: name + status/menu beside it on tablets; phones below. */
  #adminPanel#adminPanel#adminPanel#adminPanel#adminPanel.academy-workspace-shell #developerPaneTeams #academyTeamDetailView { border: 1px solid var(--act-line) !important; border-radius: var(--act-radius) !important; overflow: visible !important; }
  #adminPanel#adminPanel#adminPanel#adminPanel#adminPanel.academy-workspace-shell #developerPaneTeams .academy-team-detail-head { grid-template-columns: minmax(0, 1fr) auto; align-items: start !important; gap: 10px !important; padding: 14px 14px 10px !important; }
  #adminPanel#adminPanel#adminPanel#adminPanel#adminPanel.academy-workspace-shell #developerPaneTeams .academy-team-detail-head h3 { font-size: 18px !important; }
  #adminPanel#adminPanel#adminPanel#adminPanel#adminPanel.academy-workspace-shell #developerPaneTeams .academy-team-detail-head p { font-size: 12px !important; }
  #adminPanel#adminPanel#adminPanel#adminPanel#adminPanel.academy-workspace-shell #developerPaneTeams .academy-team-detail-head > div:last-child { gap: 8px !important; align-self: start !important; }
  #adminPanel#adminPanel#adminPanel#adminPanel#adminPanel.academy-workspace-shell #developerPaneTeams .academy-team-menu summary { width: 44px !important; height: 44px !important; }
  #adminPanel#adminPanel#adminPanel#adminPanel#adminPanel.academy-workspace-shell #developerPaneTeams .academy-team-detail-tabs { padding: 0 6px !important; }
  #adminPanel#adminPanel#adminPanel#adminPanel#adminPanel.academy-workspace-shell #developerPaneTeams .academy-team-detail-tabs button { min-height: 46px !important; padding: 10px 11px !important; }
  #adminPanel#adminPanel#adminPanel#adminPanel#adminPanel.academy-workspace-shell #developerPaneTeams .academy-team-detail-tabs button::after { right: 8px; left: 8px; }
  #adminPanel#adminPanel#adminPanel#adminPanel#adminPanel.academy-workspace-shell #developerPaneTeams :is(.academy-team-detail-panel, .development-intelligence-panel) { padding: 16px 14px 18px !important; }
  #adminPanel#adminPanel#adminPanel#adminPanel#adminPanel.academy-workspace-shell #developerPaneTeams .academy-team-section-head { flex-direction: column !important; align-items: stretch !important; gap: 10px !important; }
  #adminPanel#adminPanel#adminPanel#adminPanel#adminPanel.academy-workspace-shell #developerPaneTeams .team-staff-assign-open { width: 100% !important; min-height: 44px !important; }

  #adminPanel#adminPanel#adminPanel#adminPanel#adminPanel.academy-workspace-shell #developerPaneTeams .academy-team-overview-grid { gap: 10px !important; }
  #adminPanel#adminPanel#adminPanel#adminPanel#adminPanel.academy-workspace-shell #developerPaneTeams .academy-team-overview-grid article { padding: 12px !important; }
  #adminPanel#adminPanel#adminPanel#adminPanel#adminPanel.academy-workspace-shell #developerPaneTeams .academy-team-overview-grid strong { font-size: 18px !important; }
  #adminPanel#adminPanel#adminPanel#adminPanel#adminPanel.academy-workspace-shell #developerPaneTeams .academy-team-overview-grid article:nth-child(2) strong,
  #adminPanel#adminPanel#adminPanel#adminPanel#adminPanel.academy-workspace-shell #developerPaneTeams .academy-team-overview-grid article:nth-child(4) strong { font-size: 14px !important; }
  #adminPanel#adminPanel#adminPanel#adminPanel#adminPanel.academy-workspace-shell #developerPaneTeams .academy-team-manage-squad { width: 100%; min-height: 44px !important; }

  #adminPanel#adminPanel#adminPanel#adminPanel#adminPanel.academy-workspace-shell #developerPaneTeams .team-squad-add { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) !important; }
  #adminPanel#adminPanel#adminPanel#adminPanel#adminPanel.academy-workspace-shell #developerPaneTeams .team-squad-add > select:first-of-type { grid-column: 1 / -1; }
  #adminPanel#adminPanel#adminPanel#adminPanel#adminPanel.academy-workspace-shell #developerPaneTeams .team-squad-add > button { grid-column: 1 / -1; width: 100%; min-height: 44px !important; }
  #adminPanel#adminPanel#adminPanel#adminPanel#adminPanel.academy-workspace-shell #developerPaneTeams :is(.team-squad-add, .team-squad-row, .team-staff-assignment-form) :is(input, select) { height: 44px !important; min-height: 44px !important; }

  /* Squad player card. */
  #adminPanel#adminPanel#adminPanel#adminPanel#adminPanel.academy-workspace-shell #developerPaneTeams .team-squad-row.has-avatar {
    grid-template-columns: 44px minmax(0, 1fr) minmax(0, 1fr) auto !important;
    grid-template-areas:
      "avatar identity identity status"
      "number  number  type     type"
      "actions actions actions  actions";
    gap: 10px !important;
    padding: 12px !important;
  }
  #adminPanel#adminPanel#adminPanel#adminPanel#adminPanel.academy-workspace-shell #developerPaneTeams .team-squad-row.has-avatar > .academy-team-status { align-self: start; }
  #adminPanel#adminPanel#adminPanel#adminPanel#adminPanel.academy-workspace-shell #developerPaneTeams .team-squad-row.has-avatar > .mini-actions { display: grid !important; grid-template-columns: minmax(0, .8fr) minmax(0, 1.4fr); }
  #adminPanel#adminPanel#adminPanel#adminPanel#adminPanel.academy-workspace-shell #developerPaneTeams .team-squad-row .mini-actions button { width: 100%; min-height: 44px !important; padding: 8px 10px !important; white-space: normal; }
  #adminPanel#adminPanel#adminPanel#adminPanel#adminPanel.academy-workspace-shell #developerPaneTeams .team-squad-history-row { grid-template-columns: minmax(0, 1fr) auto !important; gap: 4px 12px !important; }
  #adminPanel#adminPanel#adminPanel#adminPanel#adminPanel.academy-workspace-shell #developerPaneTeams .team-squad-history-row > span:nth-child(2) { grid-column: 1; grid-row: 2; }
  #adminPanel#adminPanel#adminPanel#adminPanel#adminPanel.academy-workspace-shell #developerPaneTeams .team-squad-history-row > b { grid-column: 2; grid-row: 1 / span 2; align-self: center; }

  /* Staff rows: avatar + identity, action beneath. */
  #adminPanel#adminPanel#adminPanel#adminPanel#adminPanel.academy-workspace-shell #developerPaneTeams #academyTeamStaffCurrent { gap: 12px; }
  #adminPanel#adminPanel#adminPanel#adminPanel#adminPanel.academy-workspace-shell #developerPaneTeams .team-staff-group { gap: 6px; }
  #adminPanel#adminPanel#adminPanel#adminPanel#adminPanel.academy-workspace-shell #developerPaneTeams .team-staff-row { grid-template-columns: 40px minmax(0, 1fr) !important; row-gap: 8px !important; padding: 12px !important; }
  #adminPanel#adminPanel#adminPanel#adminPanel#adminPanel.academy-workspace-shell #developerPaneTeams .team-staff-row > button,
  #adminPanel#adminPanel#adminPanel#adminPanel#adminPanel.academy-workspace-shell #developerPaneTeams .team-staff-row > span:not(.team-staff-avatar) { grid-column: 2 !important; justify-self: start !important; }
  #adminPanel#adminPanel#adminPanel#adminPanel#adminPanel.academy-workspace-shell #developerPaneTeams .team-staff-row > button { min-height: 44px !important; }
  #adminPanel#adminPanel#adminPanel#adminPanel#adminPanel.academy-workspace-shell #developerPaneTeams .team-staff-assignment-form .grid { grid-template-columns: minmax(0, 1fr) !important; }
  #adminPanel#adminPanel#adminPanel#adminPanel#adminPanel.academy-workspace-shell #developerPaneTeams #academyTeamCoachSave { width: 100%; }

}

/* ---------- Phones ---------- */
@media (max-width: 480px) {
  /* Team name gets the full width and wraps; the age group / season line
     shares the next row with status and the ••• menu. */
  #adminPanel#adminPanel#adminPanel#adminPanel#adminPanel.academy-workspace-shell #developerPaneTeams .academy-team-detail-head {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas: "name name" "meta actions";
    align-items: center !important;
    gap: 2px 10px !important;
    padding: 12px 14px 6px !important;
  }
  #adminPanel#adminPanel#adminPanel#adminPanel#adminPanel.academy-workspace-shell #developerPaneTeams .academy-team-detail-head > div:first-child { display: contents; }
  #adminPanel#adminPanel#adminPanel#adminPanel#adminPanel.academy-workspace-shell #developerPaneTeams .academy-team-detail-head h3 { grid-area: name; margin: 0 !important; }
  #adminPanel#adminPanel#adminPanel#adminPanel#adminPanel.academy-workspace-shell #developerPaneTeams .academy-team-detail-head p { grid-area: meta; min-width: 0; overflow-wrap: anywhere; }
  #adminPanel#adminPanel#adminPanel#adminPanel#adminPanel.academy-workspace-shell #developerPaneTeams .academy-team-detail-head > div:last-child { grid-area: actions; justify-content: flex-end !important; align-self: center !important; }
  /* Four tabs share one row down to ~360px with tight side padding; the
     strip keeps horizontal scroll only for narrower screens. */
  #adminPanel#adminPanel#adminPanel#adminPanel#adminPanel.academy-workspace-shell #developerPaneTeams .academy-team-detail-tabs { justify-content: space-between; gap: 0 !important; padding: 0 2px !important; }
  #adminPanel#adminPanel#adminPanel#adminPanel#adminPanel.academy-workspace-shell #developerPaneTeams .academy-team-detail-tabs button { min-width: 0; padding: 10px 6px !important; font-size: 12.5px !important; letter-spacing: -.005em; }
  #adminPanel#adminPanel#adminPanel#adminPanel#adminPanel.academy-workspace-shell #developerPaneTeams .academy-team-detail-tabs button::after { right: 4px; left: 4px; }
}

/* ---------- Narrow phones ---------- */
@media (max-width: 400px) {
  #adminPanel#adminPanel#adminPanel#adminPanel#adminPanel.academy-workspace-shell #developerPaneTeams .academy-team-toolbar { grid-template-columns: minmax(0, 1fr); }
  #adminPanel#adminPanel#adminPanel#adminPanel#adminPanel.academy-workspace-shell #developerPaneTeams .academy-team-toolbar label { grid-column: auto !important; }
  #adminPanel#adminPanel#adminPanel#adminPanel#adminPanel.academy-workspace-shell #developerPaneTeams #academyTeamSummary { gap: 8px !important; }
  #adminPanel#adminPanel#adminPanel#adminPanel#adminPanel.academy-workspace-shell #developerPaneTeams #academyTeamSummary .academy-team-kpi { min-height: 66px !important; padding: 10px !important; column-gap: 8px; grid-template-columns: 30px minmax(0, 1fr); }
  #adminPanel#adminPanel#adminPanel#adminPanel#adminPanel.academy-workspace-shell #developerPaneTeams #academyTeamSummary .academy-team-kpi > i { width: 30px !important; height: 30px !important; }
  #adminPanel#adminPanel#adminPanel#adminPanel#adminPanel.academy-workspace-shell #developerPaneTeams #academyTeamSummary .academy-team-kpi svg { width: 16px; height: 16px; }
  #adminPanel#adminPanel#adminPanel#adminPanel#adminPanel.academy-workspace-shell #developerPaneTeams #academyTeamSummary .academy-team-kpi > strong { font-size: 11px !important; }
  #adminPanel#adminPanel#adminPanel#adminPanel#adminPanel.academy-workspace-shell #developerPaneTeams #academyTeamSummary .academy-team-kpi > b { font-size: 18px !important; }
  #adminPanel#adminPanel#adminPanel#adminPanel#adminPanel.academy-workspace-shell #developerPaneTeams #academyTeamSummary .academy-team-kpi > small { font-size: 10px !important; }
  #adminPanel#adminPanel#adminPanel#adminPanel#adminPanel.academy-workspace-shell #developerPaneTeams .team-squad-row.has-avatar > .mini-actions { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 360px) {
  #adminPanel#adminPanel#adminPanel#adminPanel#adminPanel.academy-workspace-shell #developerPaneTeams .team-squad-row.has-avatar { grid-template-columns: 40px minmax(0, 1fr) minmax(0, 1fr) auto !important; }
  #adminPanel#adminPanel#adminPanel#adminPanel#adminPanel.academy-workspace-shell #developerPaneTeams .team-squad-avatar { width: 40px; height: 40px; }
}
/* Below 390px the four tabs scroll inside the strip: start-aligned, with a
   14px end spacer (flex item, so it counts toward the scroll width in every
   engine) so Development scrolls fully into view with breathing room. */
@media (max-width: 389px) {
  #adminPanel#adminPanel#adminPanel#adminPanel#adminPanel.academy-workspace-shell #developerPaneTeams .academy-team-detail-tabs { justify-content: flex-start; }
  #adminPanel#adminPanel#adminPanel#adminPanel#adminPanel.academy-workspace-shell #developerPaneTeams .academy-team-detail-tabs::after { content: ""; flex: 0 0 14px; }
}
/* ~320px: single-column Overview and selector rather than squeezed pairs. */
@media (max-width: 340px) {
  #adminPanel#adminPanel#adminPanel#adminPanel#adminPanel.academy-workspace-shell #developerPaneTeams :is(.academy-team-overview-grid, .academy-team-selector) { grid-template-columns: minmax(0, 1fr) !important; }
}

@media (prefers-reduced-motion: reduce) {
  #adminPanel#adminPanel#adminPanel#adminPanel#adminPanel.academy-workspace-shell #developerPaneTeams .academy-team-option { transition: none !important; }
}
