/* Manager dashboard — hero, KPI strip, strutture card, toggle rosa (v1) */

.manager.manager-wrap {
  min-width: 0;
  max-width: 100%;
}

.manager .mgr-dash-hero {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(59, 130, 246, 0.18);
  background:
    linear-gradient(145deg, rgba(15, 23, 42, 0.92) 0%, rgba(17, 24, 39, 0.98) 45%, rgba(15, 23, 42, 0.95) 100%),
    radial-gradient(900px 280px at 12% -40%, rgba(59, 130, 246, 0.22), transparent 55%),
    radial-gradient(600px 200px at 100% 0%, rgba(99, 102, 241, 0.12), transparent 50%);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.04) inset,
    0 12px 40px rgba(0, 0, 0, 0.35);
}

.manager .mgr-dash-hero--compact {
  padding: 14px 16px 16px;
}

.manager .mgr-dash-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    -12deg,
    transparent,
    transparent 14px,
    rgba(59, 130, 246, 0.03) 14px,
    rgba(59, 130, 246, 0.03) 15px
  );
  pointer-events: none;
  opacity: 0.65;
}

.manager .mgr-hero {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 16px;
  grid-template-columns: auto 1fr;
  align-items: center;
}

.manager .mgr-hero--compact {
  gap: 12px;
  align-items: flex-start;
}

.manager .mgr-hero__id-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px 14px;
  width: 100%;
}

.manager .mgr-hero__id {
  min-width: 0;
}

.manager .mgr-hero--compact .mgr-hero-chips {
  margin-top: 0;
  flex: 1 1 auto;
  justify-content: flex-end;
}

/* Mobile / due finestre: logo a sinistra, stagione/nome/allenatore a destra */
@media (max-width: 1199.98px) {
  .manager .mgr-hero {
    grid-template-columns: auto 1fr;
    align-items: center;
    gap: 12px;
    text-align: left;
  }

  .manager .mgr-hero__meta {
    align-items: flex-start;
  }

  .manager .mgr-hero__actions {
    justify-content: flex-start;
  }

  .manager .mgr-pill-link--hide-mobile-bottom-dup {
    display: none !important;
  }

  /* Pill hero più compatti (allineati a Finanze / Strutture / Guida) */
  .manager .mgr-hero__actions .mgr-pill-link {
    padding: 6px 11px;
    font-size: 11px;
    gap: 6px;
  }

  .manager .mgr-hero__actions .mgr-pill-link i {
    font-size: 12px;
  }

  .manager .mgr-hero__crest {
    width: 76px;
    height: 76px;
  }

  .manager .mgr-hero__crest img {
    max-width: 62px;
    max-height: 62px;
  }

  .manager .mgr-hero--compact .mgr-hero__crest {
    width: 56px;
    height: 56px;
    border-radius: 14px;
  }

  .manager .mgr-hero--compact .mgr-hero__crest img {
    max-width: 42px;
    max-height: 42px;
  }

  .manager .mgr-hero--compact .mgr-hero-chips {
    justify-content: flex-start;
    width: 100%;
  }
}

.manager .mgr-hero__crest {
  width: 88px;
  height: 88px;
  border-radius: 18px;
  background: linear-gradient(160deg, rgba(30, 41, 59, 0.95), rgba(15, 23, 42, 0.98));
  border: 1px solid rgba(59, 130, 246, 0.28);
  display: grid;
  place-items: center;
  flex-shrink: 0;
  box-shadow:
    0 4px 20px rgba(0, 0, 0, 0.35),
    0 0 0 1px rgba(255, 255, 255, 0.06) inset;
}

.manager .mgr-hero--compact .mgr-hero__crest {
  width: 56px;
  height: 56px;
  border-radius: 14px;
}

.manager .mgr-hero__crest img {
  max-width: 72px;
  max-height: 72px;
  object-fit: contain;
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.45));
}

.manager .mgr-hero--compact .mgr-hero__crest img {
  max-width: 40px;
  max-height: 40px;
}

.manager .mgr-hero__meta {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  min-width: 0;
  width: 100%;
}

.manager .mgr-hero__eyebrow {
  margin: 0;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #60a5fa;
  text-shadow: 0 0 24px rgba(96, 165, 250, 0.35);
}

.manager .mgr-hero__title {
  margin: 0;
  font-size: clamp(1.35rem, 3.5vw, 1.85rem);
  font-weight: 800;
  line-height: 1.15;
  color: var(--ink, #e6edf6);
  letter-spacing: -0.02em;
}

.manager .mgr-hero--compact .mgr-hero__title {
  font-size: clamp(1.15rem, 2.4vw, 1.45rem);
}

.manager .mgr-hero__sub {
  margin: 2px 0 0;
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
  align-items: center;
  font-size: 13px;
  color: var(--muted, #9fb0c3);
}

.manager .mgr-hero__season {
  font-size: 12px;
  color: rgba(148, 163, 184, 0.9);
}

.manager .mgr-hero__sub i {
  margin-right: 4px;
  opacity: 0.85;
  color: #38bdf8;
}

.manager .mgr-hero__sep {
  opacity: 0.45;
}

.manager .mgr-hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 6px;
}

/* Sotto-menu rapido (dashboard / strutture / …) */
.manager .mgr-subnav {
  width: 100%;
  margin-top: 4px;
  padding-top: 10px;
  border-top: 1px solid rgba(148, 163, 184, 0.14);
}

.manager .mgr-dash-hero--compact .mgr-subnav {
  margin-top: 2px;
  padding-top: 8px;
}

.manager .mgr-subnav__inner {
  margin-top: 0;
}

.manager span.mgr-pill-link.mgr-pill-link--here {
  cursor: default;
  pointer-events: none;
  user-select: none;
}

.manager .mgr-pill-link--here {
  border-color: rgba(52, 211, 153, 0.42) !important;
  background: linear-gradient(180deg, rgba(16, 185, 129, 0.2), rgba(6, 78, 59, 0.32)) !important;
  color: #d1fae5 !important;
  box-shadow:
    0 0 0 1px rgba(52, 211, 153, 0.12) inset,
    0 4px 14px rgba(16, 185, 129, 0.12);
}

.manager button.mgr-pill-link {
  font: inherit;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  border-style: solid;
}

.manager .mgr-pill-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
  color: #e0f2fe;
  background: linear-gradient(180deg, rgba(37, 99, 235, 0.45), rgba(29, 78, 216, 0.35));
  border: 1px solid rgba(96, 165, 250, 0.45);
  box-shadow: 0 4px 16px rgba(37, 99, 235, 0.2);
  transition: transform 0.08s ease, box-shadow 0.12s ease, border-color 0.12s ease;
}

.manager .mgr-pill-link:hover {
  border-color: rgba(147, 197, 253, 0.65);
  box-shadow: 0 6px 22px rgba(37, 99, 235, 0.3);
}

.manager .mgr-pill-link:active {
  transform: translateY(1px);
}

.manager .mgr-pill-link--soft {
  background: rgba(15, 23, 42, 0.65);
  border-color: rgba(148, 163, 184, 0.25);
  color: var(--muted, #9fb0c3);
  box-shadow: none;
}

.manager .mgr-pill-link--soft:hover {
  border-color: rgba(148, 163, 184, 0.45);
  color: #e2e8f0;
}

/* KPI resource strip — 2×2 su mobile stretto; 4 colonne da tablet/desktop */
.manager .mgr-kpi-strip {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 18px;
}

/* Dashboard “La mia squadra”: 4 card (cassa, ingaggi, valore, strutture) */
.manager .mgr-kpi-strip--hero {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 12px;
}

.manager .mgr-dash-hero--compact .mgr-kpi-strip--hero {
  margin-top: 12px;
}

.manager .mgr-kpi-strip--hero .mgr-kpi--rosa-val {
  grid-column: auto;
}

.manager .mgr-hero-metrics {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 18px;
}

.manager .mgr-hero-metrics .mgr-kpi-strip--hero {
  margin-top: 0;
}

.manager .mgr-hero-structures {
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(10, 16, 30, 0.72);
  padding: 10px 11px;
}

.manager .mgr-hero-structures .mgr-struct-acc__summary .mgr-section-title {
  margin-bottom: 8px;
}

.manager .mgr-hero-structures .mgr-struct-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.manager .mgr-hero-structures .mgr-struct-card {
  padding: 7px 9px;
}

@media (min-width: 640px) {
  .manager .mgr-kpi-strip {
    gap: 10px;
  }
}

@media (min-width: 900px) {
  .manager .mgr-kpi-strip {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .manager .mgr-kpi-strip--hero {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .manager .mgr-kpi-strip--hero .mgr-kpi--rosa-val {
    grid-column: auto;
  }
}

@media (min-width: 1200px) {
  .manager .mgr-hero-metrics {
    display: grid;
    grid-template-columns: minmax(0, 1.7fr) minmax(280px, 1fr);
    gap: 12px;
    align-items: stretch;
  }

  .manager .mgr-hero-structures {
    height: 100%;
    padding: 8px 9px;
  }

  .manager .mgr-hero-structures .mgr-struct-help {
    display: none;
  }

  .manager .mgr-hero-structures .mgr-struct-acc__summary {
    margin-bottom: 2px;
    padding-bottom: 4px;
    border-bottom: 1px solid rgba(148, 163, 184, 0.12);
  }

  .manager .mgr-hero-structures .mgr-struct-acc__summary .mgr-section-title {
    margin-bottom: 0;
    font-size: 13px;
  }

  .manager .mgr-hero-structures .mgr-struct-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 4px;
    align-content: start;
  }

  .manager .mgr-hero-structures .mgr-struct-card {
    gap: 5px;
    padding: 4px 6px;
    border-radius: 10px;
  }

  .manager .mgr-hero-structures .mgr-struct-card__ic {
    width: 20px;
    height: 20px;
    border-radius: 7px;
    font-size: 10px;
  }

  .manager .mgr-hero-structures .mgr-struct-card__name {
    font-size: 10px;
    line-height: 1.2;
  }

  .manager .mgr-hero-structures .mgr-struct-card__lv {
    font-size: 10px;
    padding: 1px 5px;
  }

  .manager .mgr-kpi-strip--hero .mgr-kpi {
    min-height: 0;
  }
}

.manager .mgr-kpi {
  position: relative;
  display: flex;
  gap: 8px;
  align-items: flex-start;
  padding: 10px 10px 10px 12px;
  border-radius: 12px;
  background: rgba(11, 18, 32, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.08);
  overflow: hidden;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.1s ease;
}

@media (min-width: 900px) {
  .manager .mgr-kpi {
    gap: 12px;
    padding: 12px 12px 12px 14px;
  }
}

.manager .mgr-kpi::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  border-radius: 12px 0 0 12px;
  background: var(--mgr-kpi-accent, #38bdf8);
  box-shadow: 0 0 14px rgba(59, 130, 246, 0.22);
}

.manager .mgr-kpi:hover {
  border-color: rgba(59, 130, 246, 0.28);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.28);
}

.manager .mgr-kpi--cash {
  --mgr-kpi-accent: #22c55e;
}

.manager .mgr-kpi--treasury {
  --mgr-kpi-accent: #22c55e;
}

.manager .mgr-kpi--wage {
  --mgr-kpi-accent: #f59e0b;
}

.manager .mgr-kpi--net {
  --mgr-kpi-accent: #38bdf8;
}

.manager .mgr-kpi--rosa-val {
  --mgr-kpi-accent: #2dd4bf;
}

.manager .mgr-kpi--structures {
  --mgr-kpi-accent: #a78bfa;
}

.manager .mgr-kpi--loans {
  --mgr-kpi-accent: #a78bfa;
}

.manager .mgr-kpi--outflow {
  --mgr-kpi-accent: #f87171;
}

.manager .mgr-kpi__icon {
  flex: 0 0 auto;
  width: 32px;
  height: 32px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  font-size: 14px;
  color: var(--mgr-kpi-accent);
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.28);
}

