/* Tabella rosa pubblica — stili manager (scoped su .team-page) */

.team-page .is-on-market {
  background: rgba(59, 130, 246, 0.07);
  border-left: 3px solid rgba(96, 165, 250, 0.55);
}

.team-page .manager .chip-market {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-left: 8px;
  padding: 2px 6px;
  border-radius: 999px;
  font-size: 0.85rem;
  color: #93c5fd;
  background: rgba(37, 99, 235, 0.18);
  border: 1px solid rgba(96, 165, 250, 0.38);
  vertical-align: middle;
}

.team-page .manager .chip-market i {
  font-size: 0.9em;
  opacity: 0.95;
}

.team-page .manager td.actions {
  white-space: nowrap;
  text-align: right;
  vertical-align: middle;
}

.team-page .manager td.actions .mgr-act-btn,
.team-page .manager td.actions .mgr-loan-chip {
  vertical-align: middle;
}

.team-page .manager .mgr-loan-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  margin-right: 4px;
  border-radius: 8px;
  color: #fde68a;
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(251, 191, 36, 0.35);
}

.team-page .manager .mgr-loan-chip i {
  font-size: 12px;
}

.team-page .manager .mgr-act-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  margin: 0;
  padding: 0;
  border-radius: 10px;
  cursor: pointer;
  color: #e0f2fe;
  background: linear-gradient(180deg, rgba(37, 99, 235, 0.42), rgba(29, 78, 216, 0.32));
  border: 1px solid rgba(96, 165, 250, 0.45);
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.15);
  transition: border-color 0.12s ease, box-shadow 0.12s ease, transform 0.08s ease, background 0.12s ease, color 0.12s ease;
  text-decoration: none;
}

.team-page .manager .mgr-act-btn:hover {
  border-color: rgba(147, 197, 253, 0.65);
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.28);
}

.team-page .manager .mgr-act-btn:active {
  transform: translateY(1px);
}

.team-page .manager .mgr-act-btn:focus-visible {
  outline: 2px solid rgba(147, 197, 253, 0.8);
  outline-offset: 2px;
}

.team-page .manager .mgr-act-btn i {
  font-size: 14px;
  line-height: 1;
  opacity: 0.95;
}

.team-page .manager .mgr-act-btn--ext {
  color: #ecfeff;
  background: linear-gradient(180deg, rgba(8, 145, 178, 0.48), rgba(14, 116, 144, 0.36));
  border-color: rgba(34, 211, 238, 0.5);
  box-shadow: 0 2px 8px rgba(8, 145, 178, 0.18);
  margin-left: 4px;
}

.team-page .manager .mgr-act-btn--ext:hover {
  border-color: rgba(103, 232, 249, 0.75);
  box-shadow: 0 4px 14px rgba(8, 145, 178, 0.3);
}

.team-page .manager .mgr-act-btn--ext.is-disabled,
.team-page .manager .mgr-act-btn--ext:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  box-shadow: none;
}

.team-page .manager .mgr-act-btn--fav {
  color: #fecdd3;
  background: linear-gradient(180deg, rgba(190, 24, 93, 0.38), rgba(157, 23, 77, 0.28));
  border-color: rgba(244, 114, 182, 0.45);
  box-shadow: 0 2px 8px rgba(190, 24, 93, 0.15);
  margin-left: 4px;
}

.team-page .manager .mgr-act-btn--fav:hover {
  border-color: rgba(251, 113, 133, 0.75);
  box-shadow: 0 4px 14px rgba(190, 24, 93, 0.28);
}

.team-page .manager .mgr-act-btn--fav.is-on {
  color: #fff1f2;
  background: linear-gradient(180deg, rgba(225, 29, 72, 0.62), rgba(190, 18, 60, 0.48));
  border-color: rgba(251, 113, 133, 0.65);
}

.team-page .manager .mgr-act-btn--fav.is-disabled,
.team-page .manager .mgr-act-btn--fav:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  box-shadow: none;
}

.team-page .team-roster-fav-form--inline {
  display: inline;
  margin: 0;
  padding: 0;
}

.team-page .manager .chip-removed {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-left: 6px;
  padding: 1px 5px;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  line-height: 1.2;
  color: #fca5a5;
  background: rgba(239, 68, 68, 0.14);
  border: 1px solid rgba(239, 68, 68, 0.35);
  vertical-align: middle;
  white-space: nowrap;
}

