:root {
  --mu-red: #da020e;
  --mu-red-dark: #b00009;
  --mu-green: #129447;
  --text: #151922;
  --muted: #6f7683;
  --line: #e7eaf0;
  --bg: #f5f6f8;
  --card: #ffffff;
  --soft-red: #fff1f2;
  --soft-green: #eefbf3;
  --shadow: 0 18px 50px rgba(21, 25, 34, .08);
  --radius: 18px;
}

.transfers-page {
  width: 100%;
  margin: 20px auto 0 auto;
  padding: 0 0 42px;
}

.transfers-hero {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 22px;
}

.transfers-hero::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: -16px;
  width: 410px;
  height: 92px;
  opacity: .08;
  background:
    linear-gradient(135deg, transparent 0 18px, #111 18px 20px, transparent 20px 42px) 0 0 / 42px 42px,
    linear-gradient(45deg, transparent 0 18px, #111 18px 20px, transparent 20px 42px) 0 0 / 42px 42px;
  pointer-events: none;
  mask-image: linear-gradient(90deg, transparent, #000 28%, #000);
}

.brand-row {
  display: flex;
  align-items: center;
  gap: 16px;
  min-width: 0;
}

.club-logo {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  background: linear-gradient(135deg, #ffe37a, #e30613);
  display: grid;
  place-items: center;
  color: #fff;
  font-weight: 900;
  letter-spacing: -.04em;
  box-shadow: 0 12px 26px rgba(218, 2, 14, .22);
  border: 4px solid #fff;
  flex: 0 0 auto;
}

.page-title {
  margin: 0;
  font-size: clamp(30px, 4vw, 48px);
  line-height: 1;
  letter-spacing: -.04em;
  text-transform: uppercase;
}

.page-subtitle {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 16px;
}

.season-select {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #fff;
  border: 1px solid var(--line);
  padding: 13px 16px;
  font-weight: 800;
  box-shadow: 0 10px 26px rgba(21, 25, 34, .07);
  white-space: nowrap;
}

.window-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: var(--card);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  overflow: hidden;
  margin-bottom: 16px;
}

.window-tab,
.current-window {
  min-height: 78px;
  padding: 20px 20px;
  display: flex;
  align-items: center;
  gap: 14px;
  border-right: 1px solid var(--line);
}

.window-tab:last-child,
.current-window:last-child { border-right: 0; }

.window-tab {
  cursor: pointer;
  background: #fff;
  position: relative;
}

.window-tab.active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 4px;
  background: var(--mu-red);
}

.tab-icon,
.section-icon {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  font-size: 24px;
  flex: 0 0 auto;
}

.window-tab.active .tab-icon { color: var(--mu-red); background: var(--soft-red); }
.window-tab:not(.active) .tab-icon { color: #77808e; background: #f3f4f6; }


.icon {
  width: 1em;
  height: 1em;
  display: block;
  fill: none;
  stroke: currentColor;
}

.tab-icon .icon,
.section-icon .icon,
.closed-icon .icon {
  width: 22px;
  height: 22px;
}

.closed-icon .icon {
  width: 34px;
  height: 34px;
}

.status-icon {
  width: 20px;
  height: 20px;
  display: inline-grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid currentColor;
  opacity: .95;
  flex: 0 0 auto;
}

.status-icon .icon {
  width: 13px;
  height: 13px;
}

.status-loan .status-icon { color: var(--mu-green); border-color: rgba(18, 148, 71, .35); }
.status-free .status-icon { color: #4b5563; border-color: rgba(75, 85, 99, .35); }
.status-transfer .status-icon { color: var(--mu-red); border-color: rgba(218, 2, 14, .35); }

.flag-code {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 26px;
  height: 17px;
  margin-right: 7px;
  padding: 0 4px;
  border-radius: 4px;
  background: #eef1f5;
  color: #5f6876;
  font-size: 10px;
  font-weight: 900;
  line-height: 1;
  vertical-align: 1px;
}

.note-text {
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.note-text .icon {
  width: 18px;
  height: 18px;
  margin-top: 1px;
  color: var(--mu-red);
  flex: 0 0 auto;
}

.tab-title {
  font-size: 16px;
  line-height: 20px;
  font-weight: 900;
  text-transform: uppercase;
}

.window-tab.active .tab-title { color: var(--mu-red); }

.tab-date,
.current-window span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 14px;
}

.current-window {
  background: linear-gradient(135deg, #fff, #fff6f6);
  border-right: 0;
}

.current-window strong {
  display: block;
  font-size: 15px;
}

.transfer-section {
  background: var(--card);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  overflow: hidden;
  margin-top: 16px;
}

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 22px 12px;
}

.section-title {
  display: flex;
  align-items: center;
  gap: 11px;
  margin: 0;
  font-size: 24px;
  text-transform: uppercase;
  letter-spacing: -.02em;
}

.arrivals .section-icon { color: var(--mu-green); background: var(--soft-green); }
.departures .section-icon { color: var(--mu-red); background: var(--soft-red); }

.section-summary {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.summary-pill {
  padding: 4px 11px;
  background: #f6f7f9;
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.transfer-table {
  padding: 0 0 4px;
}

.table-head,
.transfer-row {
  display: grid;
  /*grid-template-columns: minmax(260px, 1.25fr) minmax(260px, 1.25fr) minmax(185px, .7fr) 42px;*/
  /*column-gap: 24px;*/
  grid-template-columns: minmax(220px, 1.15fr) minmax(220px, 1fr) minmax(170px, .75fr) 34px;
  column-gap: 16px;
  align-items: center;
}

.table-head {
  /*margin: 0 12px;*/
  min-height: 36px;
  padding: 0 10px;
  color: #656d7b;
  background: #f7f8fa;
  border: 1px solid var(--line);
  /*border-radius: 12px 12px 0 0;*/
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .04em;
  /*font-weight: 800;*/
}

.transfer-row {
  position: relative;
  margin: 0 0 0 12px;
  min-height: 82px;
  padding: 12px 10px;
  border-bottom: 1px solid var(--line);
  transition: background .2s ease, transform .2s ease;
}

.transfer-row:hover {
  background: #fbfbfc;
  transform: translateX(3px);
}

.transfer-row::before {
  content: "";
  position: absolute;
  left: -12px;
  top: 0;
  bottom: 0;
  width: 4px;
  opacity: .9;
}

.arrivals .transfer-row::before { background: var(--mu-green); }
.departures .transfer-row::before { background: var(--mu-red); }

.player,
.club-cell {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.avatar,
.club-badge {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  overflow: hidden;
}

.avatar {
  background: linear-gradient(135deg, #e9edf3, #cdd4de);
  color: #6a7280;
  border: 2px solid #fff;
  box-shadow: 0 7px 15px rgba(21, 25, 34, .09);
  font-size: 18px;
}

.avatar img{
  width:100%;
  height:100%;
  display:block;
  object-fit:cover;
}

.club-badge {
  width:48px;
  height:48px;
  display:flex;
  justify-content:center;
  align-items:center;
  background:#fff;
  /*border:1px solid #e8ebf0;*/
  border-radius:0%;
  overflow:hidden;
  flex-shrink:0;
}

.club-badge img{
  width:48px;
  height:48px;
  object-fit:contain;
  display:block;
}

.badge-red { background: linear-gradient(135deg, #da020e, #ff6b6b); }
.badge-blue { background: linear-gradient(135deg, #1456d9, #67e8f9); }
.badge-purple { background: linear-gradient(135deg, #6d28d9, #c084fc); }
.badge-black { background: linear-gradient(135deg, #111827, #6b7280); }
.badge-green { background: linear-gradient(135deg, #15803d, #86efac); }

.main-text {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 15px;
  font-weight: bold;
}

.sub-text {
  display: block;
  /*margin-top: 3px;*/
  color: var(--muted);
  font-size: 12px;
}

.age-green { color: var(--mu-green); font-weight: 800; }
.age-red { color: var(--mu-red); font-weight: 800; }

.fee {
  font-size: 16px;
  font-weight: bold;
}

.fee-note {
  display: block;
  /*margin-top: 3px;*/
  color: var(--muted);
  font-size: 12px;
}

.status-loan,
.status-free,
.status-transfer {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}


.row-more {
  justify-self: end;
  width: 34px;
  height: 34px;
  border: 0;
  background: transparent;
  color: var(--mu-red);
  font-size: 25px;
  cursor: pointer;
  transition: transform .2s ease;
}

.transfer-row:hover .row-more { transform: translateX(4px); }

.window-closed {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 18px;
  align-items: center;
  margin-top: 16px;
  padding: 28px;
  background: linear-gradient(135deg, #fff, #f8fafc);
  border: 1px dashed #ccd3df;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.window-closed[hidden],
.transfers-content[hidden] {
  display: none;
}

.closed-icon {
  width: 72px;
  height: 72px;
  display: grid;
  place-items: center;
  border-radius: 22px;
  background: #f3f6fb;
  color: #77808e;
  font-size: 36px;
}

.window-closed h2 {
  margin: 0 0 8px;
  font-size: 25px;
  letter-spacing: -.02em;
}

.window-closed p {
  margin: 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.55;
}

.note-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-top: 14px;
  padding: 14px 18px;
  border: 1px solid #ffd9dc;
  border-radius: 16px;
  background: linear-gradient(90deg, #fff7f7, #fff);
  color: var(--muted);
  font-size: 14px;
}

.legend {
  display: flex;
  gap: 15px;
  flex-wrap: wrap;
}

.legend-item {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  white-space: nowrap;
}

.legend-dot {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  font-size: 13px;
  color: var(--mu-red);
  background: #fff;
}



.row-more .icon {
  width: 22px;
  height: 22px;
  margin: 0 auto;
}

.legend-dot .icon {
  width: 13px;
  height: 13px;
}

@media (max-width: 1100px) {
  .transfers-page {
    width: min(100% - 24px, 1180px);
  }

  .table-head,
  .transfer-row {
    grid-template-columns: minmax(220px, 1.15fr) minmax(220px, 1fr) minmax(170px, .75fr) 34px;
    column-gap: 16px;
  }

  .main-text {
    font-size: 17px;
  }
}

@media (max-width: 920px) {

  .transfers-hero::after {
    width: 280px;
    height: 70px;
    opacity: .05;
  }

  .window-tabs {
    grid-template-columns: 1fr 1fr;
  }

  .current-window {
    grid-column: 1 / -1;
    border-top: 1px solid var(--line);
  }

  .table-head {
    display: none;
  }

  .transfer-table {
    padding: 0 12px 12px;
  }

  .transfer-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px 18px;
    min-height: 0;
    margin: 0 0 12px;
    padding: 16px;
    border: 1px solid var(--line);
    background: #fff;
    box-shadow: 0 10px 24px rgba(21, 25, 34, .05);
  }

  .transfer-row:last-child {
    margin-bottom: 0;
  }

  .transfer-row:hover {
    transform: none;
  }

  .transfer-row::before {
    left: 0;
    top: 0;
    bottom: auto;
    width: 100%;
    height: 4px;
  }

  .player {
    grid-column: 1 / -1;
    padding-right: 42px;
  }

  .club-cell,
  .fee-cell {
    display: block;
    min-width: 0;
  }

  .club-cell {
    display: flex;
  }

  .club-cell::before,
  .fee-cell::before {
    display: block;
    margin-bottom: 7px;
    color: #8a919d;
    font-size: 11px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: .06em;
  }

  .arrivals .club-cell:before { content: "Из клуба"; }
  .departures .club-cell:before { content: "В клуб"; }
  .fee-cell:before { content: "Сумма"; }

  .row-more {
    position: absolute;
    top: 16px;
    right: 14px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #fff5f5;
  }
}

@media (max-width: 680px) {
  :root {
    --radius: 16px;
  }

  .transfers-page {
    width: min(100% - 20px, 1180px);
    padding: 14px 0 28px;
  }

  .transfers-hero {
    align-items: stretch;
    flex-direction: column;
    gap: 14px;
    margin-bottom: 16px;
  }

  .transfers-hero::after {
    display: none;
  }

  .brand-row {
    gap: 12px;
  }

  .club-logo {
    width: 54px;
    height: 54px;
    border-width: 3px;
    font-size: 15px;
  }

  .page-title {
    font-size: clamp(27px, 9vw, 38px);
    line-height: .96;
  }

  .page-subtitle {
    font-size: 14px;
    line-height: 1.35;
  }

  .season-select {
    width: 100%;
    justify-content: center;
    padding: 12px 14px;
  }

  .window-tabs {
    grid-template-columns: 1fr;
    margin-bottom: 12px;
  }

  .window-tab,
  .current-window {
    min-height: auto;
    padding: 15px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .current-window {
    border-bottom: 0;
  }

  .tab-icon,
  .section-icon {
    width: 32px;
    height: 32px;
    font-size: 21px;
  }

  .tab-title {
    font-size: 14px;
    line-height: 1.25;
  }

  .tab-date,
  .current-window span {
    font-size: 13px;
  }

  .transfer-section {
    margin-top: 12px;
  }

  .section-head {
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
    padding: 12px 14px 10px;
  }

  .section-title {
    font-size: 20px;
  }

  .section-summary {
    width: 100%;
    justify-content: flex-start;
    gap: 8px;
  }

  .summary-pill {
    padding: 4px 10px;
    font-size: 12px;
  }

  .transfer-table {
    padding: 0 10px 10px;
  }

  .transfer-row {
    grid-template-columns: 1fr;
    gap: 14px;
    padding: 15px 14px;
  }

  .player {
    padding-right: 36px;
  }

  .avatar,
  .club-badge {
    width: 46px;
    height: 46px;
  }

  .club-badge {
    border-radius: 14px;
    font-size: 11px;
  }

  .main-text {
    white-space: normal;
    font-size: 16px;
    line-height: 1.22;
  }

  .sub-text,
  .fee-note {
    font-size: 13px;
    line-height: 1.28;
  }

  .fee {
    font-size: 17px;
    line-height: 1.25;
  }

  .club-cell,
  .fee-cell {
    padding: 12px;
    border-radius: 14px;
    background: #f8f9fb;
  }

  .club-cell:before {
    grid-column: 1 / -1;
  }
  .club-cell {
    align-items: center;
    display: grid;
    gap: 10px;
    grid-template-columns: 50px 1fr;
  }

  .row-more {
    top: 14px;
    right: 12px;
  }

  .window-closed {
    grid-template-columns: 1fr;
    gap: 14px;
    padding: 20px 16px;
  }

  .closed-icon {
    width: 56px;
    height: 56px;
    border-radius: 18px;
    font-size: 28px;
  }

  .window-closed h2 {
    font-size: 20px;
  }

  .window-closed p {
    font-size: 14px;
  }

  .note-bar {
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
    padding: 14px;
    font-size: 13px;
  }

  .legend {
    gap: 8px;
  }

  .legend-item {
    font-size: 12px;
  }
}

@media (max-width: 420px) {
  .transfers-page {
    width: min(100% - 14px, 1180px);
  }

  .brand-row {
    align-items: flex-start;
  }

  .club-logo {
    width: 48px;
    height: 48px;
    font-size: 13px;
  }

  .page-title {
    font-size: 25px;
    letter-spacing: -.035em;
  }

  .page-subtitle {
    font-size: 13px;
  }

  .window-tab,
  .current-window {
    padding: 13px;
    gap: 10px;
  }

  .section-title {
    font-size: 18px;
  }

  .player,
  .club-cell {
    gap: 10px;
  }

  .avatar,
  .club-badge {
    width: 42px;
    height: 42px;
  }

  .transfer-row {
    padding: 14px 12px;
  }

  .club-cell,
  .fee-cell {
    padding: 10px;
  }

  .status-loan::after,
  .status-free::after,
  .status-transfer::after {
    display: none;
  }
}

.flag{
    /*width:18px;*/
    /*height:13px;*/
    display:inline-block;
    margin-right:6px;
    vertical-align:-2px;
    object-fit:cover;
    border:1px solid rgba(0,0,0,.08);
    border-radius:2px;
    box-shadow:0 1px 2px rgba(0,0,0,.08);
    flex-shrink:0;
}
.sub-text .fi:before {
  font-size: unset !important;
}