/* ── Variables ──────────────────────────────────────── */
:root {
    --green:    #2a7d4f;
    --green-lt: #e8f5ee;
    --accent:   #1a5c38;
    --text:     #1a1a2e;
    --muted:    #6b7280;
    --border:   #e5e7eb;
    --bg:       #f8fafc;
    --card:     #ffffff;
    --danger:   #dc2626;
    --warn:     #d97706;
    --radius:   8px;
    --shadow:   0 1px 3px rgba(0,0,0,.07), 0 4px 12px rgba(0,0,0,.05);
}

/* ── Reset ──────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* ── Body ───────────────────────────────────────────── */
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg);
    color: var(--text);
    font-size: 15px;
    line-height: 1.5;
    -webkit-text-size-adjust: 100%;
}

/* ── Public header ──────────────────────────────────── */
.site-header {
    background: var(--green);
    color: #fff;
    padding: 0 1rem;
}
.site-header .inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 52px;
    gap: .75rem;
}
.site-header h1 {
    font-size: .95rem;
    font-weight: 700;
    letter-spacing: .01em;
    line-height: 1.3;
}
.site-header h1 span {
    opacity: .65;
    font-weight: 400;
    font-size: .85em;
    margin-left: .35rem;
}
@media (min-width: 480px) {
    .site-header h1 { font-size: 1.1rem; }
}
.header-nav {
    display: flex;
    align-items: center;
    gap: .35rem;
    flex-shrink: 0;
}
.header-nav a {
    color: rgba(255,255,255,.85);
    text-decoration: none;
    font-size: .82rem;
    font-weight: 500;
    padding: .25rem .5rem;
    border-radius: 4px;
    transition: color .15s, background .15s;
    white-space: nowrap;
}
.header-nav a:hover { color: #fff; background: rgba(255,255,255,.15); }
.lang-flag {
    font-size: 1.1rem;
    line-height: 1;
    padding: .25rem .4rem;
    border-radius: 4px;
    text-decoration: none;
    color: #fff;
    transition: background .15s;
    letter-spacing: .04em;
    font-weight: 600;
}
.lang-flag:hover { background: rgba(255,255,255,.2); }

/* ── Container ──────────────────────────────────────── */
.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 1rem;
}
@media (min-width: 600px) { .container { padding: 1.5rem; } }
@media (min-width: 960px) { .container { padding: 2rem 1.5rem; } }

/* ── Section title ──────────────────────────────────── */
.section-title {
    font-size: .68rem;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: .75rem;
    margin-top: 1.5rem;
    padding-left: .65rem;
    border-left: 3px solid var(--green);
}
.section-title:first-child { margin-top: 0; }

/* ── Card ───────────────────────────────────────────── */
.card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    margin-bottom: 1.25rem;
}
.card-header {
    padding: .7rem 1rem;
    border-bottom: 1px solid var(--border);
    font-weight: 700;
    font-size: .9rem;
    background: var(--green-lt);
    color: var(--accent);
}

/* ── Table scroll wrapper ───────────────────────────── */
/* Allows wide tables to scroll horizontally on mobile  */
/* without breaking the card overflow:hidden clip        */
.table-scroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    max-width: 100%;
}

