/* =========================================================
   H2HFACTS TEAM DASHBOARD - FIRST IMAGE STYLE
   File: public/css/teams.css
   ========================================================= */

.team-dash-shell {
    grid-template-columns: 300px minmax(0, 1fr) !important;
    align-items: start !important;
    gap: 14px !important;
    padding-top: 14px !important;
}

.team-dash-main {
    grid-column: 2 !important;
    min-width: 0 !important;
    display: grid !important;
    gap: 14px !important;
}

/* HERO */
.td-hero {
    min-height: 278px;
    position: relative;
    overflow: hidden;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 330px;
    align-items: stretch;
    border-radius: 18px;
    border: 1px solid rgba(83,255,80,.18);
    background:
        radial-gradient(circle at top left, rgba(83,255,80,.12), transparent 35%),
        linear-gradient(180deg, rgba(4,24,10,.97), rgba(1,9,5,.99));
    box-shadow: 0 20px 52px rgba(0,0,0,.26);
}

.td-stadium-bg {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(1,7,4,.82) 0%, rgba(1,7,4,.70) 48%, rgba(1,7,4,.88) 100%),
        radial-gradient(circle at 70% 15%, rgba(83,255,80,.10), transparent 35%),
        url('/images/stadium-bg.webp');
    background-size: cover;
    background-position: center;
    opacity: .88;
}

.td-stadium-bg::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(rgba(83,255,80,.030) 1px, transparent 1px),
        linear-gradient(90deg, rgba(83,255,80,.020) 1px, transparent 1px);
    background-size: 44px 44px;
    opacity: .45;
}

.td-hero-identity {
    position: relative;
    z-index: 2;
    min-width: 0;
    display: grid;
    grid-template-columns: 245px minmax(0, 1fr);
    align-items: center;
    gap: 24px;
    padding: 26px;
}

.td-follow {
    position: absolute;
    top: 16px;
    left: 16px;
    min-height: 29px;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 0 12px;
    border-radius: 999px;
    background: rgba(83,255,80,.10);
    border: 1px solid rgba(83,255,80,.22);
    color: #55f041;
    font-size: 11px;
    font-weight: 1000;
}

.td-logo-card {
    width: 190px;
    height: 190px;
    justify-self: center;
    display: grid;
    place-items: center;
    border-radius: 22px;
    background:
        radial-gradient(circle, rgba(255,255,255,.07), rgba(83,255,80,.07) 64%, rgba(0,0,0,.12));
    border: 1px solid rgba(83,255,80,.16);
    box-shadow: 0 24px 40px rgba(0,0,0,.26);
}

.td-logo-card img {
    width: 150px;
    height: 150px;
    object-fit: contain;
    filter: drop-shadow(0 18px 22px rgba(0,0,0,.42));
}

.td-logo-card span {
    color: #55f041;
    font-size: 64px;
    font-weight: 1000;
}

.td-title-block {
    min-width: 0;
}

.td-title-block h1 {
    margin: 0;
    max-width: 820px;
    color: #fff;
    font-size: clamp(34px, 4.2vw, 58px);
    line-height: .98;
    font-weight: 1000;
    letter-spacing: -.04em;
    overflow-wrap: anywhere;
}

.td-title-block h1 i {
    color: #55f041;
    font-size: .42em;
    vertical-align: middle;
    filter: drop-shadow(0 0 12px rgba(83,255,80,.38));
}

.td-meta-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    margin-top: 14px;
}

.td-meta-pills span {
    min-height: 30px;
    display: inline-flex;
    align-items: center;
    padding: 0 12px;
    border-radius: 999px;
    background: rgba(255,255,255,.055);
    border: 1px solid rgba(255,255,255,.08);
    color: rgba(230,255,232,.78);
    font-size: 12px;
    font-weight: 900;
}

.td-mini-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 0;
    margin-top: 28px;
}

.td-mini-stats > div {
    min-width: 98px;
    padding: 0 20px;
    border-left: 1px solid rgba(83,255,80,.18);
}

.td-mini-stats > div:first-child {
    padding-left: 0;
    border-left: 0;
}

.td-mini-stats span {
    display: block;
    color: rgba(230,255,232,.48);
    font-size: 10px;
    font-weight: 1000;
    text-transform: uppercase;
    letter-spacing: .06em;
}