@media (min-width: 900px) {
  .manager .mgr-kpi__icon {
    width: 36px;
    height: 36px;
    font-size: 15px;
  }
}

.manager .mgr-kpi--cash .mgr-kpi__icon,
.manager .mgr-kpi--treasury .mgr-kpi__icon {
  color: #22c55e;
  background: rgba(34, 197, 94, 0.14);
  border-color: rgba(34, 197, 94, 0.32);
}

.manager .mgr-kpi--wage .mgr-kpi__icon {
  color: #f59e0b;
  background: rgba(245, 158, 11, 0.14);
  border-color: rgba(245, 158, 11, 0.32);
}

.manager .mgr-kpi--net .mgr-kpi__icon {
  color: #38bdf8;
  background: rgba(56, 189, 248, 0.12);
  border-color: rgba(56, 189, 248, 0.28);
}

.manager .mgr-kpi--rosa-val .mgr-kpi__icon {
  color: #2dd4bf;
  background: rgba(45, 212, 191, 0.12);
  border-color: rgba(45, 212, 191, 0.35);
}

.manager .mgr-kpi--structures .mgr-kpi__icon {
  color: #c4b5fd;
  background: rgba(167, 139, 250, 0.14);
  border-color: rgba(167, 139, 250, 0.35);
}

.manager .mgr-kpi--loans .mgr-kpi__icon {
  color: #a78bfa;
  background: rgba(167, 139, 250, 0.14);
  border-color: rgba(167, 139, 250, 0.32);
}

.manager .mgr-kpi--outflow .mgr-kpi__icon {
  color: #f87171;
  background: rgba(248, 113, 113, 0.12);
  border-color: rgba(248, 113, 113, 0.3);
}

.manager .mgr-kpi__body {
  flex: 1 1 auto;
  min-width: 0;
}

.manager .mgr-kpi__stack {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.manager .mgr-kpi__stack-item--net {
  padding-top: 8px;
  border-top: 1px solid rgba(148, 163, 184, 0.14);
}

.manager .mgr-kpi__stack-item--net .mgr-kpi__lbl {
  font-size: 10px;
}

.manager .mgr-kpi__val--net {
  margin-top: 2px;
  font-size: 0.82rem;
  font-weight: 700;
}

@media (min-width: 900px) {
  .manager .mgr-kpi__val--net {
    font-size: 0.88rem;
  }
}

.manager .mgr-kpi__val--net.is-neg {
  color: #fca5a5;
}

.manager .mgr-kpi__link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 6px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-decoration: none;
  color: #93c5fd;
}

.manager .mgr-kpi__link:hover {
  color: #bfdbfe;
}

.manager .mgr-kpi__link i {
  font-size: 9px;
  opacity: 0.9;
}

.manager .mgr-kpi__stack-item--net .mgr-kpi__cap-hint {
  margin-top: 2px;
  font-size: 0.65rem;
}

.manager .mgr-kpi__lbl {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted, #94a3b8);
  margin-bottom: 2px;
}

.manager .mgr-kpi__val {
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--ink, #e6edf6);
  line-height: 1.2;
}

@media (min-width: 900px) {
  .manager .mgr-kpi__val {
    font-size: 1.05rem;
  }
}