/* ── Standings grid ─────────────────────────────────── */
.standings-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
    margin-bottom: 1.5rem;
}
@media (min-width: 620px) {
    .standings-grid { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
}

.standings-table {
    width: 100%;
    border-collapse: collapse;
    font-size: .84rem;
    min-width: 340px;
}
.standings-table th {
    padding: .45rem .55rem;
    text-align: right;
    font-size: .7rem;
    font-weight: 700;
    letter-spacing: .05em;
    color: var(--muted);
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
    background: var(--bg);
}
.standings-table th:nth-child(1),
.standings-table th:nth-child(2) { text-align: left; }
.standings-table th:nth-child(1) { padding-left: .9rem; }
.standings-table th:last-child   { padding-right: .9rem; }
.standings-table td {
    padding: .52rem .55rem;
    text-align: right;
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
}
.standings-table td:nth-child(1) {
    text-align: center;
    color: var(--muted);
    font-size: .78rem;
    width: 28px;
    padding-left: .9rem;
}
.standings-table td:nth-child(2) { text-align: left; font-weight: 500; white-space: normal; }
.standings-table td:last-child   { padding-right: .9rem; }
.standings-table tr:last-child td { border-bottom: none; }
.standings-table .pts { font-weight: 700; color: var(--accent); }
.standings-table tr.qualify td:nth-child(2) {
    border-left: 3px solid var(--green);
    padding-left: .55rem;
}

/* ── Match table (public) ───────────────────────────── */
/* Each match is its own <tbody> so meta+team rows are  */
/* always grouped, hover covers both, filter hides both */
.match-table {
    width: 100%;
    border-collapse: collapse;
    font-size: .88rem;
    table-layout: fixed;
}
/* Fixed score column — home and away share the rest equally */
.col-score { width: 60px; }
.match-table tbody { border-bottom: 1px solid var(--border); }
.match-table tbody:last-child { border-bottom: none; }
.match-table tbody:hover td { background: #fafbfc; }
.match-table td {
    padding: .6rem .4rem;
    vertical-align: middle;
}
/* Meta row: time / pitch / group — sits above the team names */
.mc-meta-row td {
    padding-top: .5rem;
    padding-bottom: .1rem;
    text-align: center;
    font-size: .69rem;
    color: var(--muted);
    letter-spacing: .01em;
}
/* Team names row — tighter top padding when meta row precedes it */
.mc-meta-row + tr td { padding-top: .1rem; }

/* Home team — right-aligned, takes available space */
.mc-home {
    text-align: right;
    font-weight: 500;
    padding-left: 1rem;
}
/* Score badge cell — no side padding, colgroup controls width */
.mc-score {
    text-align: center;
    padding-left: 0;
    padding-right: 0;
}
/* Away team — left-aligned, takes available space */
.mc-away {
    text-align: left;
    font-weight: 500;
    padding-right: 1rem;
}
/* Pitch / group tag — compact, right-padded, hidden on tiny screens */
.mc-tag {
    width: 1px;
    white-space: nowrap;
    font-size: .7rem;
    color: var(--muted);
    line-height: 1.4;
    text-align: right;
    padding-left: .6rem;
    padding-right: 1rem;
}
.mc-actions {
    width: 1px;
    white-space: nowrap;
    padding-right: .75rem;
}
@media (max-width: 400px) {
    .mc-away { padding-right: .5rem; }
}

/* Score badge */
.score-badge {
    display: inline-block;
    background: var(--text);
    color: #fff;
    font-weight: 700;
    font-size: .78rem;
    padding: .22rem .55rem;
    border-radius: 4px;
    min-width: 46px;
    text-align: center;
    letter-spacing: .02em;
    white-space: nowrap;
}
.score-badge.scheduled {
    background: none;
    border: none;
    color: var(--muted);
    font-weight: 500;
    font-size: .72rem;
    letter-spacing: .06em;
    padding: 0;
    min-width: 0;
}

/* ── Info card (tournament hero card) ───────────────── */
.info-card {
    background: var(--card);
    border: 1px solid transparent;
    border-radius: var(--radius);
    overflow: hidden;
    margin-bottom: 1.25rem;
    box-shadow: 0 2px 8px rgba(0,0,0,.1), 0 8px 28px rgba(42,125,79,.18);
    font-size: .9rem;
}
.info-card-title {
    position: relative;
    background: linear-gradient(135deg, #082b1a 0%, #1a5c38 50%, #329060 100%);
    color: #fff;
    padding: 1.15rem 1.25rem 1.1rem;
    font-size: 1.18rem;
    font-weight: 800;
    line-height: 1.25;
    letter-spacing: -.01em;
    overflow: hidden;
}
/* shimmer accent line across the top */
.info-card-title::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,.55) 40%, rgba(255,255,255,.9) 55%, rgba(255,255,255,.55) 70%, transparent 100%);
}
/* decorative circle in top-right corner */
.info-card-title::after {
    content: '';
    position: absolute;
    right: -40px; top: -40px;
    width: 160px; height: 160px;
    border-radius: 50%;
    background: rgba(255,255,255,.06);
    pointer-events: none;
}
.info-card-title .ic-season {
    display: block;
    font-size: .8rem;
    font-weight: 400;
    opacity: .7;
    margin-top: .2rem;
    letter-spacing: .03em;
}
.info-card-body {
    padding: .8rem 1.25rem;
}
.info-card .info-main {
    font-weight: 600;
    color: var(--text);
    font-size: .88rem;
}
.info-card .info-desc {
    font-size: .85rem;
    color: var(--muted);
    white-space: pre-line;
    margin-top: .35rem;
    line-height: 1.55;
}