.td-mini-stats strong {
    display: block;
    margin-top: 6px;
    color: #fff;
    font-size: 27px;
    line-height: 1;
    font-weight: 1000;
}

.td-form-mini {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 6px;
}

.td-form-mini em,
.td-form-mini small,
.td-form-big i {
    width: 28px;
    height: 28px;
    display: grid;
    place-items: center;
    border-radius: 8px;
    color: #fff;
    font-size: 11px;
    font-style: normal;
    font-weight: 1000;
    background: rgba(255,255,255,.12);
}

.td-club-facts {
    position: relative;
    z-index: 2;
    display: grid;
    align-content: center;
    gap: 15px;
    padding: 22px;
    border-left: 1px solid rgba(83,255,80,.12);
    background: rgba(0,0,0,.14);
}

.td-club-facts > div {
    min-width: 0;
    display: grid;
    grid-template-columns: 28px minmax(0, 1fr);
    gap: 7px 10px;
    align-items: center;
}

.td-club-facts i {
    width: 26px;
    height: 26px;
    grid-row: span 2;
    display: grid;
    place-items: center;
    border-radius: 9px;
    background: rgba(83,255,80,.08);
    color: rgba(230,255,232,.66);
    font-size: 12px;
}

.td-club-facts span {
    color: rgba(230,255,232,.50);
    font-size: 10px;
    font-weight: 1000;
}

.td-club-facts strong {
    min-width: 0;
    color: #fff;
    font-size: 13px;
    font-weight: 900;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* STAT CARDS */
.td-stat-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 12px;
}

.td-stat-card {
    min-height: 94px;
    display: grid;
    grid-template-columns: 54px minmax(0, 1fr);
    align-items: center;
    gap: 12px;
    padding: 13px;
    border-radius: 15px;
    background:
        radial-gradient(circle at top left, rgba(83,255,80,.08), transparent 40%),
        linear-gradient(180deg, rgba(4,22,10,.96), rgba(1,9,5,.98));
    border: 1px solid rgba(83,255,80,.16);
}

.td-stat-icon {
    width: 50px;
    height: 50px;
    display: grid;
    place-items: center;
    border-radius: 15px;
    background: rgba(83,255,80,.10);
    color: #55f041;
    font-size: 22px;
}

.td-stat-card span {
    color: rgba(230,255,232,.54);
    font-size: 10px;
    font-weight: 1000;
    text-transform: uppercase;
}

.td-stat-card strong {
    display: block;
    margin-top: 4px;
    color: #fff;
    font-size: 28px;
    line-height: 1;
    font-weight: 1000;
}

.td-stat-card em {
    display: block;
    margin-top: 4px;
    color: rgba(230,255,232,.62);
    font-size: 11px;
    font-style: normal;
    font-weight: 900;
}

.td-stat-win .td-stat-icon,
.td-stat-neutral .td-stat-icon {
    background: rgba(83,255,80,.12);
    color: #55f041;
}

.td-stat-draw .td-stat-icon {
    background: rgba(255,218,56,.10);
    color: #ffd438;
}

.td-stat-loss .td-stat-icon {
    background: rgba(255,75,75,.10);
    color: #ff5151;
}

.td-stat-win em,
.td-stat-neutral em {
    color: #55f041;
}

/* PANELS */
.td-grid-row {
    display: grid;
    gap: 12px;
}

.td-grid-4-4-5-4 {
    grid-template-columns: 1.05fr .95fr 1.25fr 1.05fr;
}

.td-grid-4-6-6 {
    grid-template-columns: 1fr 1.35fr 1.35fr;
}

.td-panel {
    min-width: 0;
    overflow: hidden;
    padding: 15px;
    border-radius: 15px;
    background:
        radial-gradient(circle at top left, rgba(83,255,80,.07), transparent 38%),
        linear-gradient(180deg, rgba(4,22,10,.96), rgba(1,9,5,.98));
    border: 1px solid rgba(83,255,80,.16);
    box-shadow: 0 18px 38px rgba(0,0,0,.18);
}

.td-panel-head {
    margin-bottom: 14px;
}

.td-panel-head span {
    display: block;
    color: rgba(230,255,232,.72);
    font-size: 11px;
    line-height: 1.1;
    font-weight: 1000;
    text-transform: uppercase;
    letter-spacing: .06em;
}