.manager .mgr-kpi__unit {
  font-size: 0.72em;
  font-weight: 700;
  color: var(--muted, #94a3b8);
  margin-left: 2px;
}

.manager .mgr-kpi__badge {
  display: inline-block;
  margin-top: 4px;
  vertical-align: middle;
}

.manager .mgr-kpi__bar-wrap {
  margin-top: 8px;
}

.manager .mgr-kpi__bar {
  height: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  overflow: hidden;
}

.manager .mgr-kpi__bar-fill {
  display: block;
  height: 100%;
  border-radius: inherit;
  min-width: 0;
  transition: width 0.35s ease;
  background: linear-gradient(90deg, #22c55e, #4ade80);
}

.manager .mgr-kpi__bar-fill--warn {
  background: linear-gradient(90deg, #eab308, #facc15);
}

.manager .mgr-kpi__bar-fill--danger {
  background: linear-gradient(90deg, #ef4444, #f87171);
}

.manager .mgr-kpi__cap-hint {
  margin-top: 4px;
  font-size: 10px;
  font-weight: 600;
  color: var(--muted, #94a3b8);
}

/* Stat chips (testata compatta / legacy) */
.manager .mgr-hero-chips {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 14px;
}

.manager .mgr-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(15, 23, 42, 0.55);
  color: var(--muted, #94a3b8);
}

.manager .mgr-chip i {
  font-size: 11px;
  opacity: 0.9;
  color: #60a5fa;
}

.manager .mgr-chip--stat {
  color: #e2e8f0;
}

.manager .mgr-chip--ok {
  border-color: rgba(34, 197, 94, 0.35);
  color: #86efac;
}

.manager .mgr-chip--warn {
  border-color: rgba(234, 179, 8, 0.4);
  color: #fde047;
}

.manager .mgr-chip--danger {
  border-color: rgba(239, 68, 68, 0.4);
  color: #fca5a5;
}

.manager .mgr-chip--loans-lite {
  font-size: 10px;
  font-weight: 600;
  padding: 4px 9px;
  color: rgba(148, 163, 184, 0.95);
  border-color: rgba(148, 163, 184, 0.18);
  background: rgba(15, 23, 42, 0.4);
}

.manager .mgr-chip--loans-lite i {
  font-size: 10px;
  color: rgba(167, 139, 250, 0.95);
}

/* Strutture */
.manager .mgr-section-title {
  margin: 0 0 12px;
  font-size: 15px;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--ink, #e6edf6);
}

.manager .mgr-section-title i {
  color: #38bdf8;
  font-size: 16px;
}

/* Strutture: accordion chiuso su mobile; desktop sempre espanso (open via JS) */
.manager .mgr-struct-acc {
  margin: 0;
}

.manager .mgr-struct-acc__summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  list-style: none;
  cursor: pointer;
  padding: 0;
  margin: 0;
}

.manager .mgr-struct-acc__summary::-webkit-details-marker {
  display: none;
}

.manager .mgr-struct-acc__summary .mgr-section-title {
  margin-bottom: 0;
}

.manager .mgr-struct-acc__caret {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  color: rgba(148, 163, 184, 0.95);
  transition: transform 0.2s ease;
  font-size: 0.85rem;
}

.manager .mgr-struct-acc[open] .mgr-struct-acc__caret {
  transform: rotate(90deg);
}

.manager .mgr-struct-acc__body {
  margin-top: 12px;
}

@media (min-width: 1200px) {
  .manager .mgr-struct-acc__caret {
    display: none;
  }

  .manager .mgr-struct-acc__summary {
    cursor: default;
    pointer-events: none;
  }

  .manager .mgr-struct-acc__summary .mgr-section-title {
    margin-bottom: 12px;
  }

  .manager .mgr-struct-acc__body {
    margin-top: 0;
  }
}

/* Rosa: filtri in accordion (stesso schema Strutture) */
.manager .mgr-roster-filters-acc {
  margin: 0 0 2px;
}

.manager .mgr-roster-filters-acc__summary {
  /* Label «Filtri rosa» rimossa: i controlli restano sempre visibili */
  display: none !important;
}

.manager .mgr-roster-filters-acc__summary::-webkit-details-marker {
  display: none;
}

.manager .mgr-roster-filters-acc__summary .mgr-section-title {
  margin-bottom: 0;
}

.manager .mgr-roster-filters-acc__caret {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  color: rgba(148, 163, 184, 0.95);
  transition: transform 0.2s ease;
  font-size: 0.85rem;
}

.manager .mgr-roster-filters-acc[open] .mgr-roster-filters-acc__caret {
  transform: rotate(90deg);
}

.manager .mgr-roster-filters-acc__body .mgr-roster-filters-form {
  margin: 0;
  width: 100%;
  min-width: 0;
}

.manager .mgr-roster-filters-acc__body {
  min-width: 0;
  max-width: 100%;
}

.manager .mgr-roster-filters-form > input.input {
  width: 100%;
  min-width: 0;
}

.manager .mgr-roster-filters-form > .rt-row2 {
  margin-top: 0;
  justify-content: space-between;
}

.manager .mgr-roster-filters-form .rt-onlymarket {
  min-width: 0;
}

@media (min-width: 1200px) {
  .manager .mgr-roster-filters-acc__caret {
    display: none;
  }
}

/* Strutture: 2 colonne su mobile (anche <480px); desktop invariato da 900px */
.manager .mgr-struct-grid {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

@media (min-width: 640px) {
  .manager .mgr-struct-grid {
    gap: 10px;
  }
}

@media (min-width: 900px) {
  .manager .mgr-struct-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (min-width: 1100px) {
  .manager .mgr-struct-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
}

.manager .mgr-struct-card {
  display: flex;
  gap: 8px;
  align-items: center;
  padding: 8px 10px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: linear-gradient(165deg, rgba(30, 41, 59, 0.55), rgba(15, 23, 42, 0.85));
  transition: transform 0.12s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

@media (min-width: 900px) {
  .manager .mgr-struct-card {
    gap: 10px;
    padding: 10px 12px;
  }
}

.manager .mgr-struct-card:hover {
  transform: translateY(-2px);
  border-color: rgba(59, 130, 246, 0.35);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.28);
}

.manager .mgr-struct-card.is-off {
  opacity: 0.72;
}

.manager .mgr-struct-card__ic {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  font-size: 14px;
  color: #38bdf8;
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.22);
  flex-shrink: 0;
}

@media (min-width: 900px) {
  .manager .mgr-struct-card__ic {
    width: 38px;
    height: 38px;
    font-size: 16px;
  }
}

.manager .mgr-struct-card.is-off .mgr-struct-card__ic {
  color: var(--muted, #64748b);
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.06);
}

.manager .mgr-struct-card__body {
  flex: 1 1 auto;
  min-width: 0;
}

.manager .mgr-struct-card__name {
  font-size: 11px;
  font-weight: 700;
  color: var(--ink, #e6edf6);
  line-height: 1.25;
}

@media (min-width: 900px) {
  .manager .mgr-struct-card__name {
    font-size: 12px;
  }
}

.manager .mgr-struct-card__lv {
  display: inline-block;
  margin-top: 4px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.04em;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(34, 197, 94, 0.18);
  color: #86efac;
  border: 1px solid rgba(34, 197, 94, 0.28);
}

.manager .mgr-struct-card.is-off .mgr-struct-card__lv {
  background: rgba(148, 163, 184, 0.12);
  color: var(--muted, #94a3b8);
  border-color: rgba(148, 163, 184, 0.2);
}

.manager .mgr-struct-help details {
  margin-top: 12px;
}

.manager .mgr-struct-help summary {
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
  color: #93c5fd;
}

.manager .mgr-struct-help summary:hover {
  color: #bfdbfe;
}

/* Rosa: toggle vista (desktop / tablet) */
.manager .mgr-roster-head {
  align-items: flex-start !important;
}

.manager .mgr-roster-view-bar {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: stretch;
  gap: 0;
  box-sizing: border-box;
  height: 34px;
  padding: 3px;
  border-radius: 10px;
  background: rgba(11, 18, 32, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.manager .mgr-view-btn {
  margin: 0;
  padding: 0 14px;
  height: 100%;
  font-size: 12px;
  font-weight: 700;
  border-radius: 8px;
  border: none;
  background: transparent;
  color: var(--muted, #94a3b8);
  cursor: pointer;
  transition: background 0.12s ease, color 0.12s ease, box-shadow 0.12s ease;
}

.manager .mgr-view-btn:hover {
  color: #e2e8f0;
}

.manager .mgr-view-btn.active {
  background: linear-gradient(180deg, rgba(37, 99, 235, 0.55), rgba(29, 78, 216, 0.45));
  color: #fff;
  box-shadow: 0 2px 12px rgba(37, 99, 235, 0.25);
}

@media (min-width: 560px) {
  .manager.mgr-roster--cards .player-cards {
    display: grid !important;
    gap: 10px;
  }

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

  .manager.mgr-roster--cards .mgr-sort-bar {
    display: flex !important;
  }

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

  .manager.mgr-roster--pcard .mgr-sort-bar {
    display: flex !important;
  }
}

/* Due finestre / sidebar: sotto 1200px default card, non tabella larga */
@media (max-width: 1199.98px) {
  .manager:not(.mgr-roster--table):not(.mgr-roster--pcard) .table-wrap.hide-sm {
    display: none;
  }
  .manager:not(.mgr-roster--table):not(.mgr-roster--pcard) .player-cards {
    display: grid;
  }
  .manager.mgr-roster--table .table-wrap.hide-sm {
    display: block !important;
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    overflow-y: visible;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-x pan-y;
    scrollbar-width: thin;
    scrollbar-color: rgba(51, 65, 85, 0.85) rgba(15, 23, 42, 0.35);
  }
  .manager.mgr-roster--table .player-cards {
    display: none !important;
  }
}

.mgr-xg-pcards {
  display: none;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 22px 16px;
  margin: 12px 0 18px;
}
.manager.mgr-roster--pcard .mgr-xg-pcards {
  display: grid !important;
}
.mgr-xg-pcard-sort {
  min-width: 0;
}
.mgr-xg-pcard-sort > .xg-pcard {
  width: 100%;
  max-width: none;
}

.manager.mgr-roster--pcard .player-cards {
  display: none !important;
}

.manager .mgr-xg-pcards[hidden] {
  display: none !important;
}

/* ===== Finanze manager (stesso linguaggio della dashboard) ===== */
.manager.mgr-finance .mgr-finance-grid {
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-width: 1200px;
  margin: 0 auto;
  padding-bottom: 8px;
}

.manager.mgr-finance .mgr-finance-hero .mgr-finance-balance-block {
  position: relative;
  z-index: 1;
  margin-top: 18px;
  padding: 16px 18px;
  border-radius: 14px;
  background: rgba(11, 18, 32, 0.65);
  border: 1px solid rgba(59, 130, 246, 0.22);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.03) inset;
}

/* Header finanze compatto: logo | meta | saldo a destra */
.manager.mgr-finance .mgr-finance-hero--compact {
  padding: 14px 16px 16px;
}

.manager.mgr-finance .mgr-hero--finance-top {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 12px 14px;
  align-items: center;
}

.manager.mgr-finance .mgr-hero--finance-top .mgr-hero__meta {
  min-width: 0;
}

.manager.mgr-finance .mgr-hero--finance-top .mgr-finance-balance-block {
  grid-column: 1 / -1;
  margin-top: 0;
  padding: 10px 12px;
}

.manager.mgr-finance .mgr-finance-hero--compact .mgr-finance-subnav {
  margin-top: 10px;
  padding-top: 10px;
}

.manager.mgr-finance .mgr-finance-hero--compact .mgr-kpi-strip {
  margin-top: 12px;
}

.manager.mgr-finance .mgr-finance-hero--compact .mgr-finance-balance-num {
  font-size: clamp(1.35rem, 3.2vw, 1.85rem);
}

.manager.mgr-finance .mgr-finance-hero--compact .mgr-finance-sparkline {
  flex: 1 1 140px;
  min-width: 120px;
  max-width: 260px;
}

.manager.mgr-finance .mgr-finance-hero--compact .mgr-finance-sparkline__svg {
  height: 42px;
}

@media (min-width: 900px) {
  .manager.mgr-finance .mgr-hero--finance-top {
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
  }

  .manager.mgr-finance .mgr-hero--finance-top .mgr-finance-balance-block {
    grid-column: auto;
    justify-self: end;
    width: min(100%, 420px);
    max-width: 420px;
  }

  .manager.mgr-finance .mgr-finance-hero--compact .mgr-finance-balance-row {
    flex-wrap: nowrap;
    gap: 12px 16px;
  }

  .manager.mgr-finance .mgr-finance-hero--compact .mgr-finance-sparkline {
    flex: 1 1 160px;
    min-width: 140px;
    max-width: 220px;
  }
}

.manager.mgr-finance .mgr-finance-balance-lbl {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted, #94a3b8);
  margin-bottom: 4px;
}

.manager.mgr-finance .mgr-finance-balance-num {
  font-size: clamp(1.85rem, 5vw, 2.65rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.1;
  color: #f0f9ff;
  text-shadow: 0 0 40px rgba(56, 189, 248, 0.25);
}

.manager.mgr-finance .mgr-finance-balance-unit {
  font-size: 0.45em;
  font-weight: 800;
  color: var(--muted, #94a3b8);
  margin-left: 6px;
  letter-spacing: 0.04em;
}

/* Finanze: flare leggero sulla card hero (sopra il fondo, sotto il contenuto) */
.manager.mgr-finance .card.mgr-finance-hero {
  isolation: isolate;
}

.manager.mgr-finance .card.mgr-finance-hero > * {
  position: relative;
  z-index: 1;
}

.manager.mgr-finance .card.mgr-finance-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  z-index: 0;
  opacity: 0.5;
  mix-blend-mode: screen;
  background:
    radial-gradient(ellipse 130% 90% at 0% 0%, rgba(56, 189, 248, 0.12), transparent 55%),
    radial-gradient(ellipse 110% 85% at 100% 100%, rgba(45, 212, 191, 0.09), transparent 50%);
  background-size: 240% 200%;
  background-position: 0% 0%, 100% 100%;
  animation: mgr-fin-hero-flare 10s ease-in-out infinite alternate;
}

@keyframes mgr-fin-hero-flare {
  0% {
    background-position: -5% 15%, 105% 85%;
    opacity: 0.4;
  }
  100% {
    background-position: 45% -8%, 55% 108%;
    opacity: 0.58;
  }
}

@media (prefers-reduced-motion: reduce) {
  .manager.mgr-finance .card.mgr-finance-hero::after {
    animation: none;
    opacity: 0.35;
    background-position: 15% 20%, 85% 80%;
  }
}

/* Riga saldo + sparkline 90gg */
.manager.mgr-finance .mgr-finance-balance-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 20px;
}

.manager.mgr-finance .mgr-finance-balance-text {
  flex: 0 1 auto;
  min-width: 0;
}

.manager.mgr-finance .mgr-finance-sparkline {
  flex: 1 1 200px;
  min-width: 160px;
  max-width: 100%;
}

.manager.mgr-finance .mgr-finance-sparkline__svg {
  display: block;
  width: 100%;
  height: 58px;
  overflow: visible;
}

.manager.mgr-finance .mgr-finance-sparkline__baseline {
  stroke: rgba(148, 163, 184, 0.14);
  stroke-width: 1;
  vector-effect: non-scaling-stroke;
}

.manager.mgr-finance .mgr-finance-sparkline__fill {
  stroke: none;
}

.manager.mgr-finance .mgr-finance-sparkline__line {
  vector-effect: non-scaling-stroke;
  filter: drop-shadow(0 0 3px rgba(34, 211, 238, 0.25));
}

.manager.mgr-finance .mgr-finance-sparkline__cap {
  display: block;
  margin-top: 2px;
  text-align: right;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(148, 163, 184, 0.55);
}

@media (max-width: 560px) {
  .manager.mgr-finance .mgr-finance-balance-row {
    flex-direction: column;
    align-items: stretch;
  }

  .manager.mgr-finance .mgr-finance-sparkline {
    flex-basis: auto;
    min-width: 0;
  }
}

/* Finanze mobile/tablet: saldo più compatto nella testata */
@media (max-width: 959.98px) {
  .manager.mgr-finance .mgr-finance-hero .mgr-finance-balance-block {
    margin-top: 0;
    padding: 10px 12px;
  }

  .manager.mgr-finance .mgr-finance-balance-lbl {
    margin-bottom: 2px;
    font-size: 10px;
    letter-spacing: 0.1em;
  }

  .manager.mgr-finance .mgr-finance-balance-num {
    font-size: clamp(1.25rem, 4vw, 1.65rem);
    line-height: 1.06;
  }

  .manager.mgr-finance .mgr-finance-balance-row {
    gap: 8px 12px;
  }

  .manager.mgr-finance .mgr-finance-sparkline__svg {
    height: 40px;
  }

  .manager.mgr-finance .mgr-finance-sparkline__cap {
    margin-top: 1px;
    font-size: 9px;
    letter-spacing: 0.06em;
  }
}

.manager.mgr-finance .mgr-finance-num-pos {
  color: #86efac !important;
}

.manager.mgr-finance .mgr-finance-num-neg {
  color: #fca5a5 !important;
}

.manager.mgr-finance .mgr-finance-tx-card {
  padding-top: 18px;
}

.manager.mgr-finance .mgr-finance-tx-card .mgr-section-title {
  margin-top: 0;
}

.manager.mgr-finance .mgr-finance-filter-hint {
  margin: -4px 0 12px;
  color: var(--muted, #94a3b8);
}

/* Movimenti: filtri sempre in fisarmonica (chiusa di default; aperta se filtri attivi) */
.manager.mgr-finance .mgr-finance-filters-acc {
  margin: 0 0 12px;
}

.manager.mgr-finance .mgr-finance-filters-acc__summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  list-style: none;
  cursor: pointer;
  padding: 10px 12px;
  margin: 0;
  border-radius: 10px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  background: rgba(15, 23, 42, 0.45);
}

.manager.mgr-finance .mgr-finance-filters-acc__summary::-webkit-details-marker {
  display: none;
}

.manager.mgr-finance .mgr-finance-filters-acc__title {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink, #e6edf6);
}

.manager.mgr-finance .mgr-finance-filters-acc__title i {
  color: #38bdf8;
  font-size: 14px;
}

.manager.mgr-finance .mgr-finance-filters-acc__badge {
  display: inline-flex;
  align-items: center;
  padding: 0.12rem 0.45rem;
  border-radius: 999px;
  font-size: 0.68rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-weight: 800;
  color: #fde68a;
  background: rgba(251, 191, 36, 0.14);
  border: 1px solid rgba(251, 191, 36, 0.35);
}

.manager.mgr-finance .mgr-finance-filters-acc__caret {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  color: rgba(148, 163, 184, 0.95);
  transition: transform 0.2s ease;
  font-size: 0.85rem;
}

.manager.mgr-finance .mgr-finance-filters-acc[open] .mgr-finance-filters-acc__caret {
  transform: rotate(90deg);
}

.manager.mgr-finance .mgr-finance-filters-acc[open] .mgr-finance-filters-acc__summary {
  border-color: rgba(56, 189, 248, 0.28);
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
}

.manager.mgr-finance .mgr-finance-filters-acc__body {
  border: 1px solid rgba(56, 189, 248, 0.2);
  border-top: 0;
  border-radius: 0 0 10px 10px;
  background: rgba(15, 23, 42, 0.35);
  padding: 12px;
}

.manager.mgr-finance .mgr-finance-filters-acc__body .mgr-finance-filters {
  margin-top: 0;
  margin-bottom: 0;
}

.manager.mgr-finance .mgr-finance-tx-card .mgr-finance-table-wrap {
  margin-top: 4px;
}

.manager.mgr-finance .mgr-finance-filters {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 16px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid rgba(59, 130, 246, 0.18);
  background: rgba(11, 18, 32, 0.45);
}

.manager.mgr-finance .mgr-finance-filters__row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 12px;
  align-items: flex-end;
}

.manager.mgr-finance .mgr-finance-filters__field {
  flex: 1 1 160px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.manager.mgr-finance .mgr-finance-filters__lbl {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted, #94a3b8);
}

.manager.mgr-finance .mgr-finance-filters__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  flex: 1 1 200px;
  justify-content: flex-end;
  margin-left: auto;
}

@media (max-width: 640px) {
  .manager.mgr-finance .mgr-finance-filters__actions {
    justify-content: stretch;
    margin-left: 0;
    width: 100%;
  }

  .manager.mgr-finance .mgr-finance-filters__actions .btn {
    flex: 1 1 auto;
    text-align: center;
    justify-content: center;
  }
}

.manager.mgr-finance .mgr-finance-table-wrap {
  margin-top: 4px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: 12px;
  border: 1px solid var(--line, rgba(255, 255, 255, 0.08));
}

.manager.mgr-finance .mgr-finance-table {
  margin: 0;
  white-space: normal;
}

.manager.mgr-finance .mgr-finance-table th:last-child,
.manager.mgr-finance .mgr-finance-table td:last-child {
  text-align: right;
  white-space: nowrap;
}

.manager.mgr-finance .mgr-finance-table tbody tr:hover {
  background: rgba(59, 130, 246, 0.06);
}

/* Roster manager: foto a sinistra del nome (tabella + card) */
.manager .mgr-player-cell {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.manager .mgr-player-face {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  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 10px rgba(0, 0, 0, 0.22);
}

.manager .mgr-player-face img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.manager .mgr-player-name-stack {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

/* Bandiera a sinistra del nome (come elenco giocatori) */
.manager .mgr-player-flag {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  line-height: 0;
}
.manager .mgr-player-flag img {
  display: block;
  border-radius: 2px;
  vertical-align: middle;
}

.manager .mgr-rc-face {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  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.2);
}

.manager .mgr-rc-face img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Colonna giocatore: contenuto multilinea con foto */
.manager .table tbody td:first-child,
.manager .table tbody td.mgr-td-player {
  white-space: normal;
  vertical-align: middle;
  max-width: min(440px, 48vw);
}

/* Rosa desktop: Altezza / Piede — riempimento larghezza */
@media (min-width: 960px) {
  .manager .table-wrap.hide-sm .table {
    width: 100%;
    table-layout: auto;
  }
  .manager .table-wrap.hide-sm .table th[title="Altezza"],
  .manager .table-wrap.hide-sm .table th[title="Piede preferito"],
  .manager .table-wrap.hide-sm .table td[data-label="Altezza"],
  .manager .table-wrap.hide-sm .table td[data-label="Piede"] {
    white-space: nowrap;
  }
}

/* Mobile: tabella movimenti a righe orizzontali + scroll laterale */
@media (max-width: 959.98px) {
  .manager.mgr-finance .mgr-finance-table-wrap {
    display: block;
    width: 100%;
    max-width: none;
    margin-left: 0;
    margin-right: 0;
    overflow-x: auto;
    overflow-y: visible;
    -webkit-overflow-scrolling: touch;
    border-radius: 12px;
    border: 1px solid var(--line, rgba(255, 255, 255, 0.1));
    scrollbar-width: thin;
    scrollbar-color: rgba(51, 65, 85, 0.85) rgba(15, 23, 42, 0.35);
  }

  .manager.mgr-finance .mgr-finance-table-wrap::-webkit-scrollbar {
    height: 5px;
  }

  .manager.mgr-finance .mgr-finance-table-wrap::-webkit-scrollbar-track {
    background: rgba(15, 23, 42, 0.35);
    border-radius: 6px;
  }

  .manager.mgr-finance .mgr-finance-table-wrap::-webkit-scrollbar-thumb {
    background: rgba(51, 65, 85, 0.95);
    border-radius: 6px;
  }

  .manager.mgr-finance .mgr-finance-table-wrap::-webkit-scrollbar-thumb:hover {
    background: rgba(71, 85, 105, 0.95);
  }

  .manager.mgr-finance .mgr-finance-table {
    width: max-content;
    min-width: 100%;
    max-width: none;
    margin: 0;
    border-collapse: collapse;
    white-space: nowrap;
  }

  .manager.mgr-finance .mgr-finance-table thead {
    display: table-header-group !important;
  }

  /* app.css (≤980px) forza .table tr { display:grid } anche su thead → 2×2; ripristino riga unica */
  .manager.mgr-finance .mgr-finance-table thead tr {
    display: table-row !important;
    grid-template-columns: unset !important;
    gap: unset !important;
    padding: 0 !important;
    border: none !important;
    border-radius: 0 !important;
    margin-bottom: 0 !important;
    background: transparent !important;
  }

  .manager.mgr-finance .mgr-finance-table tbody {
    display: table-row-group;
  }

  .manager.mgr-finance .mgr-finance-table tbody tr {
    display: table-row !important;
    grid-template-columns: unset !important;
    gap: unset !important;
    padding: 0 !important;
    border: none !important;
    border-radius: 0 !important;
    margin-bottom: 0 !important;
    background: transparent !important;
  }

  .manager.mgr-finance .mgr-finance-table thead th {
    display: table-cell !important;
    padding: 10px 12px;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(148, 163, 184, 0.95);
    text-align: left;
    vertical-align: bottom;
    border-bottom: 1px solid rgba(56, 189, 248, 0.22);
    background: rgba(8, 12, 26, 0.88);
    white-space: nowrap;
  }

  .manager.mgr-finance .mgr-finance-table thead th:last-child {
    text-align: right;
  }

  .manager.mgr-finance .mgr-finance-table thead th:nth-child(1) {
    min-width: 118px;
  }

  .manager.mgr-finance .mgr-finance-table thead th:nth-child(2) {
    min-width: 108px;
  }

  .manager.mgr-finance .mgr-finance-table thead th:nth-child(3) {
    min-width: 160px;
  }

  .manager.mgr-finance .mgr-finance-table thead th:nth-child(4) {
    min-width: 104px;
  }

  .manager.mgr-finance .mgr-finance-table tbody td {
    display: table-cell;
    padding: 10px 12px;
    vertical-align: middle;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    text-align: left !important;
    font-size: 13px;
  }

  .manager.mgr-finance .mgr-finance-table tbody td::before {
    content: none !important;
    display: none !important;
  }

  .manager.mgr-finance .mgr-finance-table tbody td:nth-child(1) {
    min-width: 108px;
    max-width: none;
    white-space: nowrap;
    font-size: 11px;
    line-height: 1.3;
    font-weight: 600;
    letter-spacing: 0.01em;
    color: rgba(186, 198, 214, 0.92);
  }

  .manager.mgr-finance .mgr-finance-table tbody td:nth-child(2) {
    min-width: 108px;
  }

  .manager.mgr-finance .mgr-finance-table tbody td:nth-child(3) {
    min-width: 160px;
    max-width: 260px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .manager.mgr-finance .mgr-finance-table tbody td:nth-child(4) {
    min-width: 104px;
    white-space: nowrap;
  }

  .manager.mgr-finance .mgr-finance-table .amount-pos,
  .manager.mgr-finance .mgr-finance-table .amount-neg {
    font-size: 13px;
    font-weight: 800;
  }

  .manager.mgr-finance .mgr-finance-table .badge-type {
    padding: 0.12rem 0.45rem;
    font-size: 0.78rem;
  }
}

/* ========== Manager · Pagina Strutture (hero + fascia finestra) ========== */
.manager.mgr-structures-page {
  margin-top: 4px;
}

/* Hero strutture sopra al catalogo: popover rail esce dal card senza finire sotto */
.manager.mgr-structures-page > .mgr-dash-hero.mgr-struct-hero {
  overflow: visible;
  position: relative;
  z-index: 5;
}

.manager.mgr-structures-page > .mgr-struct-catalog {
  position: relative;
  z-index: 1;
}

.manager .mgr-struct-hero {
  margin-bottom: 16px;
}

.manager .mgr-struct-hero .mgr-hero {
  padding-bottom: 4px;
}

.manager .mgr-struct-window-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 14px;
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid rgba(59, 130, 246, 0.22);
  background: linear-gradient(100deg, rgba(15, 23, 42, 0.75), rgba(30, 41, 59, 0.45));
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.04) inset;
}

.manager .mgr-struct-window-strip--open {
  border-color: rgba(52, 211, 153, 0.28);
  background: linear-gradient(100deg, rgba(6, 78, 59, 0.2), rgba(15, 23, 42, 0.72));
}

.manager .mgr-struct-window-strip--closed {
  border-color: rgba(251, 191, 36, 0.28);
  background: linear-gradient(100deg, rgba(120, 53, 15, 0.18), rgba(15, 23, 42, 0.78));
}

.manager .mgr-struct-window-strip__main {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.manager .mgr-struct-window-strip__icon {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  font-size: 1rem;
  background: rgba(59, 130, 246, 0.18);
  color: #93c5fd;
  border: 1px solid rgba(96, 165, 250, 0.35);
}

.manager .mgr-struct-window-strip--open .mgr-struct-window-strip__icon {
  background: rgba(16, 185, 129, 0.16);
  color: #6ee7b7;
  border-color: rgba(52, 211, 153, 0.35);
}

.manager .mgr-struct-window-strip--closed .mgr-struct-window-strip__icon {
  background: rgba(245, 158, 11, 0.14);
  color: #fcd34d;
  border-color: rgba(251, 191, 36, 0.35);
}

.manager .mgr-struct-window-strip__text {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 10px;
  min-width: 0;
  font-size: 13px;
  color: var(--muted, #94a3b8);
}

.manager .mgr-struct-window-strip__label {
  font-weight: 800;
  color: var(--ink, #e2e8f0);
  letter-spacing: 0.02em;
}

.manager .mgr-struct-window-strip__date {
  flex: 1 1 100%;
  font-size: 12px;
}

.manager .mgr-struct-window-strip__date strong {
  color: #e0f2fe;
  font-weight: 700;
}

.manager .mgr-struct-window-strip__date {
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0 4px;
}

.manager .mgr-struct-countdown {
  font-size: 11px;
  font-weight: 600;
  color: var(--muted, #94a3b8);
  letter-spacing: 0.01em;
}

.manager .mgr-struct-countdown--banner {
  display: block;
  margin-top: 6px;
  font-size: 12px;
}

@media (min-width: 640px) {
  .manager .mgr-struct-window-strip__date {
    flex: 0 1 auto;
  }
}

.manager .mgr-struct-window-strip__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.manager .mgr-struct-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.02em;
  border: 1px solid rgba(255, 255, 255, 0.12);
  white-space: nowrap;
}

.manager .mgr-struct-pill--warn {
  color: #fde68a;
  background: rgba(245, 158, 11, 0.12);
  border-color: rgba(251, 191, 36, 0.35);
}

.manager .mgr-struct-pill--queue {
  color: #bfdbfe;
  background: rgba(59, 130, 246, 0.14);
  border-color: rgba(96, 165, 250, 0.35);
}

.manager .mgr-struct-pill--balance {
  color: #bae6fd;
  background: rgba(56, 189, 248, 0.12);
  border-color: rgba(56, 189, 248, 0.38);
}

.manager .mgr-struct-level-rail {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid rgba(148, 163, 184, 0.14);
}

@media (max-width: 720px) {
  .manager .mgr-struct-level-rail {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 420px) {
  .manager .mgr-struct-level-rail {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.manager .mgr-struct-lv-node {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 4px;
  padding: 10px 6px;
  border-radius: 12px;
  background: rgba(11, 18, 32, 0.65);
  border: 1px solid rgba(59, 130, 246, 0.15);
  min-width: 0;
}

.manager .mgr-struct-lv-node--pop {
  z-index: 30;
}

.manager .mgr-struct-lv-node__ic {
  font-size: 14px;
  color: #60a5fa;
  opacity: 0.95;
}

.manager .mgr-struct-lv-node__lbl {
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted, #94a3b8);
}

.manager .mgr-struct-lv-anchor {
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #38bdf8;
  text-decoration: none;
  margin: 2px 0 0;
  line-height: 1.2;
}

.manager .mgr-struct-lv-anchor:hover {
  text-decoration: underline;
  color: #7dd3fc;
}

/* Barra “energia” livelli (1…max, verde = attivo) */
.manager .mgr-struct-lv-bar {
  display: flex;
  align-items: stretch;
  gap: 3px;
  width: 100%;
  height: 11px;
  margin-top: 4px;
  box-sizing: border-box;
}

/* Segmenti barra livelli (span nel template; supporto anche button se riusato) */
.manager .mgr-struct-lv-bar > .mgr-struct-lv-seg {
  flex: 1 1 0;
  min-width: 0;
  min-height: 11px;
  margin: 0;
  padding: 0;
  border-radius: 4px;
  display: block;
  box-sizing: border-box;
  cursor: default;
  -webkit-tap-highlight-color: transparent;
  appearance: none;
  border: 0;
  background: rgba(30, 41, 59, 0.9);
  box-shadow:
    0 0 0 1px rgba(51, 65, 85, 0.65),
    0 2px 4px rgba(0, 0, 0, 0.35) inset,
    0 1px 0 rgba(255, 255, 255, 0.04);
  opacity: 0.5;
  transition:
    opacity 0.15s ease,
    box-shadow 0.15s ease,
    filter 0.15s ease,
    transform 0.08s ease;
}

.manager .mgr-struct-lv-bar > button.mgr-struct-lv-seg {
  cursor: pointer;
}

/* Solo segmenti spenti: hover non deve vincere sul verde */
.manager .mgr-struct-lv-bar > .mgr-struct-lv-seg:hover:not(.mgr-struct-lv-seg--on) {
  opacity: 0.85;
  box-shadow:
    0 0 0 1px rgba(96, 165, 250, 0.45),
    0 2px 4px rgba(0, 0, 0, 0.35) inset,
    0 1px 0 rgba(255, 255, 255, 0.04);
}

.manager .mgr-struct-lv-bar > button.mgr-struct-lv-seg:focus-visible {
  outline: 2px solid rgba(147, 197, 253, 0.85);
  outline-offset: 2px;
  opacity: 1;
}

.manager .mgr-struct-lv-bar > button.mgr-struct-lv-seg:active {
  transform: scale(0.96);
}

.manager .mgr-struct-lv-bar > .mgr-struct-lv-seg.mgr-struct-lv-seg--on {
  opacity: 1;
  background: linear-gradient(180deg, #4ade80 0%, #22c55e 45%, #15803d 100%);
  box-shadow:
    0 0 12px rgba(34, 197, 94, 0.45),
    0 0 0 1px rgba(134, 239, 172, 0.55),
    0 1px 0 rgba(255, 255, 255, 0.35) inset,
    0 -1px 0 rgba(0, 0, 0, 0.2) inset;
}

.manager .mgr-struct-lv-bar > .mgr-struct-lv-seg.mgr-struct-lv-seg--on:hover {
  opacity: 1;
  filter: brightness(1.06);
  box-shadow:
    0 0 14px rgba(34, 197, 94, 0.55),
    0 0 0 1px rgba(167, 243, 208, 0.65),
    0 1px 0 rgba(255, 255, 255, 0.35) inset,
    0 -1px 0 rgba(0, 0, 0, 0.2) inset;
}

.manager .mgr-struct-lv-caption {
  font-size: 10px;
  font-weight: 800;
  color: var(--muted, #94a3b8);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.04em;
  margin-top: 3px;
}

/* Popover descrizione livello (hover / tap) */
.manager .mgr-struct-lv-pop {
  position: absolute;
  left: 4px;
  right: 4px;
  top: calc(100% - 2px);
  margin-top: 2px;
  padding: 8px 10px 10px;
  border-radius: 10px;
  text-align: left;
  background: linear-gradient(165deg, rgba(15, 23, 42, 0.98), rgba(17, 24, 39, 0.96));
  border: 1px solid rgba(59, 130, 246, 0.28);
  box-shadow:
    0 12px 40px rgba(0, 0, 0, 0.45),
    0 0 0 1px rgba(255, 255, 255, 0.04) inset;
  z-index: 50;
  max-height: min(200px, 42vh);
  overflow: auto;
  -webkit-overflow-scrolling: touch;
}

.manager .mgr-struct-lv-pop__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
}

.manager .mgr-struct-lv-pop__title {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #86efac;
}

.manager .mgr-struct-lv-pop__close {
  flex-shrink: 0;
  width: 26px;
  height: 26px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 8px;
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
  color: #94a3b8;
  background: rgba(255, 255, 255, 0.06);
  transition: color 0.12s ease, background 0.12s ease;
}

.manager .mgr-struct-lv-pop__close:hover {
  color: #e2e8f0;
  background: rgba(255, 255, 255, 0.1);
}

.manager .mgr-struct-lv-pop__body {
  margin: 0;
  font-size: 12px;
  line-height: 1.45;
  color: #cbd5e1;
  font-weight: 500;
}

/* Catalogo strutture (pagina manager/structures) */
.manager .mgr-struct-catalog {
  margin-top: 6px;
}

.manager .mgr-struct-catalog .struct-card {
  scroll-margin-top: 96px;
}

.manager .mgr-struct-catalog > .mgr-section-title {
  margin-bottom: 6px;
}
.manager .mgr-struct-catalog__lead {
  margin: 0 0 16px;
  max-width: 62rem;
  line-height: 1.5;
  color: var(--muted, #94a3b8);
}
.manager .mgr-struct-catalog__lead strong {
  color: #e0f2fe;
  font-weight: 800;
}

/* Catalogo strutture: max 3 colonne su desktop (niente fila da 5 stretta) */
.manager.mgr-structures-page .mgr-struct-catalog .xg-struct-grid {
  gap: clamp(14px, 1.8vw, 18px);
  grid-template-columns: 1fr;
}
@media (min-width: 720px) {
  .manager.mgr-structures-page .mgr-struct-catalog .xg-struct-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (min-width: 1100px) {
  .manager.mgr-structures-page .mgr-struct-catalog .xg-struct-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.manager.mgr-structures-page .mgr-struct-catalog .struct-card .body {
  padding: 14px 14px 12px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.manager.mgr-structures-page .mgr-struct-catalog .struct-card h3 {
  font-size: 1.05rem;
  line-height: 1.25;
}
.manager.mgr-structures-page .mgr-struct-catalog .struct-card .muted {
  font-size: 0.88rem;
  line-height: 1.45;
  color: #9fb4c8;
}
.manager.mgr-structures-page .mgr-struct-catalog .struct-card .meta {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
  margin: 10px 0 6px;
  min-width: 0;
}
.manager.mgr-structures-page .mgr-struct-catalog .struct-card .chip {
  display: block;
  width: 100%;
  box-sizing: border-box;
  border-radius: 8px;
  padding: 0.5rem 0.7rem;
  font-size: 0.8rem;
  font-weight: 750;
  line-height: 1.4;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
}
.manager.mgr-structures-page .mgr-struct-catalog .struct-card .chip-bonus {
  border-color: rgba(52, 211, 153, 0.42);
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.18), rgba(6, 78, 59, 0.22));
  color: #d1fae5;
  box-shadow: inset 0 0 0 1px rgba(167, 243, 208, 0.08);
}
.manager.mgr-structures-page .mgr-struct-catalog .struct-card .chip-cost {
  border-color: rgba(96, 165, 250, 0.45);
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.16), rgba(30, 58, 138, 0.22));
  color: #e0f2fe;
  box-shadow: inset 0 0 0 1px rgba(186, 230, 253, 0.08);
}

/* Badge stato / prezzo nella card: squadrati, testo a capo */
.manager.mgr-structures-page .mgr-struct-catalog .price-badge,
.manager.mgr-structures-page .mgr-struct-catalog .struct-diff-badge,
.manager.mgr-structures-page .mgr-struct-catalog .note-70 {
  border-radius: 8px;
  white-space: normal;
  overflow-wrap: anywhere;
  max-width: 100%;
  line-height: 1.35;
}

/* Approfondimento: CTA più chiara */
.manager.mgr-structures-page .mgr-struct-catalog .lv-guide-row {
  margin-top: 12px;
  display: flex;
  justify-content: stretch;
}
.manager.mgr-structures-page .mgr-struct-catalog .lv-guide-open {
  width: 100%;
  justify-content: center;
  gap: 10px;
  padding: 0.65rem 0.9rem;
  border-radius: 10px;
  border: 1px solid rgba(56, 189, 248, 0.42);
  background: linear-gradient(165deg, rgba(14, 165, 233, 0.22), rgba(8, 47, 73, 0.35));
  color: #e0f2fe;
  font-weight: 800;
  font-size: 0.9rem;
  letter-spacing: 0.01em;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.04) inset,
    0 8px 22px rgba(14, 165, 233, 0.12);
  transition: border-color 0.15s ease, background 0.15s ease, transform 0.12s ease;
}
.manager.mgr-structures-page .mgr-struct-catalog .lv-guide-open:hover {
  border-color: rgba(125, 211, 252, 0.65);
  background: linear-gradient(165deg, rgba(56, 189, 248, 0.3), rgba(12, 74, 110, 0.42));
  color: #f0f9ff;
  transform: translateY(-1px);
}
.manager.mgr-structures-page .mgr-struct-catalog .lv-guide-open i {
  color: #7dd3fc;
}

.manager .mgr-struct-pending > .mgr-section-title {
  margin-bottom: 10px;
}

/* =============================================================================
   Strutture /manager/structures — UI gaming allineata alla Home (pub-dash)
   ============================================================================= */

.manager.mgr-structures-page > .card.mgr-dash-hero.mgr-struct-hero {
  border-color: rgba(186, 198, 255, 0.14);
  -webkit-backdrop-filter: saturate(150%) blur(12px);
  backdrop-filter: saturate(150%) blur(12px);
  background:
    linear-gradient(165deg, rgba(30, 41, 59, 0.55) 0%, rgba(12, 18, 40, 0.72) 100%),
    radial-gradient(ellipse 85% 75% at 10% 0%, rgba(99, 102, 241, 0.22), transparent 58%),
    radial-gradient(ellipse 65% 55% at 100% 6%, rgba(236, 72, 153, 0.1), transparent 52%);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.05) inset,
    0 18px 48px rgba(0, 0, 0, 0.28);
}

.manager.mgr-structures-page .mgr-struct-window-strip {
  position: relative;
  overflow: hidden;
  border-radius: 14px;
}

.manager.mgr-structures-page .mgr-struct-window-strip::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  opacity: 0.22;
  pointer-events: none;
  background: radial-gradient(120% 80% at 18% 0%, rgba(56, 189, 248, 0.55), transparent 58%);
}

.manager.mgr-structures-page .mgr-struct-window-strip--open::before {
  background: radial-gradient(120% 80% at 18% 0%, rgba(52, 211, 153, 0.5), transparent 58%);
}

.manager.mgr-structures-page .mgr-struct-window-strip--closed::before {
  background: radial-gradient(120% 80% at 18% 0%, rgba(251, 191, 36, 0.4), transparent 58%);
}

.manager.mgr-structures-page .mgr-struct-window-strip__main,
.manager.mgr-structures-page .mgr-struct-window-strip__meta {
  position: relative;
  z-index: 1;
}

.manager.mgr-structures-page .mgr-struct-countdown {
  font-variant-numeric: tabular-nums;
  font-family: ui-monospace, "Cascadia Code", "Segoe UI Mono", monospace;
  letter-spacing: 0.02em;
}

.manager.mgr-structures-page .card.mgr-struct-catalog,
.manager.mgr-structures-page .card.mgr-struct-pending {
  position: relative;
  overflow: hidden;
  border-color: rgba(186, 198, 255, 0.12);
  background: rgba(12, 18, 40, 0.42);
  -webkit-backdrop-filter: saturate(150%) blur(10px);
  backdrop-filter: saturate(150%) blur(10px);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.04) inset,
    0 14px 40px rgba(0, 0, 0, 0.26);
}

.manager.mgr-structures-page .card.mgr-struct-catalog::before,
.manager.mgr-structures-page .card.mgr-struct-pending::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 2px;
  opacity: 0.78;
  pointer-events: none;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(56, 189, 248, 0.45),
    rgba(52, 211, 153, 0.35),
    rgba(129, 140, 248, 0.38),
    transparent
  );
}

.manager.mgr-structures-page .card.mgr-struct-catalog > *,
.manager.mgr-structures-page .card.mgr-struct-pending > * {
  position: relative;
  z-index: 1;
}

.manager.mgr-structures-page .card.mgr-struct-catalog > .mgr-section-title {
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.45);
}

.manager .mgr-struct-catalog .lv-wrap {
  position: relative;
  overflow: hidden;
  border-radius: 14px;
  border: 1px solid rgba(71, 85, 105, 0.45);
  padding: 12px 14px;
  background: linear-gradient(145deg, rgba(30, 41, 59, 0.78) 0%, rgba(15, 23, 42, 0.92) 100%);
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.28) inset,
    0 8px 28px rgba(0, 0, 0, 0.22);
}

.manager .mgr-struct-catalog .lv-wrap::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 2px;
  opacity: 0.72;
  pointer-events: none;
  background: linear-gradient(90deg, transparent, rgba(56, 189, 248, 0.45), rgba(52, 211, 153, 0.35), transparent);
}

.manager .mgr-struct-catalog .lv-wrap--locked {
  border-color: rgba(251, 191, 36, 0.28);
  background: linear-gradient(145deg, rgba(45, 35, 20, 0.5) 0%, rgba(15, 23, 42, 0.9) 100%);
}

.manager .mgr-struct-catalog .lv-wrap--locked::before {
  background: linear-gradient(90deg, transparent, rgba(251, 191, 36, 0.4), rgba(245, 158, 11, 0.25), transparent);
}

.manager .mgr-struct-catalog .lv-btn {
  position: relative;
  z-index: 1;
  padding: 0.45rem 0.78rem;
  border-radius: 999px;
  font-weight: 800;
  letter-spacing: 0.06em;
  font-size: 0.74rem;
  color: #f1f5f9;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: linear-gradient(145deg, rgba(30, 41, 59, 0.95) 0%, rgba(15, 23, 42, 0.9) 100%);
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.35) inset,
    0 6px 18px rgba(0, 0, 0, 0.28);
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.16s ease, border-color 0.16s ease, filter 0.15s ease;
}

.manager .mgr-struct-catalog .lv-btn::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  opacity: 0.2;
  background: radial-gradient(100% 80% at 28% 0%, #38bdf8, transparent 68%);
  pointer-events: none;
}

.manager .mgr-struct-catalog .lv-btn:hover:not(:disabled) {
  transform: translateY(-2px);
  border-color: rgba(56, 189, 248, 0.45);
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.35) inset,
    0 10px 28px rgba(0, 0, 0, 0.38),
    0 0 24px rgba(56, 189, 248, 0.18);
}

.manager .mgr-struct-catalog .lv-btn.active {
  color: #0c1929;
  border-color: rgba(56, 189, 248, 0.65);
  background: linear-gradient(180deg, #7dd3fc, #2563eb);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.3) inset,
    0 4px 22px rgba(37, 99, 235, 0.45),
    0 0 24px rgba(56, 189, 248, 0.28);
}

.manager .mgr-struct-catalog .lv-btn.active::before {
  opacity: 0;
}

.manager .mgr-struct-catalog .lv-btn:focus-visible {
  outline: 2px solid rgba(56, 189, 248, 0.75);
  outline-offset: 2px;
}

.manager .mgr-struct-catalog .lv-btn:disabled {
  opacity: 0.36;
  cursor: not-allowed;
  transform: none;
  filter: grayscale(0.35);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.35) inset;
}

.manager .mgr-struct-catalog .lv-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 40px;
  padding: 0 18px;
  border-radius: 12px;
  font-weight: 800;
  font-size: 0.86rem;
  border: 1px solid rgba(34, 197, 94, 0.42);
  cursor: pointer;
  color: #052e16;
  background: linear-gradient(180deg, #4ade80, #16a34a);
  box-shadow:
    0 4px 16px rgba(34, 197, 94, 0.32),
    0 0 0 1px rgba(255, 255, 255, 0.14) inset;
  transition: filter 0.15s ease, transform 0.1s ease;
}

.manager .mgr-struct-catalog .lv-submit:hover:not(:disabled) {
  filter: brightness(1.08);
}

.manager .mgr-struct-catalog .lv-submit:active:not(:disabled) {
  transform: translateY(1px);
}

.manager .mgr-struct-catalog .lv-submit:disabled {
  opacity: 0.48;
  cursor: not-allowed;
  filter: grayscale(0.45) brightness(0.85);
}

.manager .mgr-struct-catalog .notes {
  height: 40px;
  padding: 0 12px;
  min-width: 160px;
  flex: 1 1 220px;
  border-radius: 12px;
  border: 1px solid rgba(71, 85, 105, 0.55);
  background: rgba(15, 23, 42, 0.88);
  color: #e2e8f0;
  font-weight: 600;
  font-size: 0.88rem;
}

.manager .mgr-struct-catalog .notes::placeholder {
  color: rgba(148, 163, 184, 0.75);
}

.manager .mgr-struct-catalog .notes:focus {
  outline: none;
  border-color: rgba(56, 189, 248, 0.55);
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.2);
}

.manager .mgr-struct-catalog .benef-preview {
  margin-top: 12px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid rgba(56, 189, 248, 0.22);
  background: rgba(15, 23, 42, 0.58);
  font-size: 0.9rem;
  line-height: 1.45;
  color: #cbd5e1;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.manager .mgr-struct-catalog .benef-preview .muted {
  color: #94a3b8;
}

.manager .mgr-struct-catalog .benef-preview__cost {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
  margin-bottom: 10px;
  padding-bottom: 10px;
  border-bottom: 1px dashed rgba(148, 163, 184, 0.28);
}

.manager .mgr-struct-catalog .benef-preview__lv {
  flex-shrink: 0;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.65rem;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #e0f2fe;
  border: 1px solid rgba(56, 189, 248, 0.4);
  background: linear-gradient(160deg, rgba(96, 165, 250, 0.25) 0%, rgba(37, 99, 235, 0.15) 100%);
  box-shadow: 0 0 16px rgba(56, 189, 248, 0.12);
}

.manager .mgr-struct-catalog .benef-preview__cost-meta {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px 10px;
  min-width: 0;
}

.manager .mgr-struct-catalog .benef-preview__cost-label {
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(148, 163, 184, 0.95);
}

.manager .mgr-struct-catalog .benef-preview__cost-value {
  font-size: 1.12rem;
  font-weight: 900;
  letter-spacing: -0.02em;
  color: #7dd3fc;
  text-shadow: 0 0 22px rgba(56, 189, 248, 0.35);
  font-variant-numeric: tabular-nums;
}

.manager .mgr-struct-catalog .benef-preview__benef {
  color: #e2e8f0;
}

.manager .mgr-struct-catalog .benef-preview__benef-k {
  display: block;
  margin: 0 0 6px;
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #a78bfa;
}

.manager .mgr-struct-catalog .benef-preview__list {
  margin: 0;
  padding: 0 0 0 1.15rem;
  font-size: 0.82rem;
  line-height: 1.45;
  color: #e2e8f0;
  list-style: disc;
}

.manager .mgr-struct-catalog .benef-preview__list li {
  margin: 0.28rem 0;
  padding-left: 0.15rem;
}

.manager .mgr-struct-catalog .benef-preview__list li::marker {
  color: rgba(52, 211, 153, 0.75);
}

.manager.mgr-structures-page .mgr-struct-lv-node {
  border-color: rgba(129, 140, 248, 0.22);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.22);
}

.manager.mgr-structures-page .mgr-struct-lv-node::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  opacity: 0.14;
  pointer-events: none;
  background: radial-gradient(100% 80% at 50% 0%, rgba(56, 189, 248, 0.55), transparent 65%);
}

.manager.mgr-structures-page .mgr-struct-lv-node > *:not(.mgr-struct-lv-pop) {
  position: relative;
  z-index: 1;
}

.manager.mgr-structures-page .mgr-struct-lv-node--pop {
  z-index: 30;
}

.manager.mgr-structures-page .mgr-struct-lv-anchor {
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid rgba(56, 189, 248, 0.35);
  background: rgba(56, 189, 248, 0.1);
  font-size: 8px;
}

.manager.mgr-structures-page .mgr-struct-lv-anchor:hover {
  background: rgba(56, 189, 248, 0.2);
  border-color: rgba(125, 211, 252, 0.55);
}

/* Modale conferma — bottoni come Home / Filtra verde */
.mgr-struct-confirm--gaming .mgr-struct-confirm__panel {
  border-radius: 16px;
  border: 1px solid rgba(186, 198, 255, 0.18);
  background: linear-gradient(165deg, rgba(30, 41, 59, 0.96) 0%, rgba(12, 18, 40, 0.98) 100%);
  box-shadow:
    0 24px 60px rgba(0, 0, 0, 0.5),
    0 0 0 1px rgba(255, 255, 255, 0.06) inset,
    0 0 40px rgba(56, 189, 248, 0.08);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}

.mgr-struct-confirm--gaming .mgr-struct-confirm__recap {
  border-radius: 12px;
  background: rgba(56, 189, 248, 0.08);
  border: 1px dashed rgba(56, 189, 248, 0.32);
}

.mgr-struct-confirm--gaming .mgr-struct-confirm__cancel {
  min-height: 40px;
  padding: 0 16px;
  border-radius: 12px;
  font-weight: 800;
  border: 1px solid rgba(148, 163, 184, 0.35);
  background: rgba(255, 255, 255, 0.06);
  color: #e2e8f0;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.2) inset;
}

.mgr-struct-confirm--gaming .mgr-struct-confirm__cancel:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(186, 198, 255, 0.45);
}