/* ── Empty state ────────────────────────────────────── */
.empty {
    padding: 2rem 1rem;
    text-align: center;
    color: var(--muted);
    font-size: .9rem;
}

/* ── Alert ──────────────────────────────────────────── */
.alert {
    padding: .75rem 1rem;
    border-radius: 6px;
    font-size: .88rem;
    margin-bottom: 1.25rem;
    border: 1px solid transparent;
}
.alert-success { background: var(--green-lt); color: var(--accent); border-color: #b6dfc9; }
.alert-error   { background: #fef2f2;         color: var(--danger); border-color: #fecaca; }
.alert-info    { background: var(--green-lt); color: var(--accent); border-color: #b6dfc9; }

/* ── Admin app bar ──────────────────────────────────── */
.admin-header {
    background: var(--green);
    color: #fff;
    padding: 0 1rem;
    position: relative;
    z-index: 200;
}
.admin-header .inner {
    display: flex;
    align-items: center;
    min-height: 48px;
    gap: .6rem;
}
.admin-header h1 { font-size: 1rem; font-weight: 700; flex-shrink: 0; }
.admin-header .badge {
    background: rgba(255,255,255,.2);
    font-size: .72rem;
    padding: .15rem .5rem;
    border-radius: 99px;
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ── Hamburger button ───────────────────────────────── */
.nav-hamburger {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
    background: rgba(255,255,255,.15);
    border: none;
    cursor: pointer;
    border-radius: 6px;
    padding: .45rem .5rem;
    flex-shrink: 0;
    margin-left: auto;
    transition: background .15s;
    line-height: 1;
}
.nav-hamburger:hover { background: rgba(255,255,255,.28); }
.ham-bar {
    display: block;
    width: 20px;
    height: 2px;
    background: #fff;
    border-radius: 2px;
    transition: transform .2s, opacity .15s;
}
.nav-hamburger[aria-expanded="true"] .ham-bar:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nav-hamburger[aria-expanded="true"] .ham-bar:nth-child(2) { opacity: 0; }
.nav-hamburger[aria-expanded="true"] .ham-bar:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* ── Admin nav (collapsible dropdown) ───────────────── */
.admin-nav {
    background: var(--text);
    overflow: hidden;
    max-height: 0;
    transition: max-height .22s ease;
    position: relative;
    z-index: 190;
}
.admin-nav.open { max-height: 480px; }
.admin-nav .inner {
    display: flex;
    flex-direction: column;
    padding: .4rem 0;
    gap: 0;
}
.admin-nav a {
    color: rgba(255,255,255,.72);
    text-decoration: none;
    font-size: .88rem;
    font-weight: 500;
    padding: .62rem 1.25rem;
    transition: background .15s, color .15s;
    white-space: nowrap;
    display: block;
}
.admin-nav a:hover,
.admin-nav a.active { background: rgba(255,255,255,.1); color: #fff; }
.admin-nav .nav-divider {
    border-top: 1px solid rgba(255,255,255,.12);
    margin: .35rem 0;
}
.admin-nav .logout { color: rgba(255,255,255,.45); font-size: .82rem; }
.admin-nav .nav-public-btn {
    margin: .3rem 1rem .55rem;
    background: rgba(255,255,255,.15);
    color: #fff;
    text-align: center;
    border-radius: 6px;
    padding: .55rem 1rem;
    font-weight: 700;
    font-size: .85rem;
    transition: background .15s;
}
.admin-nav .nav-public-btn:hover { background: rgba(255,255,255,.25); color: #fff; }

/* ── Stats row ──────────────────────────────────────── */
.stats-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: .75rem;
    margin-bottom: 1.5rem;
}
@media (min-width: 480px) {
    .stats-row { grid-template-columns: repeat(4, 1fr); }
}
.stat-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: .9rem 1rem;
    box-shadow: var(--shadow);
}
.stat-card .num { font-size: 1.75rem; font-weight: 700; color: var(--green); line-height: 1; }
.stat-card .lbl { font-size: .72rem; color: var(--muted); margin-top: .25rem; text-transform: uppercase; letter-spacing: .05em; }

/* ── Data table (admin) ─────────────────────────────── */
.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: .87rem;
    min-width: 480px;
}
.data-table th {
    text-align: left;
    padding: .55rem .85rem;
    font-size: .68rem;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--muted);
    border-bottom: 2px solid var(--border);
    background: var(--bg);
    white-space: nowrap;
}
.data-table td {
    padding: .65rem .85rem;
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
}
.data-table tr:last-child td { border-bottom: none; }
.data-table tr:hover td { background: var(--bg); }
.data-table .actions { display: flex; gap: .35rem; }

/* ── Buttons ────────────────────────────────────────── */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .35rem;
    padding: .45rem .9rem;
    border-radius: 6px;
    font-size: .85rem;
    font-weight: 600;
    cursor: pointer;
    border: none;
    text-decoration: none;
    transition: filter .15s, opacity .15s;
    line-height: 1;
    white-space: nowrap;
}
.btn:hover { filter: brightness(1.08); }
.btn-primary { background: var(--green); color: #fff; }
.btn-danger  { background: var(--danger); color: #fff; }
.btn-ghost   { background: transparent; color: var(--muted); border: 1px solid var(--border); }
.btn-ghost:hover { background: var(--bg); filter: none; }
.btn-sm { padding: .28rem .6rem; font-size: .76rem; }

/* ── Forms ──────────────────────────────────────────── */
.form-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.25rem 1rem;
    margin-bottom: 1.25rem;
    box-shadow: var(--shadow);
}
@media (min-width: 600px) {
    .form-card { padding: 1.5rem; }
}
.form-card h2 { font-size: .92rem; font-weight: 700; margin-bottom: 1rem; color: var(--accent); }
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: .75rem;
    margin-bottom: .9rem;
}
/* Single-item rows span both columns */
.form-row .form-group:only-child { grid-column: 1 / -1; }
.form-group { display: flex; flex-direction: column; gap: .3rem; }
.form-group label {
    font-size: .73rem;
    font-weight: 600;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: .05em;
}
.form-group input,
.form-group select,
.form-group textarea {
    padding: .5rem .7rem;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: .9rem;
    font-family: inherit;
    background: var(--bg);
    color: var(--text);
    transition: border-color .15s;
    width: 100%;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--green);
    background: #fff;
}
.form-actions {
    display: flex;
    gap: .65rem;
    align-items: center;
    margin-top: .75rem;
    flex-wrap: wrap;
}

