/* Selected manager scene: office, 40% shade, 80% large-card fill. */
:root { --fm-manager-background-image: url('assets/identity/manager-office-v1.png'); }
body:not(.start-page) {
  --fm-manager-shade: .40;
  --fm-manager-card-opacity: .80;
  isolation: isolate;
  background: #10231d;
}
body:not(.start-page)::before {
  content: "";
  position: fixed;
  inset: -4px;
  z-index: -2;
  pointer-events: none;
  background: var(--fm-manager-background-image) center / cover no-repeat;
  filter: blur(1.5px);
}
body:not(.start-page)::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: rgb(7 22 17 / var(--fm-manager-shade));
}
body:not(.start-page) .manager-content :is(.dashboard-card, .player-pool-card, .side-card, .tactic-block, .table-card, .training-card, .stadium-summary-card, .stadium-block-slide, .sponsor-main-card) {
  background: rgb(23 46 36 / var(--fm-manager-card-opacity));
}
/* Match rows need a stronger shield than the decorative overview cards. */
body:not(.start-page) .manager-content #finance-overview-summary {
  background: transparent;
  border: 0;
  border-radius: 0;
}
body:not(.start-page) .manager-content #finance-overview-summary > .finance-workspace {
  background: rgb(23 46 36 / .80);
}
body:not(.start-page) .manager-content .finance-workspace .finance-selected-view { background: transparent; }
body:not(.start-page) #stadium-ticket-prices .stadium-price-control {
  background: rgb(23 46 36 / .80);
}
body:not(.start-page) .manager-content .transfer-market-filter-tools {
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}
body:not(.start-page) .manager-content .transfer-market-range-filter {
  background: rgb(23 46 36 / .80);
}
body:not(.start-page) .manager-content .fixture-card {
  background: rgb(16 35 28 / .94);
}
body:not(.start-page) .manager-content .fixture-card.own-fixture {
  background: rgb(34 54 34 / .96);
}
body:not(.start-page) #league-player-stat-period .league-stat-period-button {
  background: #10231c;
}
body:not(.start-page) #league-player-stat-period .league-stat-period-button[aria-pressed="true"] {
  background: #30411f;
}
body:not(.start-page) #league-player-stat-metrics .league-stat-metric-button {
  background: #10231c;
}
body:not(.start-page) #league-player-stat-metrics .league-stat-metric-button[aria-pressed="true"] {
  background: #1e352b;
}
body:not(.start-page) #league-player-stat-table .player-statistics-entry {
  background: rgb(16 35 28 / .94);
}
body:not(.start-page) #league-player-stat-table .player-statistics-entry.is-own-player {
  background: rgb(34 54 34 / .96);
}
body:not(.start-page) #league-player-stat-table .player-statistics-entry.is-top-1 {
  background: linear-gradient(90deg, rgb(67 53 28 / .97), rgb(16 35 28 / .94));
}
body:not(.start-page) #league-player-stat-table .player-statistics-entry.is-top-2 {
  background: linear-gradient(90deg, rgb(46 57 52 / .97), rgb(16 35 28 / .94));
}
body:not(.start-page) #league-player-stat-table .player-statistics-entry.is-top-3 {
  background: linear-gradient(90deg, rgb(58 44 32 / .97), rgb(16 35 28 / .94));
}
body:not(.start-page) #league-player-stat-table .player-statistics-entry:hover {
  background: rgb(36 58 40 / .98);
}
/* Data surfaces shield small type; overview cards above retain 80%. */
body:not(.start-page) .manager-content :is(.table-card, .contracts-overview-card, .squad-card) {
  background: rgb(16 35 28 / .94);
}
/* Separate compact training header from its data table. */
body:not(.start-page) .manager-content :is(.squad-card, .contracts-overview-card) {
  border-radius: 12px;
  overflow: hidden;
}
body:not(.start-page) .manager-content :is(.squad-table-wrap, .contracts-overview-table-wrap) {
  border-radius: 12px;
  isolation: isolate;
}
body:not(.start-page) .manager-content .training-card {
  background: transparent;
}
body:not(.start-page) .manager-content table tbody tr {
  background-color: rgb(16 35 28 / .94);
}
body:not(.start-page) .manager-content table tbody tr:nth-child(even) {
  background-color: rgb(23 42 33 / .96);
}
body:not(.start-page) .manager-content table tbody tr:hover {
  background-color: rgb(36 58 40 / .98);
}
@media (max-width: 760px) {
  body:not(.start-page)::before { background-position: 25% center; }
}

/* Only the decorative picture is translucent; profile data stays opaque. */
:is(#team-dashboard, #start-team-profile) > .team-dashboard-dialog {
  position: relative;
  isolation: isolate;
}
:is(#team-dashboard, #start-team-profile) .team-dashboard-content { position: relative; isolation: isolate; }
:is(#team-dashboard, #start-team-profile) .team-dashboard-panel { position: relative; z-index: 1; }
:is(#team-dashboard, #start-team-profile) .team-dashboard-content::before {
  content: "";
  grid-area: 3 / 1;
  min-width: 0;
  min-height: 0;
  z-index: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, rgba(17, 28, 25, .85), transparent 72%), url("assets/backgrounds/club-cup-corridor-desktop-20261017.webp") right bottom / auto 100% no-repeat;
  background-size: 100% 100%, auto 180%;
  background-position: center, right 55%;
  opacity: .15;
  pointer-events: none;
}
:is(#team-dashboard, #start-team-profile) .team-dashboard-watermark { opacity: .05; }

/* Player dossier: quiet evening atmosphere, with no large crest watermark. */
#player-profile > .player-profile-dialog::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  border-radius: inherit;
  background: url("assets/backgrounds/player-evening-pitch-20261016.webp") left bottom / cover no-repeat;
  opacity: .13;
  mask-image: linear-gradient(90deg, #000 0%, #000 32%, #000a 65%, #0007 100%);
  pointer-events: none;
}
@media (max-width: 760px) {
  #player-profile > .player-profile-dialog::before {
    opacity: .085;
    background-position: 22% bottom;
    mask-image: linear-gradient(#000, #0008 58%, #0004);
  }
}
@media (max-width: 760px) {
  :is(#team-dashboard, #start-team-profile) .team-dashboard-content::before {
    opacity: .10;
    background-image: linear-gradient(90deg, rgba(17, 28, 25, .85), transparent 72%), url("assets/backgrounds/club-cup-corridor-mobile-20261017.webp");
    background-position: center, 65% 55%;
    background-size: 100% 100%, auto 180%;
  }
}