.mgr-struct-confirm--gaming .mgr-struct-confirm__ok {
  min-height: 40px;
  padding: 0 18px;
  border-radius: 12px;
  font-weight: 800;
  border: 1px solid rgba(56, 189, 248, 0.55);
  color: #0c1929;
  background: linear-gradient(180deg, #38bdf8, #2563eb);
  box-shadow:
    0 4px 18px rgba(37, 99, 235, 0.35),
    0 0 0 1px rgba(255, 255, 255, 0.15) inset;
}

.mgr-struct-confirm--gaming .mgr-struct-confirm__ok:hover {
  filter: brightness(1.07);
}

/* Driver.js — tour Manager (popover scuro, leggibile su overlay) */
.driver-popover.mgr-driver-popover {
  max-width: min(420px, calc(100vw - 24px));
  border-radius: 14px;
  border: 1px solid rgba(59, 130, 246, 0.28);
  background: linear-gradient(165deg, rgba(15, 23, 42, 0.98) 0%, rgba(12, 18, 32, 0.99) 100%);
  box-shadow:
    0 20px 50px rgba(0, 0, 0, 0.55),
    0 0 0 1px rgba(255, 255, 255, 0.05) inset;
  color: #e2e8f0;
}

.driver-popover.mgr-driver-popover .driver-popover-title {
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #f0f9ff;
}

.driver-popover.mgr-driver-popover .driver-popover-description {
  font-size: 0.9rem;
  line-height: 1.45;
  color: #cbd5e1;
}

.driver-popover.mgr-driver-popover .driver-popover-description strong {
  color: #e0f2fe;
  font-weight: 700;
}

.driver-popover.mgr-driver-popover .driver-popover-footer {
  border-top: 1px solid rgba(148, 163, 184, 0.15);
  margin-top: 10px;
  padding-top: 10px;
}

.driver-popover.mgr-driver-popover .driver-popover-progress-text {
  color: #94a3b8;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.driver-popover.mgr-driver-popover .driver-popover-prev-btn,
.driver-popover.mgr-driver-popover .driver-popover-next-btn,
.driver-popover.mgr-driver-popover .driver-popover-close-btn {
  border-radius: 10px;
  font-weight: 700;
}

.driver-popover.mgr-driver-popover .driver-popover-next-btn {
  background: linear-gradient(180deg, #38bdf8, #2563eb);
  color: #0c1929;
  border: 1px solid rgba(56, 189, 248, 0.55);
  text-shadow: none;
}

.driver-popover.mgr-driver-popover .driver-popover-prev-btn {
  background: rgba(255, 255, 255, 0.06);
  color: #e2e8f0;
  border: 1px solid rgba(148, 163, 184, 0.35);
}

.driver-popover.mgr-driver-popover .driver-popover-close-btn {
  color: #94a3b8;
}

/* —— Modal gaming: giocatore messo sul mercato —— */
body.mgr-market-modal--open {
  overflow: hidden;
}

.mgr-market-modal {
  position: fixed;
  inset: 0;
  z-index: 100050;
  display: grid;
  place-items: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s ease;
}

.mgr-market-modal.is-open {
  opacity: 1;
  pointer-events: auto;
}

.mgr-market-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(2, 6, 23, 0.72);
  backdrop-filter: blur(6px);
  cursor: pointer;
}

.mgr-market-modal__panel {
  position: relative;
  z-index: 1;
  width: min(420px, 100%);
  padding: 28px 26px 24px;
  border-radius: 18px;
  border: 1px solid rgba(56, 189, 248, 0.45);
  background:
    linear-gradient(155deg, rgba(15, 23, 42, 0.97) 0%, rgba(12, 18, 35, 0.99) 55%, rgba(15, 23, 42, 0.96) 100%),
    radial-gradient(420px 180px at 50% -30%, rgba(56, 189, 248, 0.25), transparent 65%);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.06) inset,
    0 24px 60px rgba(0, 0, 0, 0.55),
    0 0 80px rgba(37, 99, 235, 0.15);
  text-align: center;
  transform: scale(0.94) translateY(12px);
  transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1);
}