/* ── Score inputs ───────────────────────────────────── */
.score-input { width: 52px !important; text-align: center; }
.vs-sep { color: var(--muted); font-size: .85rem; align-self: center; }

/* ── Login page ─────────────────────────────────────── */
.login-wrap {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg);
    padding: 1rem;
}
.login-box {
    width: 100%;
    max-width: 340px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 1.75rem 1.5rem;
}
.login-box .logo { font-size: 1.5rem; text-align: center; margin-bottom: 1.25rem; }
.login-box h2 { font-size: 1rem; font-weight: 700; margin-bottom: 1.25rem; text-align: center; }
.login-box .form-group { margin-bottom: .85rem; }
.login-box .btn { width: 100%; margin-top: .5rem; padding: .6rem; }

/* ── Two-column responsive layout ──────────────────── */
.two-col { display: grid; grid-template-columns: 1fr; gap: 1.25rem; align-items: start; }
@media (min-width: 680px) {
    .two-col { grid-template-columns: 1fr 1fr; }
}

/* ── Checkbox / toggle group ────────────────────────── */
/* Separate from .form-group so no uppercase-label styles apply */
.check-group {
    margin-bottom: .75rem;
}
.check-group label {
    display: flex;
    align-items: center;
    gap: .6rem;
    cursor: pointer;
    font-size: .9rem;
    font-weight: 500;
    color: var(--text);
    user-select: none;
    line-height: 1.4;
}
.check-group input[type="checkbox"] {
    width: 17px;
    height: 17px;
    flex-shrink: 0;
    accent-color: var(--green);
    cursor: pointer;
    margin: 0;
}