/* FORM */
.td-form-big {
    display: flex;
    gap: 12px;
    margin: 18px 0;
}

.td-form-big i {
    width: 52px;
    height: 52px;
    border-radius: 12px;
    font-size: 18px;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.18);
}

.td-result-w {
    background: linear-gradient(180deg, #28e947, #108e24) !important;
}

.td-result-d {
    background: linear-gradient(180deg, #9fa4a0, #676d68) !important;
}

.td-result-l {
    background: linear-gradient(180deg, #ff3838, #a91212) !important;
}

.td-form-bars {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 8px;
    margin-top: 10px;
}

.td-line {
    height: 8px;
    overflow: hidden;
    border-radius: 999px;
    background: rgba(255,255,255,.12);
}

.td-line::before {
    content: "";
    width: var(--w, 0%);
    height: 100%;
    display: block;
    border-radius: inherit;
}

.td-win-line::before {
    background: #55f041;
}

.td-draw-line::before {
    background: #bfc5bf;
}

.td-loss-line::before {
    background: #ff3535;
}

.td-form-labels {
    display: flex;
    justify-content: space-between;
    margin-top: 9px;
    color: rgba(230,255,232,.60);
    font-size: 12px;
    font-weight: 900;
}

/* FIXTURES */
.td-fixture-list,
.td-result-list {
    display: grid;
    gap: 9px;
}

.td-fixture-row {
    min-height: 36px;
    display: grid;
    grid-template-columns: 84px minmax(0, 1fr) 24px;
    align-items: center;
    gap: 8px;
    color: inherit;
    text-decoration: none;
}

.td-fixture-row time {
    color: rgba(230,255,232,.60);
    font-size: 11px;
    line-height: 1.2;
    font-weight: 850;
}

.td-fixture-row strong {
    min-width: 0;
    color: #fff;
    font-size: 12px;
    font-weight: 900;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.td-fixture-row em {
    justify-self: end;
    color: rgba(230,255,232,.70);
    font-size: 12px;
    font-style: normal;
    font-weight: 1000;
}

.td-panel-link {
    width: max-content;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 13px auto 0;
    color: #55f041;
    font-size: 12px;
    font-weight: 1000;
    text-decoration: none;
}

/* RINGS */
.td-ring-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 10px;
    align-items: center;
}

.td-ring-item {
    display: grid;
    justify-items: center;
    gap: 8px;
    text-align: center;
}

.td-ring {
    width: 74px;
    height: 74px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background:
        conic-gradient(#55f041 calc(var(--p) * 1%), rgba(255,255,255,.22) 0),
        rgba(0,0,0,.22);
}

.td-ring::before {
    content: "";
    position: absolute;
}

.td-ring strong {
    width: 54px;
    height: 54px;
    display: grid;
    place-items: center;
    border-radius: inherit;
    background: #041009;
    color: #fff;
    font-size: 17px;
    font-weight: 1000;
}

.td-ring-item span {
    color: #fff;
    font-size: 11px;
    line-height: 1.1;
    font-weight: 900;
}

.td-ring-item em {
    color: rgba(230,255,232,.48);
    font-size: 10px;
    font-style: normal;
    font-weight: 850;
}

/* STANDINGS */
.td-standing-table {
    display: grid;
}

.td-standing-head,
.td-standing-row {
    display: grid;
    grid-template-columns: 24px minmax(0, 1fr) 34px 42px 42px;
    gap: 8px;
    align-items: center;
    min-height: 30px;
}

.td-standing-head {
    color: rgba(230,255,232,.50);
    font-size: 10px;
    font-weight: 1000;
    text-transform: uppercase;
}

.td-standing-row {
    border-radius: 8px;
    color: rgba(230,255,232,.78);
    font-size: 11px;
    font-weight: 900;
}

.td-standing-row strong {
    min-width: 0;
    color: #fff;
    font-size: 11px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.td-standing-row.active {
    padding: 0 6px;
    margin: 1px -6px;
    background: rgba(83,255,80,.15);
    color: #55f041;
}

.td-standing-row.active strong {
    color: #55f041;
}

/* HOME AWAY */
.td-ha-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.td-ha-card {
    padding: 13px;
    border-radius: 12px;
    background: rgba(255,255,255,.055);
    border: 1px solid rgba(255,255,255,.07);
}

.td-ha-card.home {
    background: rgba(83,255,80,.09);
    border-color: rgba(83,255,80,.22);
}

.td-ha-card > strong {
    display: block;
    margin-bottom: 12px;
    color: #55f041;
    font-size: 12px;
    font-weight: 1000;
    text-transform: uppercase;
}

.td-ha-card.away > strong {
    color: #fff;
}

.td-ha-line {
    display: grid;
    grid-template-columns: 78px minmax(0, 1fr) 22px;
    align-items: center;
    gap: 8px;
    min-height: 24px;
}

.td-ha-line span {
    color: rgba(230,255,232,.70);
    font-size: 11px;
    font-weight: 850;
}

.td-ha-line i {
    height: 7px;
    overflow: hidden;
    border-radius: 999px;
    background: rgba(255,255,255,.16);
}

.td-ha-line i::before {
    content: "";
    width: var(--w, 0%);
    height: 100%;
    display: block;
    border-radius: inherit;
    background: #55f041;
}

.td-ha-card.away .td-ha-line i::before {
    background: #d9dfd9;
}

.td-ha-line em {
    color: #fff;
    font-size: 11px;
    font-style: normal;
    font-weight: 1000;
}

.td-ppg {
    display: flex;
    justify-content: space-between;
    margin-top: 10px;
    padding-top: 9px;
    border-top: 1px solid rgba(255,255,255,.08);
}

.td-ppg span,
.td-ppg strong {
    color: rgba(230,255,232,.85);
    font-size: 12px;
    font-weight: 1000;
}

/* PLAYERS */
.td-player-card-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.td-player-card {
    min-height: 196px;
    display: grid;
    justify-items: center;
    gap: 9px;
    padding: 15px 12px;
    border-radius: 13px;
    background: rgba(83,255,80,.08);
    border: 1px solid rgba(83,255,80,.22);
    text-align: center;
}

.td-player-card.gold {
    background: rgba(255,193,7,.06);
    border-color: rgba(255,193,7,.34);
}

.td-player-card > span {
    color: #55f041;
    font-size: 10px;
    font-weight: 1000;
    text-transform: uppercase;
}

.td-player-card.gold > span,
.td-player-card.gold .td-player-value strong {
    color: #ffd438;
}

.td-player-photo {
    width: 82px;
    height: 82px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: rgba(255,255,255,.08);
    border: 1px solid rgba(255,255,255,.14);
    overflow: hidden;
}

.td-player-photo img,
.td-player-photo b {
    width: 100%;
    height: 100%;
    display: grid;
    place-items: center;
    object-fit: cover;
    color: #55f041;
    font-size: 28px;
    font-weight: 1000;
}

.td-player-card a,
.td-player-card > strong {
    max-width: 100%;
    color: #fff;
    font-size: 12px;
    line-height: 1.15;
    font-weight: 900;
    text-decoration: none;
}

.td-player-value strong {
    display: block;
    color: #55f041;
    font-size: 32px;
    line-height: .9;
    font-weight: 1000;
}

.td-player-value em {
    display: block;
    margin-top: 5px;
    color: rgba(230,255,232,.58);
    font-size: 11px;
    font-style: normal;
    font-weight: 850;
}

/* RESULTS */
.td-result-row {
    min-height: 52px;
    display: grid;
    grid-template-columns: 82px minmax(0, 1fr) 28px;
    align-items: center;
    gap: 10px;
    padding: 8px 0;
    border-bottom: 1px solid rgba(255,255,255,.055);
    color: inherit;
    text-decoration: none;
}

.td-result-row:last-child {
    border-bottom: 0;
}

.td-result-row time {
    color: rgba(230,255,232,.60);
    font-size: 11px;
    font-weight: 850;
}

.td-result-row div {
    min-width: 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 54px minmax(0, 1fr);
    align-items: center;
    gap: 8px;
}

.td-result-row strong {
    min-width: 0;
    color: #fff;
    font-size: 12px;
    font-weight: 900;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.td-result-row span {
    text-align: center;
    color: #fff;
    font-size: 17px;
    font-weight: 1000;
}

.td-result-row em {
    width: 23px;
    height: 23px;
    display: grid;
    place-items: center;
    border-radius: 7px;
    color: #fff;
    font-size: 10px;
    font-style: normal;
    font-weight: 1000;
}

/* TABLE */
.td-squad-table {
    padding: 16px;
}

.td-table-wrap {
    overflow-x: auto;
    border-radius: 13px;
    border: 1px solid rgba(83,255,80,.14);
}

.td-table {
    width: 100%;
    min-width: 920px;
    border-collapse: collapse;
}

.td-table th {
    height: 38px;
    padding: 0 9px;
    background: rgba(83,255,80,.08);
    color: rgba(230,255,232,.66);
    font-size: 10px;
    font-weight: 1000;
    text-transform: uppercase;
    text-align: center;
    border-right: 1px solid rgba(255,255,255,.045);
}

.td-table td {
    height: 48px;
    padding: 0 9px;
    color: rgba(245,255,246,.82);
    font-size: 12px;
    font-weight: 850;
    text-align: center;
    border-top: 1px solid rgba(255,255,255,.045);
    border-right: 1px solid rgba(255,255,255,.035);
}

.td-table .player-cell {
    width: 280px;
    text-align: left;
}

.td-table-player {
    display: grid;
    grid-template-columns: 36px minmax(0, 1fr);
    align-items: center;
    gap: 10px;
}

.td-table-player img,
.td-table-player b {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border-radius: 9px;
    object-fit: cover;
    background: rgba(83,255,80,.10);
    color: #55f041;
    font-weight: 1000;
}

.td-table-player a,
.td-table-player strong {
    color: #fff;
    font-size: 12px;
    font-weight: 1000;
    text-decoration: none;
}

.td-table-player small {
    display: block;
    color: rgba(230,255,232,.45);
    font-size: 10px;
    font-weight: 850;
}

.td-rating {
    min-width: 34px;
    height: 23px;
    display: inline-grid;
    place-items: center;
    border-radius: 999px;
    background: rgba(83,255,80,.12);
    color: #55f041;
    font-size: 11px;
    font-weight: 1000;
}

/* FOOT */
.td-page-foot {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    padding: 12px 6px 18px;
    color: rgba(230,255,232,.45);
    font-size: 11px;
    font-weight: 850;
}

.td-page-foot strong {
    color: #55f041;
}

.td-empty {
    padding: 14px;
    color: rgba(230,255,232,.56);
    font-size: 12px;
    font-weight: 900;
}

/* RESPONSIVE */
@media (max-width: 1550px) {
    .team-dash-shell {
        grid-template-columns: 280px minmax(0, 1fr) !important;
    }

    .td-stat-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .td-grid-4-4-5-4,
    .td-grid-4-6-6 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .td-trend-panel,
    .td-standings {
        grid-column: span 1;
    }
}

@media (max-width: 1180px) {
    .team-dash-shell {
        grid-template-columns: 250px minmax(0, 1fr) !important;
    }

    .td-hero {
        grid-template-columns: 1fr;
    }

    .td-club-facts {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        border-left: 0;
        border-top: 1px solid rgba(83,255,80,.12);
    }

    .td-stat-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .td-grid-4-4-5-4,
    .td-grid-4-6-6 {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 900px) {
    .team-dash-shell {
        display: block !important;
        padding: 10px !important;
    }

    .team-dash-main {
        grid-column: auto !important;
    }

    .td-hero-identity {
        grid-template-columns: 1fr;
        gap: 18px;
        padding: 18px;
    }

    .td-logo-card {
        width: 130px;
        height: 130px;
    }

    .td-logo-card img {
        width: 96px;
        height: 96px;
    }

    .td-title-block h1 {
        font-size: 34px;
    }

    .td-mini-stats > div {
        min-width: 86px;
        padding: 0 12px;
    }

    .td-club-facts,
    .td-stat-grid,
    .td-ha-grid,
    .td-player-card-grid {
        grid-template-columns: 1fr;
    }

    .td-ring-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .td-form-big i {
        width: 42px;
        height: 42px;
    }

    .td-page-foot {
        flex-direction: column;
    }
}

@media (max-width: 560px) {
    .td-stat-grid {
        grid-template-columns: 1fr 1fr;
    }

    .td-ring-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .td-result-row div {
        grid-template-columns: 1fr;
    }

    .td-result-row span {
        text-align: left;
    }
}



/* =========================================================
   TEAM DASHBOARD COMPACT FIX
   Smaller layout + better standings/goal trend proportions
   ========================================================= */

.team-dash-shell {
    gap: 10px !important;
    padding-top: 10px !important;
}

.team-dash-main {
    gap: 10px !important;
}

/* smaller hero */
.td-hero {
    min-height: 210px !important;
    grid-template-columns: minmax(0, 1fr) 285px !important;
    border-radius: 14px !important;
}

.td-hero-identity {
    grid-template-columns: 170px minmax(0, 1fr) !important;
    gap: 18px !important;
    padding: 18px 20px !important;
}

.td-follow {
    top: 12px !important;
    left: 12px !important;
    min-height: 24px !important;
    padding: 0 9px !important;
    font-size: 10px !important;
}

.td-logo-card {
    width: 138px !important;
    height: 138px !important;
    border-radius: 18px !important;
}

.td-logo-card img {
    width: 108px !important;
    height: 108px !important;
}

.td-title-block h1 {
    font-size: clamp(30px, 3.35vw, 46px) !important;
}

.td-meta-pills {
    gap: 7px !important;
    margin-top: 10px !important;
}

.td-meta-pills span {
    min-height: 25px !important;
    padding: 0 10px !important;
    font-size: 11px !important;
}

.td-mini-stats {
    margin-top: 20px !important;
}

.td-mini-stats > div {
    min-width: 82px !important;
    padding: 0 14px !important;
}

.td-mini-stats strong {
    font-size: 22px !important;
}

.td-form-mini em,
.td-form-mini small {
    width: 24px !important;
    height: 24px !important;
    border-radius: 7px !important;
    font-size: 10px !important;
}

.td-club-facts {
    gap: 10px !important;
    padding: 16px !important;
}

.td-club-facts > div {
    grid-template-columns: 24px minmax(0, 1fr) !important;
    gap: 5px 8px !important;
}

.td-club-facts i {
    width: 23px !important;
    height: 23px !important;
    border-radius: 8px !important;
    font-size: 11px !important;
}

.td-club-facts strong {
    font-size: 12px !important;
}

/* smaller stat cards */
.td-stat-grid {
    gap: 9px !important;
}

.td-stat-card {
    min-height: 76px !important;
    grid-template-columns: 44px minmax(0, 1fr) !important;
    gap: 9px !important;
    padding: 10px !important;
    border-radius: 13px !important;
}

.td-stat-icon {
    width: 40px !important;
    height: 40px !important;
    border-radius: 12px !important;
    font-size: 18px !important;
}

.td-stat-card span {
    font-size: 9px !important;
}

.td-stat-card strong {
    font-size: 24px !important;
}

.td-stat-card em {
    font-size: 10px !important;
}

/* panels compact */
.td-grid-row {
    gap: 9px !important;
}

.td-panel {
    padding: 12px !important;
    border-radius: 13px !important;
}

.td-panel-head {
    margin-bottom: 10px !important;
}

.td-panel-head span {
    font-size: 10px !important;
}

/* layout balance: goal trends slightly wider */
.td-grid-4-4-5-4 {
    grid-template-columns: .95fr .95fr 1.45fr 1.05fr !important;
}

/* form compact */
.td-form-big {
    gap: 9px !important;
    margin: 13px 0 !important;
}

.td-form-big i {
    width: 42px !important;
    height: 42px !important;
    border-radius: 10px !important;
    font-size: 15px !important;
}

.td-form-labels {
    font-size: 11px !important;
}

/* fixtures compact */
.td-fixture-row {
    min-height: 31px !important;
    grid-template-columns: 78px minmax(0, 1fr) 20px !important;
}

.td-fixture-row time,
.td-fixture-row strong,
.td-fixture-row em {
    font-size: 10.5px !important;
}

/* goal trends/rings compact but visible */
.td-ring-grid {
    gap: 8px !important;
}

.td-ring {
    width: 62px !important;
    height: 62px !important;
}

.td-ring strong {
    width: 45px !important;
    height: 45px !important;
    font-size: 14px !important;
}

.td-ring-item span {
    font-size: 10px !important;
}

.td-ring-item em {
    font-size: 9px !important;
}

/* standings compact */
.td-standing-head,
.td-standing-row {
    min-height: 27px !important;
    grid-template-columns: 20px minmax(0, 1fr) 28px 34px 36px !important;
    gap: 6px !important;
}

.td-standing-head,
.td-standing-row {
    font-size: 10px !important;
}

.td-standing-row strong {
    font-size: 10.5px !important;
}

.td-empty {
    padding: 10px !important;
    font-size: 11px !important;
}

/* home/away smaller */
.td-ha-card {
    padding: 10px !important;
}

.td-ha-line {
    grid-template-columns: 70px minmax(0, 1fr) 20px !important;
    min-height: 21px !important;
}

.td-ha-line span,
.td-ha-line em,
.td-ppg span,
.td-ppg strong {
    font-size: 10px !important;
}

/* players and results smaller */
.td-player-card {
    min-height: 168px !important;
    gap: 7px !important;
    padding: 12px 10px !important;
}

.td-player-photo {
    width: 66px !important;
    height: 66px !important;
}

.td-player-value strong {
    font-size: 27px !important;
}

.td-result-row {
    min-height: 44px !important;
}

.td-result-row time,
.td-result-row strong,
.td-result-row em {
    font-size: 10.5px !important;
}

.td-result-row span {
    font-size: 14px !important;
}

@media (max-width: 1550px) {
    .td-grid-4-4-5-4 {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }

    .td-trend-panel {
        grid-column: span 1 !important;
    }
}

@media (max-width: 1180px) {
    .td-hero {
        grid-template-columns: 1fr !important;
    }

    .td-club-facts {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }
}

@media (max-width: 900px) {
    .td-hero-identity {
        grid-template-columns: 1fr !important;
    }

    .td-logo-card {
        width: 116px !important;
        height: 116px !important;
    }

    .td-logo-card img {
        width: 86px !important;
        height: 86px !important;
    }

    .td-stat-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }
}



/* =========================================================
   TEAM DASHBOARD MOBILE + NO NICKNAME PATCH
   ========================================================= */

/* On desktop after removing nickname, make the right facts area cleaner */
.td-club-facts {
    align-content: center !important;
}

/* Mobile layout */
@media (max-width: 900px) {
    .team-dash-shell {
        display: block !important;
        padding: 8px !important;
        margin: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
        overflow-x: hidden !important;
    }

    .team-dash-main {
        grid-column: auto !important;
        width: 100% !important;
        max-width: 100% !important;
        display: grid !important;
        gap: 10px !important;
        overflow-x: hidden !important;
    }

    .td-hero {
        min-height: auto !important;
        display: grid !important;
        grid-template-columns: 1fr !important;
        border-radius: 16px !important;
        overflow: hidden !important;
    }

    .td-hero-identity {
        grid-template-columns: 96px minmax(0, 1fr) !important;
        align-items: center !important;
        gap: 12px !important;
        padding: 46px 12px 14px !important;
    }

    .td-follow {
        top: 10px !important;
        left: 10px !important;
        min-height: 24px !important;
        padding: 0 9px !important;
        font-size: 10px !important;
    }

    .td-logo-card {
        width: 88px !important;
        height: 88px !important;
        border-radius: 16px !important;
    }

    .td-logo-card img {
        width: 68px !important;
        height: 68px !important;
    }

    .td-title-block {
        min-width: 0 !important;
    }

    .td-title-block h1 {
        font-size: 30px !important;
        line-height: 1 !important;
        letter-spacing: -.04em !important;
    }

    .td-title-block h1 i {
        font-size: 16px !important;
    }

    .td-meta-pills {
        margin-top: 9px !important;
        gap: 6px !important;
    }

    .td-meta-pills span {
        min-height: 23px !important;
        padding: 0 8px !important;
        font-size: 10px !important;
        max-width: 100% !important;
    }

    .td-mini-stats {
        margin-top: 12px !important;
        gap: 8px !important;
    }

    .td-mini-stats > div {
        min-width: auto !important;
        padding: 0 8px !important;
        border-left: 0 !important;
        border-radius: 10px !important;
        background: rgba(83,255,80,.07) !important;
    }

    .td-mini-stats span {
        font-size: 9px !important;
    }

    .td-mini-stats strong {
        font-size: 18px !important;
    }

    .td-form-mini em,
    .td-form-mini small {
        width: 22px !important;
        height: 22px !important;
        border-radius: 7px !important;
        font-size: 9px !important;
    }

    .td-club-facts {
        display: grid !important;
        grid-template-columns: 1fr !important;
        gap: 8px !important;
        padding: 12px !important;
        border-left: 0 !important;
        border-top: 1px solid rgba(83,255,80,.12) !important;
        background: rgba(0,0,0,.12) !important;
    }

    .td-club-facts > div {
        min-height: 38px !important;
        display: grid !important;
        grid-template-columns: 28px minmax(0, 1fr) !important;
        gap: 4px 8px !important;
        padding: 8px !important;
        border-radius: 12px !important;
        background: rgba(0,0,0,.16) !important;
        border: 1px solid rgba(255,255,255,.05) !important;
    }

    .td-club-facts i {
        width: 26px !important;
        height: 26px !important;
    }

    .td-club-facts strong {
        white-space: normal !important;
        line-height: 1.2 !important;
        font-size: 11px !important;
    }

    /* stat cards in 2 columns on phone */
    .td-stat-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 8px !important;
    }

    .td-stat-card {
        min-height: 72px !important;
        grid-template-columns: 38px minmax(0, 1fr) !important;
        padding: 9px !important;
        gap: 8px !important;
        border-radius: 13px !important;
    }

    .td-stat-icon {
        width: 36px !important;
        height: 36px !important;
        border-radius: 11px !important;
        font-size: 16px !important;
    }

    .td-stat-card strong {
        font-size: 22px !important;
    }

    .td-stat-card span {
        font-size: 8.5px !important;
    }

    .td-stat-card em {
        font-size: 9px !important;
    }

    /* all panels one under another */
    .td-grid-4-4-5-4,
    .td-grid-4-6-6 {
        grid-template-columns: 1fr !important;
        gap: 10px !important;
    }

    .td-panel {
        padding: 12px !important;
        border-radius: 14px !important;
    }

    .td-form-big {
        gap: 8px !important;
        margin: 11px 0 !important;
    }

    .td-form-big i {
        width: 40px !important;
        height: 40px !important;
        border-radius: 10px !important;
        font-size: 15px !important;
    }

    .td-form-labels {
        font-size: 10px !important;
    }

    .td-fixture-row {
        min-height: 34px !important;
        grid-template-columns: 74px minmax(0, 1fr) 20px !important;
    }

    .td-ring-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
        gap: 10px !important;
    }

    .td-ring {
        width: 60px !important;
        height: 60px !important;
    }

    .td-ring strong {
        width: 44px !important;
        height: 44px !important;
        font-size: 13px !important;
    }

    .td-standing-head,
    .td-standing-row {
        grid-template-columns: 20px minmax(0, 1fr) 24px 32px 34px !important;
        gap: 5px !important;
    }

    .td-ha-grid,
    .td-player-card-grid {
        grid-template-columns: 1fr !important;
    }

    .td-result-row {
        grid-template-columns: 76px minmax(0, 1fr) 24px !important;
        gap: 7px !important;
    }

    .td-result-row div {
        grid-template-columns: minmax(0, 1fr) 42px minmax(0, 1fr) !important;
        gap: 6px !important;
    }

    .td-result-row time,
    .td-result-row strong {
        font-size: 10px !important;
    }

    .td-result-row span {
        font-size: 13px !important;
    }

    .td-page-foot {
        flex-direction: column !important;
        gap: 5px !important;
        padding: 10px 2px 16px !important;
        font-size: 10px !important;
    }
}

@media (max-width: 520px) {
    .td-hero-identity {
        grid-template-columns: 78px minmax(0, 1fr) !important;
        gap: 10px !important;
        padding: 42px 10px 12px !important;
    }

    .td-logo-card {
        width: 72px !important;
        height: 72px !important;
        border-radius: 14px !important;
    }

    .td-logo-card img {
        width: 56px !important;
        height: 56px !important;
    }

    .td-title-block h1 {
        font-size: 25px !important;
    }

    .td-meta-pills span {
        font-size: 9px !important;
        min-height: 21px !important;
    }

    .td-mini-stats {
        display: grid !important;
        grid-template-columns: 1fr !important;
    }

    .td-mini-stats > div {
        padding: 7px 8px !important;
    }

    .td-stat-grid {
        grid-template-columns: 1fr 1fr !important;
    }

    .td-ring-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }

    .td-result-row {
        grid-template-columns: 1fr 24px !important;
    }

    .td-result-row time {
        grid-column: 1 / -1 !important;
    }

    .td-result-row div {
        grid-template-columns: 1fr !important;
    }

    .td-result-row span {
        text-align: left !important;
    }
}