.mgr-market-modal.is-open .mgr-market-modal__panel {
  transform: scale(1) translateY(0);
}

.mgr-market-modal__glow {
  position: absolute;
  inset: -2px;
  border-radius: 19px;
  background: linear-gradient(125deg, rgba(56, 189, 248, 0.35), transparent 40%, rgba(99, 102, 241, 0.25));
  opacity: 0.5;
  z-index: -1;
  filter: blur(1px);
  pointer-events: none;
}

.mgr-market-modal__icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 14px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  font-size: 24px;
  color: #0c1929;
  background: linear-gradient(180deg, #fde68a, #f59e0b);
  box-shadow:
    0 8px 24px rgba(245, 158, 11, 0.35),
    0 0 0 1px rgba(255, 255, 255, 0.25) inset;
}

.mgr-market-modal__eyebrow {
  margin: 0 0 6px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #38bdf8;
}

.mgr-market-modal__title {
  margin: 0 0 14px;
  font-size: 1.45rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: #f8fafc;
}

.mgr-market-modal__lead {
  margin: 0 0 10px;
  font-size: 1rem;
  line-height: 1.5;
  color: #e2e8f0;
}

.mgr-market-modal__lead strong {
  color: #fef3c7;
  font-weight: 800;
}

.mgr-market-modal__sub {
  margin: 0 0 22px;
  font-size: 0.9rem;
  line-height: 1.5;
  color: #94a3b8;
}