/* ── Score row inside a form group ──────────────────── */
.score-row {
    display: flex;
    align-items: center;
    gap: .5rem;
}
.score-row .score-input {
    width: 60px;
    text-align: center;
    font-size: 1rem;
    font-weight: 600;
}

/* ── Team filter bar (public page) ──────────────────── */
.team-filter-bar {
    display: flex;
    align-items: center;
    gap: .75rem;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: .6rem 1rem;
    margin-bottom: 1.25rem;
    box-shadow: var(--shadow);
    flex-wrap: wrap;
}
.team-filter-bar .tf-label {
    font-size: .8rem;
    font-weight: 600;
    color: var(--muted);
    white-space: nowrap;
}
.team-filter-bar select {
    flex: 1;
    min-width: 160px;
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: .38rem .6rem;
    font-size: .9rem;
    font-family: inherit;
    background: var(--bg);
    color: var(--text);
    cursor: pointer;
}
.team-filter-bar select:focus { outline: none; border-color: var(--green); }
/* Match body hidden when filtered out */
.match-table tbody.row-hidden { display: none; }
/* Standings row dimmed when team filter active */
.standings-table tr.row-dimmed td { opacity: .3; }
/* Standings row highlighted for the selected team */
.standings-table tr.row-highlight td {
    background: var(--green-lt);
    font-weight: 700;
}

/* ── Referee score entry page ────────────────────────── */
.score-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 1rem;
    margin-bottom: 1rem;
}
.score-card-meta {
    font-size: .75rem;
    color: var(--muted);
    margin-bottom: .9rem;
    text-align: center;
    letter-spacing: .02em;
}
.scorer {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .75rem;
    margin-bottom: .85rem;
}
.scorer-team {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .5rem;
    max-width: 160px;
}
.scorer-name {
    font-weight: 700;
    font-size: .95rem;
    text-align: center;
    line-height: 1.3;
}
.scorer-input {
    width: 72px;
    height: 56px;
    text-align: center;
    font-size: 1.8rem;
    font-weight: 700;
    border: 2px solid var(--border);
    border-radius: 8px;
    background: var(--bg);
    color: var(--text);
    font-family: inherit;
    transition: border-color .15s;
    -moz-appearance: textfield;
    appearance: textfield;
}
.scorer-input::-webkit-outer-spin-button,
.scorer-input::-webkit-inner-spin-button { -webkit-appearance: none; }
.scorer-input:focus { border-color: var(--green); outline: none; background: #fff; }
.scorer-sep {
    font-size: 1.6rem;
    font-weight: 300;
    color: var(--muted);
    flex-shrink: 0;
    padding: 0 .25rem;
}
.btn-score {
    width: 100%;
    padding: .7rem;
    font-size: .95rem;
    justify-content: center;
}
.score-card--saved {
    border-color: var(--green);
    background: var(--green-lt);
}
.score-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0;
}
@media (min-width: 560px) {
    .score-grid { grid-template-columns: repeat(2, 1fr); gap: 1rem; }
}
@media (min-width: 860px) {
    .score-grid { grid-template-columns: repeat(3, 1fr); }
}

/* ── Compact date/time form row ─────────────────────── */
.form-row--dt {
    grid-template-columns: auto auto;
    justify-content: start;
}
.form-row--dt input {
    font-size: .82rem;
    padding: .38rem .5rem;
    width: auto;
    min-width: 0;
}

/* ── Mobile: collapse form rows to single column ─────── */
@media (max-width: 500px) {
    .form-row:not(.form-row--dt) { grid-template-columns: 1fr; }
}

/* ── Mobile: hide less-critical table columns ────────── */
@media (max-width: 540px) {
    .data-table .col-hide-sm { display: none; }
}

