/* AI4Sport Phase D — coach workspace surfaces. */

.coach-subpage-panel {
  background:
    radial-gradient(circle at 100% 0, rgba(36, 99, 233, 0.08), transparent 17rem),
    linear-gradient(145deg, rgba(255, 255, 255, 0.98), rgba(248, 252, 255, 0.96));
  min-height: 520px;
}

.coach-subpage-heading {
  align-items: flex-start;
  margin-bottom: 24px;
}

.coach-subpage-heading h3 {
  color: #263d5e;
  font-size: 28px;
  letter-spacing: -0.05em;
  margin-top: 8px;
}

.coach-page-badge {
  align-items: center;
  background: #eef5ff;
  border: 1px solid #dceaff;
  border-radius: 999px;
  color: var(--color-primary);
  display: inline-flex;
  font-size: 10px;
  font-weight: 850;
  letter-spacing: 0.12em;
  min-height: 28px;
  padding: 0 11px;
  white-space: nowrap;
}

.coach-page-toolbar {
  align-items: center;
  background: linear-gradient(105deg, #f7faff, #fafdff);
  border: 1px solid #e4edf8;
  border-radius: 16px;
  display: flex;
  gap: 18px;
  justify-content: space-between;
  margin-bottom: 17px;
  padding: 12px 13px 12px 16px;
}

.coach-toolbar-summary {
  display: grid;
  gap: 3px;
  min-width: 150px;
}

.coach-toolbar-summary strong {
  color: #4a5d79;
  font-size: 12px;
  font-weight: 750;
}

.coach-toolbar-controls {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.coach-filter-field {
  align-items: center;
  display: inline-flex;
  min-width: 250px;
  position: relative;
}

.coach-filter-field > .ui-icon {
  color: #9aaac0;
  height: 15px;
  left: 11px;
  pointer-events: none;
  position: absolute;
  width: 15px;
  z-index: 1;
}

.coach-filter-field input,
.coach-filter-select {
  background: #fff;
  border: 1px solid #dfe8f3;
  border-radius: 10px;
  color: #50627d;
  font-size: 12px;
  font-weight: 650;
  height: 36px;
  outline: 0;
  transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.coach-filter-field input {
  padding: 0 12px 0 33px;
  width: 100%;
}

.coach-filter-select {
  cursor: pointer;
  min-width: 112px;
  padding: 0 29px 0 11px;
}

.coach-filter-field input::placeholder {
  color: #a5b2c3;
  font-weight: 550;
}

.coach-filter-field input:focus,
.coach-filter-select:focus {
  background: #fbfdff;
  border-color: #a9c6f6;
  box-shadow: 0 0 0 3px rgba(36, 99, 233, 0.09);
}

.coach-task-list {
  display: grid;
  gap: 10px;
}

.coach-task-card {
  align-items: center;
  background: linear-gradient(105deg, #fff, #fbfdff);
  border: 1px solid #e5edf7;
  border-radius: 16px;
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(230px, 1.4fr) minmax(120px, 0.72fr) minmax(120px, 0.75fr) auto;
  min-height: 92px;
  padding: 14px 15px;
  transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.coach-task-card:hover {
  border-color: #c7dcff;
  box-shadow: 0 13px 25px rgba(39, 93, 157, 0.08);
  transform: translateY(-2px);
}

.coach-task-main,
.coach-task-assignee,
.coach-task-signal,
.coach-task-action {
  min-width: 0;
}

.coach-task-main,
.coach-task-assignee {
  align-items: center;
  display: flex;
  gap: 11px;
}

.coach-task-symbol {
  flex: 0 0 40px;
  height: 40px;
  width: 40px;
}

.coach-task-symbol .ui-icon {
  height: 18px;
  width: 18px;
}

.coach-task-main strong,
.coach-task-main small,
.coach-task-code,
.coach-task-assignee strong,
.coach-task-assignee span,
.coach-task-signal span,
.coach-task-signal small {
  display: block;
}

.coach-task-main strong {
  color: #334b6c;
  font-size: 14px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.coach-task-main small {
  color: #8a9aae;
  font-size: 11px;
  margin-top: 4px;
  max-width: 330px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.coach-task-code {
  color: #9aabc0;
  font-size: 9px;
  font-weight: 850;
  letter-spacing: 0.12em;
  margin-bottom: 4px;
}

.coach-mini-avatar,
.coach-player-avatar {
  align-items: center;
  background: linear-gradient(145deg, #dceaff, #e5fbff);
  border: 1px solid #cfe2fb;
  border-radius: 11px;
  color: var(--color-primary);
  display: inline-flex;
  flex: 0 0 auto;
  font-size: 12px;
  font-weight: 850;
  height: 34px;
  justify-content: center;
  width: 34px;
}

.coach-task-assignee span {
  color: #a0adbd;
  font-size: 10px;
}

.coach-task-assignee strong {
  color: #50627d;
  font-size: 12px;
  margin-top: 3px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.coach-task-signal > div:first-child,
.coach-player-progress > div:first-child {
  align-items: center;
  display: flex;
  justify-content: space-between;
}

.coach-task-signal span,
.coach-player-progress span {
  color: #95a4b8;
  font-size: 10px;
}

.coach-task-signal strong,
.coach-player-progress strong {
  color: #526782;
  font-size: 12px;
}

.coach-progress-track {
  background: #e9eff6;
  border-radius: 99px;
  height: 6px;
  margin: 8px 0 5px;
  overflow: hidden;
}

.coach-progress-track i {
  background: linear-gradient(90deg, var(--color-primary), var(--color-cyan));
  border-radius: inherit;
  display: block;
  height: 100%;
  transform-origin: left center;
  animation: coachProgressReveal 700ms cubic-bezier(0.2, 0.75, 0.25, 1) both;
}

.coach-task-signal small,
.coach-player-progress small {
  color: #a3afbf;
  font-size: 10px;
}

.coach-task-action {
  align-items: flex-end;
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.coach-task-action .task-open {
  align-items: center;
  display: inline-flex;
  gap: 4px;
  white-space: nowrap;
}

.coach-empty-state {
  align-items: center;
  background: linear-gradient(145deg, #f8fbff, #fcfdff);
  border: 1px dashed #d9e5f4;
  border-radius: 16px;
  color: #8998aa;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 245px;
  padding: 24px;
  text-align: center;
}

.coach-empty-state .empty-illustration {
  margin-bottom: 11px;
}

.coach-empty-state strong {
  color: #52647d;
  font-size: 14px;
}

.coach-empty-state p {
  font-size: 12px;
  margin: 7px 0 0;
}

.coach-player-grid,
.coach-knowledge-grid {
  display: grid;
  gap: 15px;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.coach-player-card,
.coach-knowledge-skill,
.coach-knowledge-topic {
  background: linear-gradient(145deg, #fff, #fbfdff);
  border: 1px solid #e3ebf5;
  border-radius: 17px;
  min-width: 0;
  padding: 18px;
  transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.coach-player-card:hover,
.coach-knowledge-skill:hover,
.coach-knowledge-topic:hover {
  border-color: #cadcff;
  box-shadow: 0 14px 26px rgba(43, 89, 150, 0.08);
  transform: translateY(-2px);
}

.coach-player-card-header,
.coach-player-identity,
.coach-player-meta,
.coach-player-card footer,
.coach-knowledge-card-top,
.coach-knowledge-skill footer {
  align-items: center;
  display: flex;
}

.coach-player-card-header,
.coach-knowledge-card-top,
.coach-knowledge-skill footer {
  justify-content: space-between;
}

.coach-player-identity {
  gap: 10px;
  min-width: 0;
}

.coach-player-avatar {
  border-radius: 13px;
  height: 42px;
  width: 42px;
}

.coach-player-identity strong,
.coach-player-identity small {
  display: block;
}

.coach-player-identity strong {
  color: #334b6c;
  font-size: 15px;
}

.coach-player-identity small {
  color: #9aa8b9;
  font-size: 10px;
  margin-top: 3px;
}

.coach-role-chip {
  background: #f0f5fb;
  border: 1px solid #e0e9f3;
  border-radius: 999px;
  color: #7b8da4;
  font-size: 10px;
  font-weight: 800;
  padding: 5px 8px;
  white-space: nowrap;
}

.coach-role-chip--player {
  background: #eef4ff;
  border-color: #d9e7ff;
  color: var(--color-primary);
}

.coach-role-chip--coach {
  background: #effbff;
  border-color: #d8f0f5;
  color: #0c9db6;
}

.coach-player-meta {
  border-bottom: 1px solid #edf2f7;
  border-top: 1px solid #edf2f7;
  color: #8998ab;
  font-size: 10px;
  gap: 7px;
  margin: 17px 0 15px;
  padding: 10px 0;
}

.coach-player-meta span {
  background: #f7f9fc;
  border-radius: 6px;
  padding: 4px 6px;
}

.coach-player-progress strong {
  color: var(--color-primary);
}

.coach-player-card footer {
  color: #9aa9ba;
  font-size: 10px;
  justify-content: space-between;
  margin-top: 16px;
}

.coach-signal-dot {
  background: #31c48d;
  border-radius: 50%;
  box-shadow: 0 0 0 4px rgba(49, 196, 141, 0.1);
  display: inline-block;
  height: 6px;
  margin-right: 7px;
  width: 6px;
}

.coach-player-task-link {
  align-items: center;
  background: transparent;
  border: 0;
  color: var(--color-primary);
  display: inline-flex;
  font-size: 11px;
  font-weight: 800;
  gap: 4px;
  padding: 0;
}

.coach-knowledge-summary {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-bottom: 19px;
}

.coach-knowledge-summary article {
  align-items: center;
  background: linear-gradient(135deg, #f8fbff, #eff6ff);
  border: 1px solid #deebfc;
  border-radius: 15px;
  display: flex;
  gap: 11px;
  min-height: 92px;
  padding: 14px;
}

.coach-knowledge-summary article:nth-child(2) {
  background: linear-gradient(135deg, #f7fdff, #eefbfd);
  border-color: #d9eff4;
}

.coach-knowledge-summary article:nth-child(3) {
  background: linear-gradient(135deg, #fbf9ff, #f6f0ff);
  border-color: #e7ddff;
}

.coach-knowledge-stat-icon,
.coach-knowledge-card-icon,
.coach-knowledge-topic-icon {
  align-items: center;
  background: #e7f0ff;
  border: 1px solid #d6e5ff;
  border-radius: 10px;
  color: var(--color-primary);
  display: inline-flex;
  flex: 0 0 auto;
  height: 33px;
  justify-content: center;
  width: 33px;
}

.coach-knowledge-stat-icon--cyan {
  background: #e8fbff;
  border-color: #d3f1f6;
  color: #0da4bc;
}

.coach-knowledge-stat-icon--purple {
  background: #f2edff;
  border-color: #e4d9ff;
  color: #7c5be2;
}

.coach-knowledge-stat-icon .ui-icon {
  height: 16px;
  width: 16px;
}

.coach-knowledge-summary span:not(.coach-knowledge-stat-icon) {
  color: #8999ae;
  display: block;
  font-size: 10px;
}

.coach-knowledge-summary strong,
.coach-knowledge-summary small {
  display: block;
}

.coach-knowledge-summary strong {
  color: #334b6c;
  font-size: 20px;
  letter-spacing: -0.04em;
  margin-top: 2px;
}

.coach-knowledge-summary small {
  color: #9ba9ba;
  font-size: 9px;
  margin-top: 2px;
}

.coach-knowledge-card-top {
  margin-bottom: 19px;
}

.coach-knowledge-card-icon {
  background: #eef4ff;
  height: 35px;
  width: 35px;
}

.coach-knowledge-card-icon .ui-icon,
.coach-knowledge-topic-icon .ui-icon {
  height: 17px;
  width: 17px;
}

.coach-knowledge-skill h4,
.coach-knowledge-topic h4 {
  color: #334b6c;
  font-size: 17px;
  letter-spacing: -0.025em;
  margin: 0;
}

.coach-knowledge-skill p,
.coach-knowledge-topic p {
  color: #8494a9;
  font-size: 12px;
  line-height: 1.7;
  margin: 10px 0 22px;
}

.coach-knowledge-skill footer {
  border-top: 1px solid #edf2f7;
  color: #99a8b8;
  font-size: 10px;
  padding-top: 12px;
}

.coach-knowledge-skill footer strong {
  color: var(--color-primary);
  font-size: 10px;
}

.coach-knowledge-topic {
  min-height: 208px;
}

.coach-knowledge-topic-icon {
  background: #eff8ff;
  margin-bottom: 16px;
}

.coach-topic-label {
  color: #9aabc0;
  display: block;
  font-size: 9px;
  font-weight: 850;
  letter-spacing: 0.13em;
  margin-bottom: 7px;
}

@keyframes coachProgressReveal {
  from { transform: scaleX(0); }
  to { transform: scaleX(1); }
}

@media (max-width: 1080px) {
  .coach-task-card {
    gap: 13px;
    grid-template-columns: minmax(220px, 1.3fr) minmax(115px, 0.7fr) auto;
  }

  .coach-task-signal {
    grid-column: 1 / span 2;
    margin-left: 51px;
  }

  .coach-task-action {
    grid-column: 3;
    grid-row: 1 / span 2;
  }
}

@media (max-width: 820px) {
  .coach-page-toolbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .coach-toolbar-controls {
    justify-content: flex-start;
    width: 100%;
  }

  .coach-filter-field {
    flex: 1 1 220px;
  }

  .coach-knowledge-summary {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .coach-subpage-heading {
    gap: 14px;
  }

  .coach-subpage-heading h3 {
    font-size: 25px;
  }

  .coach-toolbar-controls {
    align-items: stretch;
    flex-direction: column;
  }

  .coach-filter-field,
  .coach-filter-select {
    min-width: 0;
    width: 100%;
  }

  .coach-task-card {
    align-items: start;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .coach-task-main {
    grid-column: 1 / span 2;
  }

  .coach-task-assignee {
    grid-column: 1;
  }

  .coach-task-signal {
    grid-column: 1;
    margin-left: 0;
  }

  .coach-task-action {
    grid-column: 2;
    grid-row: 2 / span 2;
  }
}

@media (prefers-reduced-motion: reduce) {
  .coach-progress-track i {
    animation: none;
  }
}
.coach-invitation-list { margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--border-soft); }
.coach-invitation-list header { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.coach-invitation-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.coach-invitation-card { display: grid; gap: 8px; padding: 14px; border: 1px solid var(--border-soft); border-radius: 14px; background: #f8fbff; }
.coach-invitation-card footer { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
@media (max-width: 720px) { .coach-invitation-grid { grid-template-columns: 1fr; } }