.mgr-market-modal__ok {
  width: 100%;
  max-width: 260px;
  padding: 12px 20px;
  border-radius: 12px;
  border: 1px solid rgba(56, 189, 248, 0.55);
  font-weight: 800;
  font-size: 0.95rem;
  cursor: pointer;
  color: #0c1929;
  background: linear-gradient(180deg, #38bdf8, #2563eb);
  box-shadow:
    0 4px 18px rgba(37, 99, 235, 0.35),
    0 0 0 1px rgba(255, 255, 255, 0.15) inset;
}

.mgr-market-modal__ok:hover {
  filter: brightness(1.06);
}

/* —— Popup azione mercato (form / gestisci vetrina) —— */
body.mgr-mkt-action-modal--open {
  overflow: hidden;
}

.mgr-mkt-action-modal {
  position: fixed;
  inset: 0;
  z-index: 100060;
  display: grid;
  place-items: center;
  padding: 16px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.mgr-mkt-action-modal.is-open {
  opacity: 1;
  pointer-events: auto;
}

.mgr-mkt-action-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(2, 6, 18, 0.72);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
}

.mgr-mkt-action-modal__panel {
  position: relative;
  z-index: 1;
  width: min(420px, 100%);
  max-height: min(92vh, 640px);
  overflow: auto;
  padding: 18px 18px 16px;
  border-radius: 16px;
  border: 1px solid rgba(59, 130, 246, 0.28);
  background:
    linear-gradient(165deg, rgba(15, 23, 42, 0.98) 0%, rgba(12, 18, 32, 0.96) 100%);
  box-shadow:
    0 24px 60px rgba(0, 0, 0, 0.55),
    0 0 0 1px rgba(255, 255, 255, 0.04) inset;
  transform: translateY(10px) scale(0.98);
  transition: transform 0.22s ease;
}

.mgr-mkt-action-modal.is-open .mgr-mkt-action-modal__panel {
  transform: none;
}

.mgr-mkt-action-modal__x {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  padding: 0;
  border-radius: 9px;
  border: 1px solid rgba(148, 163, 184, 0.28);
  background: rgba(15, 23, 42, 0.65);
  color: #cbd5e1;
  cursor: pointer;
}

.mgr-mkt-action-modal__x:hover {
  color: #fff;
  border-color: rgba(148, 163, 184, 0.5);
}

.mgr-mkt-action-modal__eyebrow {
  margin: 0 0 4px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #60a5fa;
}

.mgr-mkt-action-modal__title {
  margin: 0 36px 4px 0;
  font-size: 1.2rem;
  font-weight: 800;
  color: #e2e8f0;
  letter-spacing: -0.02em;
}

.mgr-mkt-action-modal__player {
  margin: 0 0 12px;
  font-size: 0.95rem;
  font-weight: 700;
  color: #93c5fd;
}

.mgr-mkt-action-modal__loan {
  margin: 0 0 12px;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid rgba(251, 191, 36, 0.35);
  background: rgba(245, 158, 11, 0.08);
  color: #fde68a;
  font-size: 12px;
  line-height: 1.4;
}

.mgr-mkt-action-modal__loan i {
  margin-right: 4px;
  opacity: 0.9;
}

.mgr-mkt-action-modal__hint {
  margin: 0 0 10px;
  font-size: 12px;
  color: var(--muted, #94a3b8);
}

.mgr-mkt-action-modal .mgr-mkt-fields--stack {
  display: grid;
  gap: 10px;
  margin-bottom: 12px;
}

.mgr-mkt-action-modal .mgr-mkt-field__lbl {
  display: block;
  margin-bottom: 4px;
  font-size: 11px;
  font-weight: 700;
  color: var(--muted, #94a3b8);
}

.mgr-mkt-action-modal .mgr-mkt-field .input {
  width: 100%;
  box-sizing: border-box;
}

.mgr-mkt-action-modal__submit,
.mgr-mkt-action-modal .mgr-mkt-btn-remove {
  width: 100%;
  justify-content: center;
  margin-top: 4px;
}

.mgr-mkt-action-modal .mgr-mkt-listed-meta {
  list-style: none;
  margin: 0 0 14px;
  padding: 0;
  display: grid;
  gap: 6px;
  font-size: 13px;
  color: #cbd5e1;
}

.mgr-mkt-action-modal .mgr-mkt-listed-meta strong {
  color: #e2e8f0;
}

.mgr-mkt-action-modal .mgr-mkt-listed-meta--empty {
  font-style: italic;
  opacity: 0.85;
}

@media (orientation: landscape) and (max-height: 520px) {
  .mgr-mkt-action-modal {
    padding: 8px;
    align-items: stretch;
  }

  .mgr-mkt-action-modal__panel {
    max-height: calc(100vh - 16px);
    margin: auto;
    padding: 12px 14px 12px;
  }

  .mgr-mkt-action-modal__title {
    font-size: 1.05rem;
  }

  .mgr-mkt-action-modal .mgr-mkt-fields--stack {
    gap: 8px;
    margin-bottom: 8px;
  }
}

/* —— Popup link esterni (SoFIFA / Transfermarkt / CMTracker) —— */
body.mgr-ext-links-modal--open {
  overflow: hidden;
}

.mgr-ext-links-modal {
  position: fixed;
  inset: 0;
  z-index: 100060;
  display: grid;
  place-items: center;
  padding: 16px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.mgr-ext-links-modal.is-open {
  opacity: 1;
  pointer-events: auto;
}

.mgr-ext-links-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(2, 6, 18, 0.72);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
}

.mgr-ext-links-modal__panel {
  position: relative;
  z-index: 1;
  width: min(380px, 100%);
  padding: 18px 18px 16px;
  border-radius: 16px;
  border: 1px solid rgba(34, 211, 238, 0.28);
  background:
    linear-gradient(165deg, rgba(15, 23, 42, 0.98) 0%, rgba(12, 18, 32, 0.96) 100%);
  box-shadow:
    0 24px 60px rgba(0, 0, 0, 0.55),
    0 0 0 1px rgba(255, 255, 255, 0.04) inset;
  transform: translateY(10px) scale(0.98);
  transition: transform 0.22s ease;
}

.mgr-ext-links-modal.is-open .mgr-ext-links-modal__panel {
  transform: none;
}

.mgr-ext-links-modal__x {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  padding: 0;
  border-radius: 9px;
  border: 1px solid rgba(148, 163, 184, 0.28);
  background: rgba(15, 23, 42, 0.65);
  color: #cbd5e1;
  cursor: pointer;
}

.mgr-ext-links-modal__x:hover {
  color: #fff;
  border-color: rgba(148, 163, 184, 0.5);
}

.mgr-ext-links-modal__eyebrow {
  margin: 0 0 4px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #22d3ee;
}

.mgr-ext-links-modal__title {
  margin: 0 36px 4px 0;
  font-size: 1.15rem;
  font-weight: 800;
  color: #f8fafc;
}

.mgr-ext-links-modal__player {
  margin: 0 0 14px;
  font-size: 0.9rem;
  font-weight: 650;
  color: #94a3b8;
}

.mgr-ext-links-modal__list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.mgr-ext-links-modal__link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 12px;
  border-radius: 12px;
  text-decoration: none;
  color: #e2e8f0;
  border: 1px solid rgba(148, 163, 184, 0.22);
  background: rgba(15, 23, 42, 0.55);
  transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}

.mgr-ext-links-modal__link:hover {
  border-color: rgba(34, 211, 238, 0.45);
  background: rgba(8, 145, 178, 0.14);
  color: #f8fafc;
}

.mgr-ext-links-modal__ico {
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: rgba(34, 211, 238, 0.16);
  color: #67e8f9;
  flex: 0 0 auto;
}

.mgr-ext-links-modal__lbl {
  flex: 1 1 auto;
  font-weight: 800;
  font-size: 0.92rem;
  letter-spacing: 0.02em;
}

.mgr-ext-links-modal__go {
  font-size: 0.75rem;
  opacity: 0.65;
}

.mgr-ext-links-modal__empty {
  margin: 0;
  font-size: 0.85rem;
  color: #94a3b8;
}

/*
 * Vista Tabella: righe come desktop + scroll laterale (anche su cell).
 * Senza questo, app.css (max-width 980px) spezza .table tr in griglia 2×2.
 */
.manager.mgr-roster--table .table-wrap.hide-sm .table {
  width: max-content;
  min-width: 720px;
  border-collapse: collapse;
}

.manager.mgr-roster--table .table-wrap.hide-sm .table thead {
  display: table-header-group !important;
}

.manager.mgr-roster--table .table-wrap.hide-sm .table thead tr,
.manager.mgr-roster--table .table-wrap.hide-sm .table tbody tr {
  display: table-row !important;
  grid-template-columns: unset !important;
  gap: unset !important;
  padding: 0 !important;
  border: none !important;
  border-radius: 0 !important;
  margin: 0 !important;
  background: transparent !important;
}

.manager.mgr-roster--table .table-wrap.hide-sm .table tbody {
  display: table-row-group !important;
}

.manager.mgr-roster--table .table-wrap.hide-sm .table thead th,
.manager.mgr-roster--table .table-wrap.hide-sm .table tbody td {
  display: table-cell !important;
  vertical-align: middle;
  white-space: nowrap;
  padding: 6px 8px;
  font-size: 12px;
  border-bottom: 1px solid var(--line, rgba(255, 255, 255, 0.08));
}

.manager.mgr-roster--table .table-wrap.hide-sm .table thead th {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(148, 163, 184, 0.95);
  background: rgba(8, 12, 26, 0.92);
  border-bottom: 1px solid rgba(56, 189, 248, 0.22);
}

.manager.mgr-roster--table .table-wrap.hide-sm .table tbody td:first-child {
  max-width: none;
  white-space: nowrap;
}

.manager.mgr-roster--table .table-wrap.hide-sm .mgr-player-face,
.manager.mgr-roster--table .table-wrap.hide-sm .mgr-player-face img {
  width: 28px;
  height: 28px;
}

@media (max-width: 980px) {
  .manager.mgr-roster--table .table-wrap.hide-sm .table thead th,
  .manager.mgr-roster--table .table-wrap.hide-sm .table tbody td {
    padding: 5px 7px;
    font-size: 11px;
  }
}

/* Phone landscape: rosa ancora più compatta; niente vista card */
@media (orientation: landscape) and (max-height: 520px) and (min-width: 600px) {
  .manager .mgr-roster-view-bar {
    display: none !important;
  }

  .manager.mgr-roster--cards .player-cards {
    display: none !important;
  }

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

  .manager .table-wrap.hide-sm .table thead th,
  .manager .table-wrap.hide-sm .table tbody td {
    padding: 4px 6px;
    font-size: 11px;
  }

  .manager .table-wrap.hide-sm .mgr-player-face,
  .manager .table-wrap.hide-sm .mgr-player-face img {
    width: 24px;
    height: 24px;
  }
}

.manager .mgr-roster-head-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  justify-content: flex-end;
}

/* Mobile: niente “isola” a destra — share + switch vista a tutta larghezza */
@media (max-width: 639.98px) {
  .manager .mgr-roster-head.flex-between,
  .manager .mgr-roster-head {
    flex-direction: column;
    align-items: stretch !important;
    gap: 10px !important;
  }

  .manager .mgr-roster-head-actions {
    width: 100%;
    flex-direction: column;
    flex-wrap: nowrap;
    align-items: stretch;
    justify-content: stretch;
    gap: 8px;
  }

  .manager .mgr-share-roster-btn {
    width: 100%;
    height: 36px;
    justify-content: center;
    box-sizing: border-box;
    padding: 0 14px 0 8px;
  }

  .manager .mgr-roster-view-bar {
    display: flex;
    width: 100%;
    height: 36px;
    box-sizing: border-box;
  }

  .manager .mgr-view-btn {
    flex: 1 1 0;
    min-width: 0;
    text-align: center;
    padding: 0 6px;
    font-size: 11.5px;
  }
}

.manager .mgr-share-roster-btn {
  appearance: none;
  -webkit-appearance: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  box-sizing: border-box;
  height: 34px;
  padding: 0 12px 0 5px;
  border: 0;
  border-radius: 10px;
  background:
    linear-gradient(135deg, #22d3ee 0%, #0ea5e9 48%, #22c55e 100%) !important;
  color: #041018 !important;
  font: inherit;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.01em;
  line-height: 1;
  cursor: pointer;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.28) inset,
    0 8px 22px rgba(14, 165, 233, 0.42),
    0 0 26px rgba(34, 197, 94, 0.28);
  transition: transform 0.12s ease, filter 0.12s ease, box-shadow 0.12s ease;
}
.manager .mgr-share-roster-btn__ico {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(4, 16, 24, 0.28);
  color: #fff;
  font-size: 11px;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.18) inset;
}
.manager .mgr-share-roster-btn:hover {
  transform: translateY(-1px);
  filter: brightness(1.08);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.38) inset,
    0 10px 26px rgba(14, 165, 233, 0.5),
    0 0 32px rgba(34, 197, 94, 0.38);
}
.manager .mgr-share-roster-btn:active {
  transform: translateY(1px);
  filter: brightness(0.96);
}