.team-page .manager .chip-removed .dot {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: #ef4444;
  display: inline-block;
  box-shadow: none;
  animation: none;
}

.team-page .mgr-ovr-delta-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-left: 6px;
  padding: 1px 7px;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 900;
  line-height: 1.2;
  border: 1px solid transparent;
}

.team-page .mgr-ovr-delta-chip--up {
  color: #16a34a;
  background: rgba(22, 163, 74, 0.14);
  border-color: rgba(22, 163, 74, 0.34);
}

.team-page .mgr-ovr-delta-chip--down {
  color: #dc2626;
  background: rgba(220, 38, 38, 0.14);
  border-color: rgba(220, 38, 38, 0.34);
}

.team-page .mgr-ovr-delta-chip--neutral {
  color: #cbd5e1;
  background: rgba(148, 163, 184, 0.16);
  border-color: rgba(148, 163, 184, 0.32);
}

.team-page .manager .table tbody tr.is-lost {
  background: rgba(239, 68, 68, 0.12);
  box-shadow: inset 3px 0 0 rgba(239, 68, 68, 0.55);
}

.team-page .manager .table tbody tr.is-lost > td {
  background: transparent;
}

.team-page .manager .table tbody tr.is-lost:hover > td {
  background: rgba(239, 68, 68, 0.06);
}

.team-page .manager .table tbody td.mgr-td-forma {
  width: 3.25rem;
  max-width: 3.6rem;
  text-align: center;
  white-space: nowrap;
  padding-left: 4px;
  padding-right: 4px;
  vertical-align: middle;
}

.team-page .manager .mgr-td-forma .mgr-ovr-delta-chip {
  margin-left: 0;
}

.team-page .manager .mgr-forma-empty {
  color: #64748b;
  font-weight: 700;
  font-size: 0.85rem;
}

.team-page .team-roster-mgr {
  margin-top: 0;
}

.team-page .team-roster-mgr .table-wrap {
  overflow: auto;
}

.team-page .team-roster .mgr-roster-head-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.team-page .team-roster .mgr-roster-view-bar {
  display: inline-flex;
  align-items: stretch;
  gap: 2px;
  padding: 3px;
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.72);
  border: 1px solid rgba(148, 163, 184, 0.22);
}

.team-page .team-roster .mgr-view-btn {
  appearance: none;
  border: 0;
  background: transparent;
  color: #cbd5e1;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  padding: 7px 12px;
  border-radius: 9px;
  cursor: pointer;
  line-height: 1.1;
}

.team-page .team-roster .mgr-view-btn.active {
  color: #e0f2fe;
  background: rgba(37, 99, 235, 0.42);
  box-shadow: inset 0 0 0 1px rgba(96, 165, 250, 0.35);
}

.team-page .team-roster .mgr-view-btn:focus-visible {
  outline: 2px solid rgba(147, 197, 253, 0.75);
  outline-offset: 2px;
}

/* Vista compatta — stessi vincoli layout del manager (foto 44×44) */
.team-page .manager.mgr-roster--cards .player-cards {
  display: grid !important;
  gap: 10px;
}

.team-page .manager.mgr-roster--cards .table-wrap.hide-sm {
  display: none !important;
}

.team-page .manager .player-card--dense {
  padding: 8px 10px 9px;
  margin: 0;
  min-height: 118px;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  justify-content: center;
  border: 1px solid var(--line, rgba(148, 163, 184, 0.18));
  border-radius: 12px;
  background: #0e1628;
}

.team-page .manager .player-card--dense.is-on-market-m {
  background: rgba(59, 130, 246, 0.08);
  border-color: rgba(96, 165, 250, 0.32);
}

.team-page .manager .player-card--dense.is-lost {
  background: #0e1628;
  border-color: rgba(148, 163, 184, 0.18);
  border-left: 3px solid #ef4444;
}

.team-page .manager .mgr-rc-firstrow {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  width: 100%;
  min-width: 0;
}

.team-page .manager .mgr-rc-firstrow--stack {
  flex-direction: column;
  align-items: stretch;
  gap: 6px;
}

.team-page .manager .mgr-rc-topline {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 8px;
  width: 100%;
  min-width: 0;
}

.team-page .manager .mgr-rc-identity {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1 1 0;
  min-width: 0;
}

.team-page .manager .mgr-rc-face {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  line-height: 0;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(15, 23, 42, 0.95);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.22);
}

.team-page .manager .mgr-rc-face img {
  display: block;
  width: 44px;
  height: 44px;
  max-width: 44px;
  max-height: 44px;
  object-fit: cover;
  border-radius: 10px;
}

