﻿.show-matches-page {
    --matches-navy: #071a33;
    --matches-navy-soft: #0b2d57;
    --matches-green: #5b8c3b;
    --matches-green-dark: #426d28;
    --matches-border: #e3e9f0;
    --matches-muted: #6f7b8e;
    --matches-bg: #f5f8fb;
    min-height: 100vh;
    background: var(--matches-bg);
    color: var(--matches-navy);
}

.matches-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 24px;
    padding: 28px 30px;
    border-radius: 22px;
    background: linear-gradient( 135deg, var(--matches-navy) 0%, var(--matches-navy-soft) 100% );
    color: #ffffff;
    box-shadow: 0 14px 34px rgba(7, 26, 51, 0.18);
}

.matches-eyebrow {
    display: block;
    margin-bottom: 7px;
    color: #bfd0e5;
    font-size: 0.78rem;
    font-weight: 800;
}

.matches-header h1 {
    margin: 0 0 8px;
    font-size: clamp(1.65rem, 3vw, 2.25rem);
    font-weight: 900;
}

.matches-header p {
    max-width: 760px;
    margin: 0;
    color: #d9e3ef;
    line-height: 1.8;
}

.matches-header-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 10px;
}

.matches-primary-button,
.show-matches-page .btn-primary {
    border-color: var(--matches-green);
    background: var(--matches-green);
    font-weight: 800;
}

    .matches-primary-button:hover,
    .show-matches-page .btn-primary:hover {
        border-color: var(--matches-green-dark);
        background: var(--matches-green-dark);
    }

.matches-statistics-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 20px;
}

.match-stat-card {
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
    padding: 18px;
    border: 1px solid var(--matches-border);
    border-radius: 18px;
    background: #ffffff;
    box-shadow: 0 8px 22px rgba(7, 26, 51, 0.055);
}

.match-stat-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 46px;
    flex: 0 0 46px;
    border-radius: 14px;
    background: #eef4fb;
    color: var(--matches-navy-soft);
    font-size: 1.25rem;
    font-weight: 900;
}

.match-stat-card.is-scheduled .match-stat-icon {
    background: #e9f1ff;
    color: #255ca2;
}

.match-stat-card.is-live .match-stat-icon {
    background: #fde7e7;
    color: #c82f2f;
}

.match-stat-card.is-completed .match-stat-icon {
    background: #e6f5e9;
    color: #287a3e;
}

.match-stat-card.is-pending .match-stat-icon {
    background: #fff3d6;
    color: #9b6b00;
}

.match-stat-card small {
    display: block;
    margin-bottom: 4px;
    color: var(--matches-muted);
    font-size: 0.76rem;
    font-weight: 700;
}

.match-stat-card strong {
    display: block;
    color: var(--matches-navy);
    font-size: 1.45rem;
    font-weight: 900;
}

.matches-filter-card,
.matches-list-card {
    margin-bottom: 20px;
    padding: 22px;
    border: 1px solid var(--matches-border);
    border-radius: 20px;
    background: #ffffff;
    box-shadow: 0 9px 28px rgba(7, 26, 51, 0.06);
}

.matches-filter-heading,
.matches-list-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 18px;
}

    .matches-filter-heading h2,
    .matches-list-heading h2 {
        margin: 0 0 5px;
        color: var(--matches-navy);
        font-size: 1.1rem;
        font-weight: 900;
    }

    .matches-filter-heading p,
    .matches-list-heading p {
        margin: 0;
        color: var(--matches-muted);
        font-size: 0.82rem;
        line-height: 1.7;
    }

    .matches-results-count,
    .matches-list-heading > span {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        min-height: 34px;
        padding: 6px 11px;
        border-radius: 999px;
        background: #edf4e8;
        color: var(--matches-green-dark);
        font-size: 0.76rem;
        font-weight: 900;
        white-space: nowrap;
    }

.matches-filter-card .form-label {
    margin-bottom: 6px;
    color: #344258;
    font-size: 0.78rem;
    font-weight: 800;
}

.matches-filter-card .form-control,
.matches-filter-card .form-select {
    min-height: 44px;
    border-color: #dbe2ea;
    border-radius: 11px;
}

    .matches-filter-card .form-control:focus,
    .matches-filter-card .form-select:focus {
        border-color: #8eae79;
        box-shadow: 0 0 0 0.2rem rgba(91, 140, 59, 0.13);
    }

.matches-filter-actions {
    display: flex;
    align-items: center;
    gap: 9px;
}

    .matches-filter-actions .btn {
        min-height: 44px;
        min-width: 130px;
        border-radius: 11px;
        font-weight: 800;
    }