.manager .mgr-share-roster-btn--quiet {
  background: rgba(15, 23, 42, 0.85) !important;
  color: #e2e8f0 !important;
  border: 1px solid rgba(148, 163, 184, 0.28);
  box-shadow: none;
  font-weight: 700;
  height: 34px;
}

.manager .mgr-share-roster-btn--quiet .mgr-share-roster-btn__ico {
  background: rgba(56, 189, 248, 0.18);
  color: #7dd3fc;
  box-shadow: none;
}

.manager .mgr-share-roster-btn--quiet:hover {
  filter: none;
  border-color: rgba(125, 211, 252, 0.45);
  color: #f8fafc !important;
  box-shadow: 0 4px 14px rgba(14, 165, 233, 0.18);
}

body.mgr-share-modal--open {
  overflow: hidden;
}

.mgr-share-modal[hidden] {
  display: none !important;
}

.mgr-share-modal {
  position: fixed;
  inset: 0;
  z-index: 100060;
  display: grid;
  place-items: center;
  padding: 16px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}
.mgr-share-modal.is-open {
  opacity: 1;
  pointer-events: auto;
}
.mgr-share-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(2, 6, 18, 0.72);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
}
.mgr-share-modal__panel {
  position: relative;
  z-index: 1;
  width: min(520px, 100%);
  max-height: min(92vh, 720px);
  overflow: auto;
  padding: 18px 18px 16px;
  border-radius: 16px;
  border: 1px solid rgba(59, 130, 246, 0.28);
  background: linear-gradient(165deg, rgba(15, 23, 42, 0.98) 0%, rgba(12, 18, 32, 0.96) 100%);
  box-shadow:
    0 24px 60px rgba(0, 0, 0, 0.55),
    0 0 0 1px rgba(255, 255, 255, 0.04) inset;
  transform: translateY(10px) scale(0.98);
  transition: transform 0.22s ease;
}
.mgr-share-modal.is-open .mgr-share-modal__panel {
  transform: none;
}
.mgr-share-modal__x {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.06);
  color: #94a3b8;
  cursor: pointer;
}
.mgr-share-modal__x:hover {
  color: #fecaca;
  background: rgba(248, 113, 113, 0.15);
}
.mgr-share-modal__eyebrow {
  margin: 0 0 4px;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #38bdf8;
}
.mgr-share-modal__title {
  margin: 0 0 6px;
  font-size: 1.15rem;
}
.mgr-share-modal__lead {
  margin: 0 0 12px;
  color: #94a3b8;
  font-size: 0.86rem;
  line-height: 1.4;
}
.mgr-share-opts {
  margin: 0 0 12px;
  padding: 0;
  border: 0;
  display: grid;
  gap: 6px;
}
.mgr-share-opt {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.03);
  cursor: pointer;
}
.mgr-share-opt:has(input:checked) {
  border-color: rgba(56, 189, 248, 0.5);
  background: rgba(14, 165, 233, 0.12);
}
.mgr-share-opt input {
  margin: 0;
}
.mgr-share-opt__txt {
  flex: 1 1 auto;
  font-size: 0.9rem;
  font-weight: 650;
}
.mgr-share-opt__n {
  font-variant-numeric: tabular-nums;
  font-size: 0.78rem;
  color: #94a3b8;
}
.mgr-share-preview-lbl {
  display: block;
  margin: 0 0 6px;
  font-size: 0.78rem;
  color: #9bb0c3;
  font-weight: 700;
}
.mgr-share-preview {
  width: 100%;
  min-height: 180px;
  resize: vertical;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(2, 8, 20, 0.7);
  color: #e2e8f0;
  font-size: 0.82rem;
  line-height: 1.45;
  text-transform: none;
  font-family: "Segoe UI Emoji", "Apple Color Emoji", "Noto Color Emoji", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
.mgr-share-modal__meta {
  margin: 8px 0 10px;
  color: #94a3b8;
  font-size: 0.8rem;
}
.mgr-share-modal__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.mgr-share-modal__actions .btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}
.mgr-share-wa {
  background: rgba(34, 197, 94, 0.18) !important;
  border-color: rgba(34, 197, 94, 0.45) !important;
  color: #bbf7d0 !important;
}
.mgr-share-roster-btn.is-copied,
#mgr-share-roster-copy.is-copied {
  border-color: rgba(74, 222, 128, 0.5);
}