/* ── View toggle tabs (public match sections) ────────── */
.view-tabs {
    display: flex;
    gap: .35rem;
    margin-bottom: .75rem;
    flex-wrap: wrap;
}
.view-tab {
    padding: .28rem .8rem;
    border-radius: 99px;
    border: 1px solid var(--border);
    background: var(--card);
    color: var(--muted);
    font-size: .77rem;
    font-weight: 600;
    cursor: pointer;
    transition: background .15s, color .15s, border-color .15s;
    line-height: 1.4;
    font-family: inherit;
}
.view-tab:hover { background: var(--bg); color: var(--text); }
.view-tab.active { background: var(--green); color: #fff; border-color: var(--green); }

/* ── View pane wrapper ───────────────────────────────── */
.view-pane { margin-bottom: 1.25rem; }
.view-pane > .card { margin-bottom: 0; }
.view-pane > .match-group-card:last-child { margin-bottom: 0; }

/* ── Date-grouped match list (By Date view) ──────────── */
.match-date-group.row-hidden { display: none; }
.match-date-header {
    padding: .38rem 1rem;
    font-size: .7rem;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--muted);
    background: var(--bg);
    border-bottom: 1px solid var(--border);
}
.match-date-group:not(:first-child) .match-date-header {
    border-top: 1px solid var(--border);
}

/* Time-only column (replaces date in By-Date view rows) */
.mc-time {
    width: 1px;
    white-space: nowrap;
    font-size: .75rem;
    color: var(--muted);
    padding-left: 1rem;
    padding-right: .4rem;
}
@media (max-width: 360px) { .mc-time { padding-left: .6rem; } }

/* ── Clickable team name in standings ───────────────── */
.td-team-link {
    cursor: pointer;
    color: var(--green);
    text-decoration: underline;
    text-decoration-style: dotted;
    text-underline-offset: 2px;
    font-weight: 500;
}
.td-team-link:hover { color: var(--accent); }

/* ── Team detail view ────────────────────────────────── */
.team-detail-back {
    margin-bottom: 1.25rem;
}
.team-detail-name {
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 1.5rem;
    line-height: 1.25;
}

/* ── Team logo ───────────────────────────────────────── */
.team-logo {
    width: 20px;
    height: 20px;
    object-fit: contain;
    vertical-align: middle;
    flex-shrink: 0;
}
/* home cell: logo sits right of name → adjacent to score */
.mc-home .team-logo { margin-left: .35rem; }
/* away cell: logo sits left of name → adjacent to score */
.mc-away .team-logo { margin-right: .35rem; }
/* standings and team-detail heading */
.td-team-link .team-logo,
.team-detail-name .team-logo {
    margin-right: .4rem;
}
/* larger logo in team detail heading */
.team-detail-name .team-logo {
    width: 32px;
    height: 32px;
}
/* logo in admin teams list */
.team-cell-logo { margin-right: .45rem; }

/* ── Group / Pitch card (By Group & By Pitch views) ──── */
.match-group-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    margin-bottom: .75rem;
}

/* ── Info card stats strip ───────────────────────────── */
.info-stats {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
    align-items: baseline;
}
.info-stats--sep {
    margin-top: .6rem;
    padding-top: .6rem;
    border-top: 1px solid var(--border);
}
.info-stat {
    font-size: .82rem;
    color: var(--muted);
}
.info-stat strong {
    font-weight: 700;
    color: var(--text);
    margin-right: .2rem;
}

/* ── Group roster list (result_ban mode) ─────────────── */
.group-team-list {
    list-style: none;
    padding: 0;
    margin: 0;
}
.group-team-list li {
    display: flex;
    align-items: center;
    gap: .55rem;
    padding: .5rem 1rem;
    border-bottom: 1px solid var(--border);
    font-size: .88rem;
    font-weight: 500;
    color: var(--text);
    transition: background .1s;
}
.group-team-list li:last-child { border-bottom: none; }
.group-team-list .gtl-num {
    width: 18px;
    font-size: .75rem;
    color: var(--muted);
    text-align: center;
    flex-shrink: 0;
}
.group-team-list .team-logo { width: 22px; height: 22px; }
.group-team-list li.row-highlight { background: var(--green-lt); }
.group-team-list li.row-dimmed { opacity: .25; }