.matches-table-wrapper {
    overflow-x: auto;
    border: 1px solid #edf1f5;
    border-radius: 16px;
}

.matches-table {
    min-width: 1180px;
    margin: 0;
}

    .matches-table thead th {
        padding: 14px 12px;
        border-bottom: 1px solid #dfe5ec;
        background: #f6f8fb;
        color: #536176;
        font-size: 0.74rem;
        font-weight: 900;
        white-space: nowrap;
    }

    .matches-table tbody td {
        padding: 16px 12px;
        border-color: #edf1f5;
        color: #344155;
        font-size: 0.8rem;
        vertical-align: middle;
    }

    .matches-table tbody tr:hover {
        background: #fbfcfd;
    }

    .matches-table tbody tr.is-live-row {
        background: #fffafa;
    }

        .matches-table tbody tr.is-live-row:hover {
            background: #fff4f4;
        }

.match-main-cell {
    min-width: 280px;
}

.match-code-line {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    margin-bottom: 8px;
}

.match-code,
.match-sport-badge,
.match-featured-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 4px 8px;
    border-radius: 999px;
    font-size: 0.68rem;
    font-weight: 800;
}

.match-code {
    background: #eef2f6;
    color: #536176;
    direction: ltr;
}

.match-sport-badge {
    background: #edf4e8;
    color: var(--matches-green-dark);
}

.match-featured-badge {
    background: #fff0cc;
    color: #946400;
}

.match-public-title {
    display: block;
    margin-bottom: 6px;
    color: var(--matches-navy);
    font-size: 0.82rem;
    font-weight: 900;
}

.match-team-line {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 7px;
    color: var(--matches-navy);
    font-size: 0.86rem;
    font-weight: 900;
}

    .match-team-line small {
        color: #97a0ad;
        font-size: 0.67rem;
        font-weight: 700;
    }

.match-competition-name {
    display: block;
    margin-bottom: 5px;
    color: #27364d;
    font-size: 0.82rem;
}

.match-secondary-text {
    display: block;
    max-width: 190px;
    color: #7a8595;
    font-size: 0.71rem;
    line-height: 1.6;
}

.match-schedule-block {
    display: grid;
    gap: 3px;
    min-width: 130px;
}

    .match-schedule-block strong {
        color: #24344a;
        font-size: 0.82rem;
    }

    .match-schedule-block span {
        color: var(--matches-green-dark);
        font-size: 0.79rem;
        font-weight: 900;
    }

    .match-schedule-block small {
        max-width: 160px;
        color: #7b8796;
        font-size: 0.69rem;
        line-height: 1.5;
    }

.match-score-box {
    display: grid;
    place-items: center;
    min-width: 90px;
    gap: 4px;
    text-align: center;
}

    .match-score-box strong {
        color: var(--matches-navy);
        font-size: 1.15rem;
        font-weight: 900;
        direction: ltr;
    }

    .match-score-box small {
        color: #7d8796;
        font-size: 0.65rem;
    }

.match-live-minute {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 3px 7px;
    border-radius: 999px;
    background: #d73737;
    color: #ffffff;
    font-size: 0.66rem;
    font-weight: 900;
}

.match-status-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 80px;
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 0.7rem;
    font-weight: 900;
    white-space: nowrap;
}

    .match-status-badge.status-live {
        background: #fde7e7;
        color: #bd2f2f;
    }

    .match-status-badge.status-completed {
        background: #e4f4e8;
        color: #287640;
    }

    .match-status-badge.status-problem {
        background: #fff0d9;
        color: #9a6200;
    }

    .match-status-badge.status-scheduled {
        background: #e7effc;
        color: #315f9d;
    }

    .match-status-badge.status-draft {
        background: #edf0f3;
        color: #6a7482;
    }

.match-flags {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    max-width: 205px;
}

.match-flag {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 4px 7px;
    border-radius: 8px;
    font-size: 0.65rem;
    font-weight: 800;
}

    .match-flag.flag-positive {
        background: #e4f4e8;
        color: #287640;
    }

    .match-flag.flag-warning {
        background: #fff4d7;
        color: #956a00;
    }

    .match-flag.flag-official {
        background: #e7effc;
        color: #315f9d;
    }

    .match-flag.flag-muted {
        background: #edf0f3;
        color: #727d8c;
    }

    .match-flag.flag-public {
        background: #e9f6f1;
        color: #24765d;
    }

    .match-flag.flag-hidden {
        background: #f1ecec;
        color: #7b5a5a;
    }

    .match-flag.flag-live-coverage {
        background: #fde7e7;
        color: #bd2f2f;
    }

