/* ============================================================
   TEAM PAGE — team.css
   ============================================================ */

/* ── Hero ───────────────────────────────────────────────────── */
.tm-hero {
    display: flex;
    align-items: center;
    gap: 24px;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 24px 28px;
    margin-bottom: 16px;
}
.tm-hero__crest { flex-shrink: 0; }
.tm-hero__crest img {
    width: 90px;
    height: 90px;
    object-fit: contain;
}
.tm-hero__info { flex: 1; min-width: 0; }
.tm-hero__name {
    font-size: 26px;
    font-weight: 800;
    color: #1a1a1a;
    margin-bottom: 10px;
    line-height: 1.2;
}
.tm-hero__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 12px;
}

/* Form badges */
.tm-form { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 4px; }
.tm-form-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    font-size: 11px;
    font-weight: 800;
    color: #fff;
}
.tm-form--w { background: #27ae60; }
.tm-form--d { background: #9ca3af; }
.tm-form--l { background: #ef4444; }

/* Tooltip on form badges */
.tm-form-badge { position: relative; }
.tm-form-badge[data-tip]::after {
    content: attr(data-tip);
    position: absolute;
    bottom: calc(100% + 6px);
    left: 50%;
    transform: translateX(-50%);
    background: #1a1a1a;
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    white-space: nowrap;
    padding: 4px 8px;
    border-radius: 5px;
    pointer-events: none;
    opacity: 0;
    transition: opacity .15s;
}
.tm-form-badge[data-tip]:hover::after { opacity: 1; }

/* ── Cards ──────────────────────────────────────────────────── */
.tm-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 16px;
}
.tm-card__title {
    font-size: 15px;
    font-weight: 700;
    color: #1a1a1a;
    padding: 16px 20px 12px;
    border-bottom: 1px solid #f3f4f6;
}

/* ── Team description ──────────────────────────────────────── */
.tm-description {
    padding: 14px 20px 16px;
    font-size: 13px;
    color: #374151;
    line-height: 1.6;
}

/* ── Overview info grid ─────────────────────────────────────── */
.tm-info-grid { padding: 4px 0; }
.tm-info-row {
    display: flex;
    align-items: baseline;
    gap: 12px;
    padding: 10px 20px;
    border-bottom: 1px solid #f9fafb;
    font-size: 13px;
}
.tm-info-row:last-child { border-bottom: none; }
.tm-info-row__label {
    min-width: 100px;
    font-weight: 600;
    color: #9ca3af;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: .4px;
    flex-shrink: 0;
}
.tm-info-row__val { color: #1a1a1a; font-weight: 500; }

/* ── Match rows (team page) ─────────────────────────────────── */
.tm-match-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-bottom: 1px solid #f3f4f6;
    text-decoration: none;
    color: inherit;
    transition: background .1s;
}
.tm-match-row:last-child { border-bottom: none; }
.tm-match-row:hover { background: #f9fafb; }

/* Left: date + competition — fixed width so teams grid always starts at same X */
.tm-match-row__meta {
    width: 100px;
    flex-shrink: 0;
    flex-grow: 0;
    overflow: hidden;
}
.tm-match-row__date {
    font-size: 12px;
    font-weight: 600;
    color: #374151;
    line-height: 1.3;
}
.tm-match-row__comp {
    font-size: 10px;
    color: #9ca3af;
    margin-top: 2px;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Center: home ← crest | score | crest → away  (CSS grid keeps columns fixed) */
.tm-match-row__teams {
    flex: 1;
    display: grid;
    grid-template-columns: 1fr 22px minmax(58px, auto) 22px 1fr;
    align-items: center;
    gap: 6px;
    min-width: 0;
}
.tm-match-row__crest {
    width: 22px;
    height: 22px;
    object-fit: contain;
    display: block;
    justify-self: center;
}
.tm-match-row__name {
    font-size: 13px;
    font-weight: 600;
    color: #1a1a1a;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
}
.tm-match-row__name--home { text-align: right; }
.tm-match-row__name--away { text-align: left; }

/* Score box */
.tm-match-row__score {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 3px;
    min-width: 58px;
    padding: 5px 10px;
    background: #f3f4f6;
    border-radius: 8px;
    font-size: 17px;
    font-weight: 800;
    color: #111827;
    flex-shrink: 0;
    letter-spacing: .5px;
}
.tm-match-row__score--upcoming {
    font-size: 13px;
    font-weight: 500;
    color: #9ca3af;
}
.tm-match-row__sep { color: #d1d5db; font-weight: 400; font-size: 14px; }

/* Right: W/D/L badge */
.tm-match-row__badge {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: 800;
    color: #fff;
    flex-shrink: 0;
}
.tm-match-row__badge--w { background: #27ae60; }
.tm-match-row__badge--d { background: #9ca3af; }
.tm-match-row__badge--l { background: #ef4444; }

.tm-match-list { display: flex; flex-direction: column; }

/* ── Squad ──────────────────────────────────────────────────── */
.tm-squad-group { margin-bottom: 20px; }
.tm-squad-group__title {
    font-size: 12px;
    font-weight: 700;
    color: #9ca3af;
    text-transform: uppercase;
    letter-spacing: .6px;
    padding: 0 4px 8px;
    border-bottom: 1px solid #e5e7eb;
    margin-bottom: 8px;
}
.tm-squad-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 6px;
}
.tm-squad-player {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 10px 14px;
    transition: background .1s, border-color .1s;
    text-decoration: none;
    color: inherit;
    cursor: pointer;
    overflow: hidden;
}
.tm-squad-player:hover { background: #f9fafb; border-color: #e8192c; }
.tm-squad-player__num {
    width: 24px;
    text-align: center;
    font-size: 13px;
    font-weight: 700;
    color: #9ca3af;
    flex-shrink: 0;
}
.tm-squad-player__info { min-width: 0; }
.tm-squad-player__name {
    font-size: 13px;
    font-weight: 600;
    color: #1a1a1a;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.tm-squad-player__meta { font-size: 11px; color: #9ca3af; margin-top: 1px; }

/* ── Overview layout ────────────────────────────────────────── */
/* ── Next Match ─────────────────────────────────────────────── */
.tm-next-match {
    background: linear-gradient(135deg, #1a1d2e 0%, #111827 100%);
    border: 1px solid #374151;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 16px;
    display: flex;
    flex-direction: column;
}
.tm-next-match__form {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 10px 16px;
}
.tm-next-match__form-label {
    font-size: 11px;
    font-weight: 600;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: .06em;
    white-space: nowrap;
}
.tm-next-match__foot { margin-top: 0; }
.tm-next-match__label {
    font-size: 11px;
    font-weight: 700;
    color: #e8192c;
    text-transform: uppercase;
    letter-spacing: .08em;
    padding: 10px 16px 4px;
}
.tm-next-match__body {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 16px 12px;
    flex: 1;
}
.tm-nm-team {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    flex: 1;
    text-align: center;
}
.tm-nm-team img {
    width: 44px;
    height: 44px;
    object-fit: contain;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,.4));
}
.tm-nm-team span {
    font-size: 12px;
    font-weight: 600;
    color: #f3f4f6;
    line-height: 1.3;
}
.tm-nm-team--right { }
.tm-nm-ha {
    font-size: 10px !important;
    font-weight: 700 !important;
    color: #4b5563 !important;
    text-transform: uppercase;
    letter-spacing: .04em;
}
.tm-nm-center {
    text-align: center;
    flex-shrink: 0;
    min-width: 90px;
}
.tm-nm-date {
    font-size: 12px;
    font-weight: 600;
    color: #9ca3af;
    margin-bottom: 2px;
}
.tm-nm-time {
    font-size: 22px;
    font-weight: 800;
    color: #f9fafb;
    line-height: 1.1;
}
.tm-nm-comp {
    font-size: 10px;
    color: #4b5563;
    margin-top: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 90px;
}
.tm-next-match__foot {
    display: flex;
    gap: 8px;
    padding: 0 16px 12px;
}
.tm-nm-btn {
    flex: 1;
    text-align: center;
    font-size: 12px;
    font-weight: 700;
    padding: 8px;
    border-radius: 7px;
    text-decoration: none;
    background: #e8192c;
    color: #fff;
    transition: background .15s;
}
.tm-nm-btn:hover { background: #c0111f; }
.tm-nm-btn--ghost {
    background: transparent;
    border: 1px solid #374151;
    color: #9ca3af;
}
.tm-nm-btn--ghost:hover { border-color: #6b7280; color: #f9fafb; background: transparent; }

/* ── Overview layout ─────────────────────────────────────────── */
.tm-overview { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: stretch; }
.tm-overview .tm-card,
.tm-overview .tm-next-match { height: 100%; box-sizing: border-box; }
.tm-overview .tm-card--full { grid-column: 1 / -1; }

/* Club Info + Prediction Widget row */
.tm-overview-row {
    grid-column: 1 / -1;
    display: flex;
    gap: 16px;
    align-items: stretch;
}
.tm-overview-row .tm-card { margin-bottom: 0; }
.tm-pred-widget { flex: 1; min-width: 0; display: flex; flex-direction: column; }
#tmBestPick { flex: 1; display: flex; flex-direction: column; }
.tm-pred-widget .pd-best-bet { flex: 1; display: flex; flex-direction: column; margin-bottom: 0; }
.tm-pred-widget .pd-bb-inner { flex: 1; display: flex; flex-direction: column; }
.tm-pred-widget .pd-bb-btn { margin-top: auto; }
.tm-pred-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    background: #e8192c;
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    padding: 9px 16px;
    border-radius: 8px;
    text-decoration: none;
    transition: opacity .15s;
}
.tm-pred-btn:hover { opacity: .85; }

@media (max-width: 900px) {
    .tm-overview-row { flex-direction: column; }
    .tm-pred-widget { width: 100%; }
}
@media (max-width: 768px) {
    .tm-overview { grid-template-columns: 1fr; }
    .tm-hero { padding: 16px; gap: 16px; }
    .tm-hero__crest img { width: 60px; height: 60px; }
    .tm-hero__name { font-size: 20px; }
    .tm-squad-list { grid-template-columns: 1fr; }
}


/* ── Player avatar ──────────────────────────────────────────── */
.tm-squad-player .trn-scorer-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    color: #fff;
    flex-shrink: 0;
    background: #94a3b8;
}
.tm-squad-player .trn-scorer-avatar--photo { object-fit: cover; background: #1a1d2e; }
.tm-squad-player .trn-scorer-avatar.av--gk  { background: #d97706; }
.tm-squad-player .trn-scorer-avatar.av--def { background: #2563eb; }
.tm-squad-player .trn-scorer-avatar.av--mid { background: #16a34a; }
.tm-squad-player .trn-scorer-avatar.av--fwd { background: #e8192c; }
@media (max-width: 420px) {
    .tm-hero { padding: 14px; gap: 12px; }
    .tm-hero__crest img { width: 48px; height: 48px; }
    .tm-hero__name { font-size: 17px; }
    .tm-tabs { gap: 0; }
    .tm-tab { font-size: 12px; padding: 8px 10px; }
    .tm-stat-card { padding: 12px; }
    .tm-stat-card__val { font-size: 22px; }
}

/* ── Tabs — scroll horizontally on mobile ────────────────── */
.tm-tabs {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    white-space: nowrap;
    display: flex;
    flex-wrap: nowrap;
}
.tm-tabs::-webkit-scrollbar { display: none; }
.tm-tabs .trn-tab { flex-shrink: 0; }
/* Sticky nav: JS wraps tabs in full-width bar, centering content via container */
.trn-tabs-stuck-wrapper {
    position: fixed;
    left: 0;
    width: 100%;
    background: #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,.1);
    z-index: 200;
}
.trn-tabs-stuck-wrapper .trn-tabs,
.trn-tabs-stuck-wrapper .tm-tabs {
    max-width: var(--container, 1240px);
    margin: 0 auto !important;
    margin-bottom: 0 !important;
    padding: 0 20px;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
}
.trn-tabs-stuck-wrapper .trn-tabs::-webkit-scrollbar,
.trn-tabs-stuck-wrapper .tm-tabs::-webkit-scrollbar { display: none; }

/* ── Empty state ─────────────────────────────────────────── */
.tm-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 48px 24px;
    color: #9ca3af;
    font-size: 14px;
    text-align: center;
}

/* ── Squad wrap ──────────────────────────────────────────── */
.tm-squad-wrap { padding-bottom: 8px; }
.tm-squad-group__count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #f3f4f6;
    color: #6b7280;
    font-size: 11px;
    font-weight: 600;
    border-radius: 10px;
    padding: 1px 7px;
    margin-left: 6px;
}

/* ── Player Stats table ──────────────────────────────────── */
.tm-pstats-wrap { overflow-x: auto; }
.tm-pstats-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}
.tm-pst-th {
    padding: 10px 12px;
    text-align: center;
    font-size: 11px;
    font-weight: 700;
    color: #9ca3af;
    text-transform: uppercase;
    letter-spacing: .04em;
    border-bottom: 2px solid #f3f4f6;
    cursor: pointer;
    user-select: none;
    white-space: nowrap;
    transition: color .1s;
}
.tm-pst-th:hover { color: #374151; }
tr.tm-pst-row--link:hover td { background: #fafafa; }
tr.tm-pst-row--link:hover .tm-pst-name { color: #e8192c; }
.tm-pst-th.sorted-asc::after  { content: ' ↑'; color: #e8192c; }
.tm-pst-th.sorted-desc::after { content: ' ↓'; color: #e8192c; }
.tm-pst-th--player { text-align: left; min-width: 160px; }
.tm-pst-td {
    padding: 10px 12px;
    text-align: center;
    border-bottom: 1px solid #f9fafb;
    color: #374151;
    font-weight: 500;
}
.tm-pst-td--player {
    text-align: left;
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 160px;
}
.tm-pst-name-wrap { min-width: 0; }
.tm-pst-name {
    display: block;
    font-weight: 600;
    color: #1a1a1a;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 140px;
}
.tm-pst-pos {
    font-size: 10px;
    font-weight: 600;
    color: #9ca3af;
    display: block;
    margin-top: 1px;
}
.tm-pst-td--goals { font-weight: 700; color: #111827; }
.tm-pst-td--rating { font-weight: 700; color: #374151; }
.tm-card-y {
    display: inline-block;
    background: #fbbf24;
    color: #78350f;
    font-size: 11px;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 4px;
    min-width: 20px;
    text-align: center;
}
.tm-card-r {
    display: inline-block;
    background: #ef4444;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 4px;
    min-width: 20px;
    text-align: center;
}
.tm-pstats-table .trn-scorer-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 700;
    color: #fff;
    flex-shrink: 0;
    background: #94a3b8;
}
.tm-pstats-table .trn-scorer-avatar--photo { object-fit: cover; background: #1a1d2e; }
.tm-pstats-table .av--gk  { background: #d97706; }
.tm-pstats-table .av--def { background: #2563eb; }
.tm-pstats-table .av--mid { background: #16a34a; }
.tm-pstats-table .av--fwd { background: #e8192c; }

/* ── Transfers ───────────────────────────────────────────── */
.tm-transfers { display: flex; flex-direction: column; }
.tm-tr-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    border-bottom: 1px solid #f3f4f6;
}
.tm-tr-row:last-child { border-bottom: none; }
.tm-tr-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}
.tm-tr--in  .tm-tr-icon { color: #27ae60; }
.tm-tr--out .tm-tr-icon { color: #e8192c; }
.tm-tr-info { flex: 1; min-width: 0; }
.tm-tr-player {
    font-size: 13px;
    font-weight: 600;
    color: #1a1a1a;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.tm-tr-clubs {
    font-size: 12px;
    color: #6b7280;
    margin-top: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.tm-tr-meta {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 3px;
    flex-shrink: 0;
}
.tm-tr-type {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .04em;
    background: #f3f4f6;
    color: #6b7280;
    padding: 2px 7px;
    border-radius: 4px;
}
.tm-tr-type--loan { background: #eff6ff; color: #3b82f6; }
.tm-tr-date { font-size: 11px; color: #9ca3af; }

/* ── Injuries ────────────────────────────────────────────── */
.tm-inj-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #fee2e2;
    color: #dc2626;
    font-size: 11px;
    font-weight: 700;
    border-radius: 10px;
    padding: 1px 7px;
    margin-left: 8px;
}
.tm-injuries { display: flex; flex-direction: column; }
.tm-inj-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    border-bottom: 1px solid #f3f4f6;
}
.tm-inj-row:last-child { border-bottom: none; }
.tm-inj-icon { width: 20px; height: 20px; flex-shrink: 0; }
.tm-inj--injury  .tm-inj-icon { color: #e8192c; }
.tm-inj--susp    .tm-inj-icon { color: #f59e0b; }
.tm-inj-info { flex: 1; min-width: 0; }
.tm-inj-name {
    font-size: 13px;
    font-weight: 600;
    color: #1a1a1a;
}
.tm-inj-name--link {
    color: #1a1a1a;
    text-decoration: none;
}
.tm-inj-name--link:hover { text-decoration: underline; color: #27ae60; }
.tm-inj-reason {
    font-size: 12px;
    color: #6b7280;
    margin-top: 2px;
}
.tm-inj-date { font-size: 11px; color: #9ca3af; flex-shrink: 0; }
.tm-inj-row--hidden { display: none; }
.tm-inj-show-all {
    display: block;
    width: 100%;
    padding: 12px 20px;
    background: none;
    border: none;
    border-top: 1px solid #f3f4f6;
    font-size: 13px;
    font-weight: 600;
    color: #e8192c;
    cursor: pointer;
    text-align: center;
    transition: background .1s;
}
.tm-inj-show-all:hover { background: #fef2f2; }

.tm-injuries-ok {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 20px;
    font-size: 14px;
    font-weight: 500;
    color: #27ae60;
}

/* ── Trophies ────────────────────────────────────────────── */
.tm-trophies {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 0;
}
.tm-trph-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 20px;
    border-bottom: 1px solid #f3f4f6;
}
.tm-trph-item:last-child { border-bottom: none; }
.tm-trph-icon {
    position: relative;
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    background: linear-gradient(135deg, #fef3c7, #fde68a);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #92400e;
}
.tm-trph-count {
    position: absolute;
    top: -6px;
    right: -6px;
    background: #e8192c;
    color: #fff;
    font-size: 10px;
    font-weight: 800;
    border-radius: 10px;
    min-width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
    border: 2px solid #fff;
}
.tm-trph-info { flex: 1; min-width: 0; }
.tm-trph-name {
    font-size: 13px;
    font-weight: 600;
    color: #1a1a1a;
    line-height: 1.3;
}
.tm-trph-seasons {
    font-size: 11px;
    color: #9ca3af;
    margin-top: 3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
@media (max-width: 600px) {
    .tm-trophies { grid-template-columns: 1fr; }
    .tm-pst-th, .tm-pst-td { padding: 8px 8px; }
    .tm-pst-name { max-width: 100px; }
    .tm-tr-row, .tm-inj-row { padding: 10px 14px; }
    .tm-trph-item { padding: 12px 14px; }
}

/* ── Hero meta override (tournament.css sets color:#e5e7eb for dark bg) ── */
.tm-hero .trn-hero__meta-value { color: #111827; }
.tm-hero .trn-hero__meta-label { color: #6b7280; }

/* ── League Standing widget ─────────────────────────────────── */
.tm-standing-link {
    font-size: 12px;
    color: #e8192c;
    font-weight: 600;
    text-decoration: none;
}
.tm-standing-link:hover { text-decoration: underline; }
.tm-standing-body {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 20px 18px;
}
.tm-standing-pos {
    font-size: 40px;
    font-weight: 900;
    color: #374151;
    min-width: 54px;
    text-align: center;
    flex-shrink: 0;
    line-height: 1;
}
.tm-sp-hash {
    font-size: 18px;
    font-weight: 700;
    color: #9ca3af;
    vertical-align: top;
    line-height: 1.4;
    margin-right: 1px;
}
.tm-sp--top { color: #16a34a; }
.tm-sp--top .tm-sp-hash { color: #86efac; }
.tm-sp--rel { color: #ef4444; }
.tm-sp--rel .tm-sp-hash { color: #fca5a5; }
.tm-standing-info { flex: 1; min-width: 0; }
.tm-standing-league {
    font-size: 13px;
    font-weight: 700;
    color: #374151;
    margin-bottom: 6px;
}
.tm-sp-pts {
    font-size: 24px;
    font-weight: 800;
    color: #111827;
}
.tm-standing-pts {
    font-size: 13px;
    color: #6b7280;
    margin-bottom: 4px;
}
.tm-standing-wdl {
    font-size: 12px;
    color: #9ca3af;
    font-weight: 500;
}
.tm-sp-gd { font-weight: 700; color: #6b7280; }

/* ── Best Bet Today (копия pd-best-bet из predictions.css) ── */
.pd-best-bet {
    background: linear-gradient(135deg, #1a0a0a 0%, #111827 60%, #0d1117 100%);
    border: 1px solid rgba(232,25,44,.3);
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 0;
    position: relative;
}
.pd-bb-badge {
    display: inline-block;
    background: #e8192c;
    color: #fff;
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .08em;
    padding: 4px 12px;
    margin: 14px 14px 0;
    border-radius: 4px;
}
.pd-bb-inner { padding: 12px 16px 16px; }
.pd-bb-league {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: #6b7280;
    margin-bottom: 12px;
}
.pd-bb-league img { width: 16px; height: 16px; object-fit: contain; }
.pd-bb-league span { font-weight: 600; color: #9ca3af; }
.pd-bb-time { margin-left: auto; font-size: 11px; color: #4b5563; }
.pd-bb-match {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
}
.pd-bb-team {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    font-size: 14px;
    font-weight: 700;
    color: #f3f4f6;
}
.pd-bb-team img { width: 28px; height: 28px; object-fit: contain; flex-shrink: 0; }
.pd-bb-team:last-child { justify-content: flex-end; }
.pd-bb-vs { font-size: 12px; color: #4b5563; flex-shrink: 0; }
.pd-bb-tip {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    background: rgba(232,25,44,.08);
    border: 1px solid rgba(232,25,44,.2);
    border-radius: 8px;
    padding: 10px 14px;
    margin-bottom: 12px;
}
.pd-bb-outcome { font-size: 16px; font-weight: 800; color: #f9fafb; }
.pd-bb-conf { font-size: 12px; color: #9ca3af; text-align: right; }
.pd-bb-pct { font-size: 18px; font-weight: 800; color: #e8192c; }
.pd-bb-btn {
    display: block;
    text-align: center;
    background: #e8192c;
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    padding: 10px 16px;
    border-radius: 8px;
    text-decoration: none;
    transition: background .15s;
}
.pd-bb-btn:hover { background: #c0111f; }

/* ── Sections (tab-switched, only one visible at a time) ─── */
.tm-section {
    min-height: 4px;
    padding-bottom: 24px;
}
.tm-section--hidden { display: none; }

/* ── Bet CTA in schedule ──────────────────────────────────── */
.tm-bet-cta {
    flex-shrink: 0;
    padding: 5px 12px;
    background: #e8192c;
    color: #fff;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
    transition: background .15s;
}
.tm-bet-cta:hover { background: #c0111f; }

/* DEBT-IF2-02: extracted from inline styles in teams/index.php (Sprint DEBT-CLEANUP) */
.tm-page-h1 {
    font-size: 28px;
    font-weight: 800;
    margin: 8px 0 12px;
    line-height: 1.2;
}
.tm-recent-form {
    margin: 16px 0;
    padding: 16px;
    border: 1px solid rgba(128,128,128,.15);
    border-radius: 10px;
    background: rgba(128,128,128,.03);
}
.tm-recent-form__title {
    font-size: 16px;
    font-weight: 700;
    margin: 0 0 12px;
}
.tm-recent-form__list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
    font-size: 14px;
}
.tm-recent-form__result { font-weight: 700; }
.tm-recent-form__result--won  { color: #16a34a; }
.tm-recent-form__result--lost { color: #dc2626; }
.tm-recent-form__result--draw { color: #6b7280; }
.tm-recent-form__date { color: #6b7280; }

/* Sprint INTL-EXPANSION Phase 3 (AC-3.6/AC-3.7): National team SSR hero + Recent Matches */
.tm-fifa-rank {
    display: inline-block;
    margin-left: 12px;
    padding: 4px 10px;
    background: #e8192c;
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    border-radius: 12px;
    vertical-align: middle;
    line-height: 1.4;
}
.tm-hero--national {
    display: flex;
    gap: 16px;
    align-items: center;
    padding: 16px;
    background: rgba(232, 25, 44, .06);
    border-radius: 12px;
    margin-bottom: 20px;
}
.tm-hero--national .tm-hero__logo {
    width: 80px;
    height: 80px;
    object-fit: contain;
    background: #fff;
    border-radius: 50%;
    padding: 8px;
}
.tm-hero--national .tm-hero__info { flex: 1; min-width: 0; }
.tm-hero--national .tm-hero__name {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 8px;
}
.tm-hero--national .tm-hero__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.tm-hero__chip {
    display: inline-block;
    padding: 4px 10px;
    background: rgba(0, 0, 0, .06);
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
}

/* Recent Matches list — national team */
.tm-recent-natl__list { gap: 10px; }
.tm-recent-natl__item {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    grid-template-rows: auto auto;
    gap: 6px 12px;
    align-items: center;
    padding: 10px 12px;
    background: rgba(0, 0, 0, .03);
    border-radius: 8px;
    font-size: 13px;
}
.tm-recent-natl__team {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
    /* Sprint MEGA-USER-FEEDBACK-1 AC-3 (2026-06-03):
       grid 1fr auto 1fr stretches cell to full track width, pushing home name
       far from the centered score. Default justify-self: end keeps home anchored
       to the score column. */
    justify-self: end;
}
.tm-recent-natl__team:last-of-type {
    flex-direction: row-reverse;
    text-align: right;
    justify-content: flex-start;
    /* Sprint MEGA-USER-FEEDBACK-1 AC-3: away anchors to start (left side of
       its track), creating symmetric layout with home on the other side. */
    justify-self: start;
}
.tm-recent-natl__team img {
    width: 20px;
    height: 20px;
    object-fit: contain;
    flex-shrink: 0;
}
.tm-recent-natl__team span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.tm-recent-natl__score {
    font-weight: 700;
    font-size: 15px;
    padding: 0 8px;
    text-align: center;
}
.tm-recent-natl__date,
.tm-recent-natl__league {
    grid-column: 1 / -1;
    font-size: 11px;
    color: #6b7280;
    text-align: center;
}
.tm-recent-natl__league {
    font-weight: 600;
    opacity: .8;
}
@media (max-width: 480px) {
    .tm-recent-natl__item { font-size: 12px; gap: 4px 8px; padding: 8px 10px; }
    .tm-recent-natl__score { font-size: 14px; padding: 0 4px; }
}

/* ── GSC-FIX-2 AC-3: Predictions CTA on team page ── */
.tm-pred-cta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin: 18px 0 22px;
    padding: 18px 22px;
    background: linear-gradient(135deg, rgba(232, 25, 44, .08) 0%, rgba(232, 25, 44, .03) 100%);
    border: 1px solid rgba(232, 25, 44, .18);
    border-radius: 12px;
    flex-wrap: wrap;
}
.tm-pred-cta__body { flex: 1; min-width: 240px; }
.tm-pred-cta__title {
    font-size: 1rem;
    font-weight: 700;
    margin: 0 0 6px;
    color: var(--color-text, #f1f5f9);
}
.tm-pred-cta__lead {
    font-size: .85rem;
    color: var(--color-text-muted, #9ca3af);
    margin: 0;
    line-height: 1.5;
}
.tm-pred-cta__btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
    padding: 11px 18px;
    background: #e8192c;
    color: #fff;
    font-size: .85rem;
    font-weight: 700;
    text-decoration: none;
    border-radius: 8px;
    transition: background .15s ease, transform .15s ease;
}
.tm-pred-cta__btn:hover,
.tm-pred-cta__btn:focus-visible {
    background: #c0111f;
    transform: translateY(-1px);
    outline: none;
}
@media (max-width: 560px) {
    .tm-pred-cta { padding: 16px 18px; }
    .tm-pred-cta__btn { width: 100%; justify-content: center; }
}