.team-page .manager .mgr-rc-id-text {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.team-page .manager .mgr-rc-name-line {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 5px 6px;
  min-width: 0;
}

.team-page .manager .mgr-rc-firstrow--stack .mgr-rc-name-core {
  min-width: 0;
  flex: 1 1 auto;
  font-weight: 800;
  font-size: 0.95rem;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.team-page .manager .mgr-rc-name-core a {
  color: #f1f5f9;
  text-decoration: none;
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.team-page .manager .mgr-rc-meta {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 5px;
  min-width: 0;
  overflow: hidden;
}

.team-page .manager .mgr-rc-ovr-wrap {
  flex: 0 0 auto;
  align-self: center;
  margin-left: auto;
}

.team-page .manager .mgr-rc-econline {
  display: flex;
  justify-content: flex-end;
  width: 100%;
  min-width: 0;
  padding: 0 0 1px;
}

.team-page .manager .mgr-rc-econ-pair {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 6px;
  justify-content: flex-end;
}

.team-page .manager .mgr-rc-stat {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.team-page .manager .mgr-rc-stat-lbl {
  font-size: 0.6rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #94a3b8;
}

.team-page .manager .mgr-rc-econ-val {
  font-size: 0.78rem;
  font-weight: 700;
  color: #e2e8f0;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.team-page .manager .mgr-rc-econ-unit {
  font-size: 0.62em;
  font-weight: 700;
  margin-left: 2px;
  opacity: 0.8;
}

.team-page .manager .mgr-rc-econ-dot {
  color: #64748b;
  font-weight: 700;
  opacity: 0.75;
}

.team-page .manager .mgr-rc-bottomline,
.team-page .manager .mgr-rc-secondline {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  padding: 5px 0 0;
  margin: 0;
  border-top: 1px solid rgba(148, 163, 184, 0.12);
  box-sizing: border-box;
}

.team-page .manager .mgr-rc-secondline-left {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 8px;
  flex: 1 1 auto;
  min-width: 0;
}

.team-page .manager .mgr-rc-actions {
  flex: 0 0 auto;
  margin-left: auto;
}

.team-page .manager .mgr-rc-actions-row {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
}

.team-page .manager .mgr-rc-role.role-badge {
  margin: 0 !important;
  height: 20px;
  padding: 0 0.38rem;
  font-size: 10px;
  font-weight: 800;
  flex-shrink: 0;
}

.team-page .manager .mgr-rc-age {
  color: #94a3b8;
  font-weight: 700;
  white-space: nowrap;
  font-size: 0.78rem;
}

.team-page .manager .mgr-rc-ovr.ovr-pill {
  margin: 0 !important;
  min-width: 42px;
  width: 42px;
  height: 42px;
  padding: 0;
  font-size: 1.05rem;
  font-weight: 900;
  flex-shrink: 0;
  border-radius: 999px;
  border-width: 2px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.28);
}

.team-page .manager .mgr-rc-ovr.ovr-pill[data-len="3"] {
  min-width: 46px;
  width: 46px;
  height: 46px;
  font-size: 0.95rem;
}

.team-page .manager .table thead th.sorted-asc::after {
  content: ' ▲';
  opacity: 0.75;
  font-size: 0.72em;
}

.team-page .manager .table thead th.sorted-desc::after {
  content: ' ▼';
  opacity: 0.75;
  font-size: 0.72em;
}

@media (max-width: 979.98px) {
  .team-page .team-roster.card {
    padding: 12px;
  }

  .team-page .team-roster .mgr-roster-head {
    flex-direction: column;
    align-items: stretch !important;
    gap: 10px !important;
  }

  .team-page .team-roster .mgr-roster-head-actions {
    width: 100%;
  }

  .team-page .team-roster .mgr-roster-view-bar {
    display: flex;
    width: 100%;
    box-sizing: border-box;
  }

  .team-page .team-roster .mgr-view-btn {
    flex: 1 1 0;
    min-width: 0;
    text-align: center;
    padding: 8px 6px;
    font-size: 0.78rem;
  }

  .team-page .manager.mgr-roster--table .table-wrap.hide-sm {
    display: block !important;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .team-page .manager.mgr-roster--cards .player-cards {
    display: grid !important;
  }

  .team-page .manager.mgr-roster--pcard .mgr-xg-pcards {
    display: grid !important;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 10px;
  }
}