.match-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    white-space: nowrap;
}

    .match-actions .btn {
        border-radius: 8px;
        font-weight: 800;
    }

.matches-empty-state {
    display: grid;
    place-items: center;
    min-height: 320px;
    padding: 32px 18px;
    text-align: center;
}

.matches-empty-icon {
    display: grid;
    place-items: center;
    width: 72px;
    height: 72px;
    margin-bottom: 14px;
    border-radius: 22px;
    background: #eef4fb;
    font-size: 2rem;
}

.matches-empty-state h3 {
    margin: 0 0 8px;
    color: var(--matches-navy);
    font-size: 1.1rem;
    font-weight: 900;
}

.matches-empty-state p {
    max-width: 480px;
    margin: 0 0 18px;
    color: var(--matches-muted);
    line-height: 1.8;
}

.matches-pagination {
    display: flex;
    justify-content: center;
    margin-top: 20px;
}

    .matches-pagination .pagination {
        gap: 5px;
    }

    .matches-pagination .page-link {
        min-width: 38px;
        border: 1px solid #dfe5ec;
        border-radius: 9px !important;
        color: var(--matches-navy-soft);
        text-align: center;
        font-weight: 800;
    }

    .matches-pagination .page-item.active .page-link {
        border-color: var(--matches-green);
        background: var(--matches-green);
        color: #ffffff;
    }

    .matches-pagination .page-item.disabled .page-link {
        color: #a4acb7;
        background: #f4f6f8;
    }

@media (max-width: 1399.98px) {
    .matches-statistics-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 991.98px) {
    .matches-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .matches-header-actions {
        justify-content: flex-start;
        width: 100%;
    }

    .matches-statistics-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 767.98px) {
    .show-matches-page .container-fluid {
        padding-right: 12px;
        padding-left: 12px;
    }

    .matches-header {
        padding: 22px 18px;
        border-radius: 17px;
    }

    .matches-header-actions {
        display: grid;
        grid-template-columns: 1fr 1fr;
    }

        .matches-header-actions .btn {
            width: 100%;
        }

    .matches-filter-card,
    .matches-list-card {
        padding: 16px;
        border-radius: 16px;
    }

    .matches-filter-heading,
    .matches-list-heading {
        align-items: flex-start;
        flex-direction: column;
    }

    .matches-filter-actions {
        display: grid;
        grid-template-columns: 1fr 1fr;
        width: 100%;
    }

        .matches-filter-actions .btn {
            min-width: 0;
            width: 100%;
        }
}

@media (max-width: 479.98px) {
    .matches-statistics-grid {
        grid-template-columns: 1fr;
    }

    .match-stat-card {
        padding: 15px;
    }

    .matches-header-actions,
    .matches-filter-actions {
        grid-template-columns: 1fr;
    }
}
/* =========================================================
   Club logos and links in ShowMatches
   ========================================================= */

.match-team-line-with-logos {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 9px;
    margin-top: 10px;
}

.match-team-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    color: #172135;
    text-decoration: none;
    transition: color 0.2s ease, transform 0.2s ease;
}

a.match-team-link:hover {
    color: #5b8c3b;
    transform: translateY(-1px);
}

.match-team-link strong {
    display: block;
    overflow: hidden;
    max-width: 150px;
    font-size: 0.8rem;
    font-weight: 900;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.match-team-link.is-guest-team {
    cursor: default;
}

.match-list-club-logo {
    position: relative;
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    overflow: hidden;
    border: 2px solid #ffffff;
    border-radius: 50%;
    background: #f3f7f1;
    box-shadow: 0 0 0 1px #dce5d7, 0 5px 13px rgba(15, 23, 42, 0.1);
}

    .match-list-club-logo img {
        width: 100%;
        height: 100%;
        object-fit: contain;
        padding: 4px;
        background: #ffffff;
    }

.match-list-logo-fallback {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    background: linear-gradient( 135deg, #eef5ea, #dce9d5 );
    color: #47702f;
    font-size: 0.9rem;
    font-weight: 900;
}

.match-versus-label {
    color: #8a94a2;
    font-size: 0.68rem;
    font-weight: 800;
}

@media (max-width: 767.98px) {
    .match-team-line-with-logos {
        align-items: flex-start;
        flex-direction: column;
    }

    .match-versus-label {
        margin-right: 50px;
    }

    .match-team-link strong {
        max-width: 220px;
    }
}