/* Trang chi tiết trận (/tran-dau/…). Tách khỏi style.css để các trang khác nhẹ hơn. */

/* ---------- Trang chi tiết trận ---------- */
.match-card { padding: 18px 20px 20px; }
.match-crumbs { display: flex; flex-wrap: wrap; gap: 4px 6px; margin-bottom: 12px; font-size: 13px; color: var(--c-muted); }
.match-crumbs a { color: var(--c-muted); }
.match-crumbs a:hover { color: var(--c-brand); }
.match-crumbs [aria-current] { color: var(--c-text); }

.match-hero { text-align: center; padding-bottom: 16px; border-bottom: 1px solid var(--c-line); }
.match-league { margin: 0 0 2px; font-size: 13px; color: var(--c-muted); }
.match-title { margin: 0 0 14px; font-size: 1.3rem; }
.match-scoreline { display: grid; grid-template-columns: minmax(0, 1fr) minmax(120px, auto) minmax(0, 1fr); align-items: center; gap: 12px; }
.match-team { display: flex; flex-direction: column; align-items: center; gap: 8px; min-width: 0; }
.match-team img, .match-team .logo-ph { width: 72px; height: 72px; object-fit: contain; }
.match-team-name { font-weight: 700; font-size: 16px; line-height: 1.3; }
.match-center { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.match-score { font-size: 40px; font-weight: 800; line-height: 1.1; letter-spacing: .02em; white-space: nowrap; }
.match-scoreline.is-live .match-score { color: var(--c-live); }
.match-time { font-size: 32px; font-weight: 800; line-height: 1.1; }
.match-date { font-size: 13px; color: var(--c-muted); }
.match-status { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; background: var(--c-soft); font-size: 12.5px; font-weight: 600; color: var(--c-muted); }
.match-status.is-live { background: var(--c-live-soft); color: var(--c-live); }
.match-ht { font-size: 12.5px; color: var(--c-muted); }

/* Thanh tab: cuộn ngang khi không đủ chỗ. */
.match-tabs {
	display: flex; gap: 4px; margin: 16px 0 4px; padding: 4px; border-radius: 10px; background: var(--c-soft);
	overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch;
	position: sticky; top: var(--header-h); z-index: 5; box-shadow: 0 0 0 4px var(--c-card);
}
.admin-bar .match-tabs { top: calc(var(--header-h) + 32px); }
@media (min-width: 768px) {
	.match-tabs { flex-wrap: wrap; overflow: visible; }
}
.match-tabs::-webkit-scrollbar { display: none; }
.match-tabs.more-right { -webkit-mask-image: linear-gradient(to right, #000 82%, transparent); mask-image: linear-gradient(to right, #000 82%, transparent); }
.match-tabs.more-left { -webkit-mask-image: linear-gradient(to left, #000 82%, transparent); mask-image: linear-gradient(to left, #000 82%, transparent); }
.match-tabs.more-left.more-right { -webkit-mask-image: linear-gradient(to right, transparent, #000 14%, #000 86%, transparent); mask-image: linear-gradient(to right, transparent, #000 14%, #000 86%, transparent); }
.match-tab { flex: 0 0 auto; min-height: 38px; padding: 6px 14px; border: 0; border-radius: 8px; background: transparent; font-size: 14px; font-weight: 600; color: var(--c-muted); white-space: nowrap; cursor: pointer; }
.match-tab:hover { color: var(--c-brand); }
.match-tab.is-active { background: var(--c-card); color: var(--c-brand); box-shadow: var(--shadow); }
.match-panel { padding-top: 12px; }
.panel-title { margin: 8px 0 12px; font-size: 1.05rem; }
.has-tabs .panel-title, .has-tabs .subpanel-title { position: absolute; left: -9999px; }
.subpanel-title { margin: 16px 0 8px; font-size: 1rem; }

/* Tab con */
.subtabs { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 14px; }
.subtab { padding: 6px 12px; border: 1px solid var(--c-line); border-radius: 999px; background: var(--c-card); font-size: 13px; font-weight: 600; color: var(--c-muted); cursor: pointer; }
.subtab:hover { border-color: #c9d8f2; color: var(--c-brand); }
.subtab.is-active { background: var(--c-brand); border-color: var(--c-brand); color: #fff; }
.match-empty { margin: 12px 0; padding: 18px; border-radius: var(--radius-sm); background: var(--c-soft); color: var(--c-muted); text-align: center; font-size: 14px; }

/* Diễn biến: đội nhà bên trái, đội khách bên phải, phút ở giữa. */
.match-events { margin: 0; padding: 0; list-style: none; }
.ev { display: grid; grid-template-columns: minmax(0, 1fr) 52px minmax(0, 1fr); align-items: center; min-height: 44px; padding: 6px 0; border-bottom: 1px solid var(--c-line-soft); }
.ev-min { grid-column: 2; grid-row: 1; justify-self: center; min-width: 40px; padding: 2px 6px; border-radius: 999px; background: var(--c-soft); font-size: 12.5px; font-weight: 700; text-align: center; }
.ev-icon { display: inline-flex; align-items: center; gap: 2px; color: var(--c-text); }
.ev-body { display: flex; flex-direction: column; min-width: 0; line-height: 1.3; }
.ev-player { font-weight: 600; font-size: 14px; }
.ev-sub-text { color: var(--c-muted); font-size: 12px; }
.ev-res { margin-right: 2px; color: var(--c-brand); }
.ev.ev-home .ev-icon, .ev.ev-home .ev-body { grid-column: 1; grid-row: 1; }
.ev.ev-home { text-align: right; }
.ev.ev-home .ev-icon { justify-self: end; }
.ev.ev-home .ev-body { padding-right: 28px; align-items: flex-end; }
.ev.ev-away .ev-icon, .ev.ev-away .ev-body { grid-column: 3; grid-row: 1; }
.ev.ev-away .ev-icon { justify-self: start; }
.ev.ev-away .ev-body { padding-left: 28px; }
.ev-goal .ev-icon { color: var(--c-brand); }
.ev-own .ev-icon, .ev-miss .ev-icon { color: var(--c-live); }
.ev-sep { display: flex; justify-content: center; padding: 10px 0; border-bottom: 1px solid var(--c-line-soft); }
.ev-sep span { padding: 3px 12px; border-radius: 999px; background: var(--c-brand-soft); color: var(--c-brand); font-size: 12.5px; font-weight: 700; }
.ev-card { display: inline-block; width: 11px; height: 15px; border-radius: 2px; vertical-align: middle; }
.ev-card.yellow { background: #f5c518; }
.ev-card.red { background: var(--c-live); }
.match-team .ev-card { width: auto; min-width: 16px; height: 20px; padding: 0 4px; color: #fff; font-size: 12px; font-weight: 700; line-height: 20px; }
.ev-sub { color: #16a34a; font-weight: 700; }
.ev-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--c-muted); }

/* Thống kê */
.match-stats { display: grid; gap: 14px; padding: 4px 0; }
.stat-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin-bottom: 5px; font-size: 14px; }
.stat-head span { color: var(--c-muted); font-size: 13px; text-align: center; }
.stat-head b { min-width: 40px; }
.stat-head b:last-child { text-align: right; }
.stat-head b.lead { color: var(--c-brand); }
.stat-bar { display: flex; gap: 4px; height: 6px; }
.stat-bar span { display: block; height: 100%; border-radius: 999px; background: #d5dbe6; }
.stat-bar .h { margin-left: auto; }
.stat-bar span.lead { background: var(--c-brand); }

/* Đội hình */
.match-lineup { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.lineup-side { min-width: 0; padding: 12px; border: 1px solid var(--c-line); border-radius: var(--radius-sm); }
.lineup-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding-bottom: 8px; margin-bottom: 4px; border-bottom: 1px solid var(--c-line); }
.lineup-formation { padding: 2px 8px; border-radius: 999px; background: var(--c-brand-soft); color: var(--c-brand); font-size: 12.5px; font-weight: 700; }
.lineup-pos { margin: 10px 0 4px; color: var(--c-muted); font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .03em; }
.lineup-group ul { margin: 0; padding: 0; list-style: none; }
.lineup-group li { display: flex; align-items: center; gap: 8px; padding: 5px 0; font-size: 14px; }
.pl-num { flex: 0 0 26px; height: 22px; border-radius: 6px; background: var(--c-soft); font-size: 12px; font-weight: 700; line-height: 22px; text-align: center; }
.pl-name { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pl-flags { display: inline-flex; align-items: center; gap: 3px; color: var(--c-brand); }
.pl-og { color: var(--c-live); }
.pl-out { color: var(--c-live); font-weight: 700; }
.pl-in { color: #16a34a; font-weight: 700; }
.lineup-coach { margin: 10px 0 0; padding-top: 8px; border-top: 1px solid var(--c-line); font-size: 13.5px; color: var(--c-muted); }
.lineup-coach b { color: var(--c-text); }

/* Phân tích */
.an-block + .an-block { margin-top: 20px; }
.an-title { margin: 0 0 10px; font-size: 1rem; }
.an-note { margin: 6px 0 0; color: var(--c-muted); font-size: 13px; }
.h2h-summary { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; text-align: center; }
.h2h-summary div { display: flex; flex-direction: column; padding: 10px 6px; border-radius: var(--radius-sm); background: var(--c-soft); }
.h2h-summary b { font-size: 22px; }
.h2h-summary span { font-size: 12.5px; color: var(--c-muted); }
.h2h-bar { display: flex; gap: 3px; height: 8px; margin-top: 10px; }
.h2h-bar span { border-radius: 999px; }
.h2h-bar .w { background: var(--c-brand); }
.h2h-bar .d { background: #b8c0cf; }
.h2h-bar .l { background: #f59e0b; }
.mrows { border: 1px solid var(--c-line); border-radius: var(--radius-sm); overflow: hidden; }
.mrow { display: grid; grid-template-columns: 78px minmax(0, 1fr) 20px 52px 20px minmax(0, 1fr) auto; align-items: center; column-gap: 8px; padding: 8px 12px; border-bottom: 1px solid var(--c-line-soft); color: var(--c-text); font-size: 13.5px; }
.mrow:last-child { border-bottom: 0; }
.mrow:hover { background: #fafcff; text-decoration: none; }
.mrow img, .mrow .logo-ph { width: 20px; height: 20px; object-fit: contain; }
.mrow-date { display: flex; flex-direction: column; color: var(--c-muted); font-size: 12px; line-height: 1.3; }
.mrow-date small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11px; }
.mrow-team { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mrow-team.home { text-align: right; }
.mrow-score { font-weight: 700; text-align: center; white-space: nowrap; }
.form-badge { display: inline-block; flex: 0 0 auto; width: 22px; height: 22px; border-radius: 6px; background: #b8c0cf; color: #fff; font-size: 12px; font-weight: 700; line-height: 22px; text-align: center; }
.form-badge.is-w { background: #16a34a; }
.form-badge.is-l { background: var(--c-live); }
.form-badge.is-d { background: #f59e0b; }
.table-wrap { overflow-x: auto; }
.table-wrap + .table-wrap { margin-top: 10px; }
.an-table { margin: 0; font-size: 13.5px; text-align: center; }
.an-table caption { padding: 0 0 6px; font-weight: 700; text-align: left; }
.an-table tbody th { background: none; font-weight: 600; text-align: left; white-space: nowrap; }
.next-list { margin: 0; padding: 0; list-style: none; border: 1px solid var(--c-line); border-radius: var(--radius-sm); }
.next-list li + li { border-top: 1px solid var(--c-line-soft); }
.next-list a { display: grid; grid-template-columns: 86px minmax(0, 1fr); column-gap: 10px; padding: 8px 12px; color: var(--c-text); font-size: 13.5px; }
.next-list a:hover { background: #fafcff; text-decoration: none; }
.next-date { grid-row: span 2; color: var(--c-muted); font-size: 12.5px; }
.next-name { font-weight: 600; }
.next-list small { color: var(--c-muted); font-size: 12px; }

/* Cột phải trang trận */
.match-info { display: grid; gap: 0; margin: 0; }
.match-info div { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--c-line-soft); font-size: 14px; }
.match-info dt { color: var(--c-muted); white-space: nowrap; }
.match-info dd { margin: 0; text-align: right; font-weight: 600; }
.match-intro { margin: 12px 0 0; color: var(--c-muted); font-size: 13.5px; }
.league-links { margin: 0; padding: 0; list-style: none; }
.league-links li + li { border-top: 1px solid var(--c-line-soft); }
.league-links a { display: flex; align-items: center; gap: 10px; padding: 10px 0; color: var(--c-text); font-size: 14px; }
.league-links a span { flex: 1 1 auto; }
.league-links a svg:first-child { color: var(--c-brand); }
.league-links a:hover { color: var(--c-brand); text-decoration: none; }

@media (max-width: 767px) {
	.match-card { padding: 14px 12px; }
	.match-title { font-size: 1.1rem; }
	.match-scoreline { grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: 6px; }
	.match-team img, .match-team .logo-ph { width: 52px; height: 52px; }
	.match-team-name { font-size: 14px; }
	.match-score { font-size: 32px; }
	.match-time { font-size: 26px; }
	.match-tab { min-height: 36px; padding: 6px 12px; font-size: 13px; }
	.subtab { padding: 5px 10px; font-size: 12.5px; }
	.odds-hist .eu-odds, .odds-hist th:nth-child(6), .odds-hist td:nth-child(6) { display: none; }
	.ev { grid-template-columns: minmax(0, 1fr) 44px minmax(0, 1fr); }
	.ev.ev-home .ev-body { padding-right: 22px; }
	.ev.ev-away .ev-body { padding-left: 22px; }
	.ev-player { font-size: 13px; }
	.match-lineup { grid-template-columns: 1fr; }
	.mrow { grid-template-columns: 58px minmax(0, 1fr) 18px 40px 18px minmax(0, 1fr) auto; column-gap: 5px; padding: 8px; font-size: 12.5px; }
	.mrow img, .mrow .logo-ph { width: 18px; height: 18px; }
	.form-badge { width: 20px; height: 20px; line-height: 20px; font-size: 11px; }
}

/* ---------- Trang trận: các tab phân tích ---------- */
.match-empty.is-inline { margin: 0 0 14px; padding: 12px; text-align: left; }
.an-table.is-left td, .an-table.is-left th { text-align: left; }
.an-table.is-compact { font-size: 12.5px; }
.an-table.is-compact td, .an-table.is-compact th { padding: 6px 4px; }
.an-table thead th { font-size: 12.5px; font-weight: 600; color: var(--c-muted); white-space: nowrap; }
.an-table thead th small { font-weight: 400; }
.tag-out { display: inline-block; padding: 1px 8px; border-radius: 999px; background: var(--c-live-soft); color: var(--c-live); font-size: 12.5px; }
.plain-list { margin: 0; padding: 0; list-style: none; }
.plain-list.cols-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 16px; }
.plain-list li { display: flex; align-items: center; gap: 8px; padding: 5px 0; border-bottom: 1px solid var(--c-line-soft); font-size: 14px; min-width: 0; }

.rating-avg { display: flex; align-items: baseline; gap: 8px; margin-bottom: 10px; }
.rating-avg b { font-size: 28px; color: var(--c-brand); }
.rating-avg span { color: var(--c-muted); font-size: 13px; }
.rating-bars { display: grid; grid-template-columns: repeat(10, minmax(0, 1fr)); align-items: end; gap: 6px; height: 110px; }
.rating-bar { position: relative; height: var(--h); min-height: 18px; border-radius: 6px 6px 2px 2px; background: var(--c-brand-soft); }
.rating-bar:last-child { background: var(--c-brand); }
.rating-bar b { position: absolute; top: -18px; left: 0; right: 0; font-size: 11px; text-align: center; color: var(--c-text); }
.rating-pill { display: inline-block; min-width: 36px; padding: 2px 6px; border-radius: 6px; background: var(--c-soft); font-weight: 700; text-align: center; }
.rating-pill.is-good { background: #dcfce7; color: #15803d; }
.rating-pill.is-high { background: #16a34a; color: #fff; }

.sum-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin-bottom: 12px; }
.sum-grid div { display: flex; flex-direction: column; gap: 2px; padding: 10px; border-radius: var(--radius-sm); background: var(--c-soft); }
.sum-grid span { font-size: 12px; color: var(--c-muted); }
.sum-grid b { font-size: 14px; }
.odds-hist td, .odds-hist th { font-size: 13px; vertical-align: middle; }
.odds-hist tbody th { font-weight: 400; color: var(--c-muted); white-space: nowrap; }
.om-match { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 4px; color: var(--c-text); text-align: left; }
.om-match:hover { text-decoration: none; color: var(--c-brand); }
.om-match .is-giver { font-weight: 700; text-decoration: underline; text-decoration-color: var(--c-brand); text-underline-offset: 3px; }
.om-match small { flex: 0 0 100%; color: var(--c-muted); font-size: 11.5px; }
.eu-odds { white-space: nowrap; color: var(--c-muted); }
.odds-now td { white-space: nowrap; }
.odds-now td b { display: inline-block; min-width: 44px; margin: 0 4px; color: var(--c-brand); }

.seq { display: inline-flex; flex-wrap: wrap; gap: 3px; }
.form-badge.is-wide { width: auto; padding: 0 6px; }
.form-badge.is-sm { width: 18px; height: 18px; border-radius: 4px; font-size: 10.5px; line-height: 18px; }
.seq-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 10px; font-size: 13px; }
.seq-row > span:first-child { min-width: 150px; color: var(--c-muted); }
.seq-row em { font-style: normal; font-weight: 700; }
.mini-bar { display: inline-block; width: 60px; height: 6px; border-radius: 999px; background: var(--c-soft); vertical-align: middle; overflow: hidden; }
.mini-bar span { display: block; height: 100%; background: var(--c-brand); }

.prob-row { display: grid; grid-template-columns: minmax(110px, 1fr) 2fr 56px; align-items: center; gap: 10px; padding: 8px 0; font-size: 14px; }
.prob-row b { text-align: right; }
.prob-bar { height: 10px; border-radius: 999px; background: var(--c-soft); overflow: hidden; }
.prob-bar span { display: block; height: 100%; border-radius: 999px; }
.prob-bar.is-w span { background: var(--c-brand); }
.prob-bar.is-d span { background: #b8c0cf; }
.prob-bar.is-l span { background: #f59e0b; }

.rank-table td, .rank-table th { padding: 7px 5px; font-size: 13px; }
.rank-table tbody th { width: 34px; }
.rank-no { display: inline-block; min-width: 22px; height: 22px; padding: 0 4px; border-radius: 6px; background: var(--c-soft); font-weight: 700; font-size: 12px; line-height: 22px; text-align: center; }
.rank-no.color-1 { background: #1766d6; color: #fff; }
.rank-no.color-2 { background: #f59e0b; color: #fff; }
.rank-no.color-3 { background: #16a34a; color: #fff; }
.rank-no.color-4 { background: #7c3aed; color: #fff; }
.rank-no.color-5 { background: #0891b2; color: #fff; }
.rank-no.color-r { background: var(--c-live); color: #fff; }
.rank-team { display: flex; align-items: center; gap: 6px; text-align: left; white-space: nowrap; }
.rank-team img, .rank-team .logo-ph { width: 20px; height: 20px; object-fit: contain; }
.rank-team.is-mine { font-weight: 700; color: var(--c-brand); }
.rank-table tr:has(.is-mine) { background: var(--c-brand-soft); }
.rank-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 10px 0 0; padding: 0; list-style: none; font-size: 12.5px; color: var(--c-muted); }
.rank-legend li { display: flex; align-items: center; gap: 6px; }
.rank-legend .rank-no { min-width: 12px; width: 12px; height: 12px; padding: 0; border-radius: 3px; }

@media (max-width: 767px) {
	.sum-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.plain-list.cols-2 { grid-template-columns: 1fr; }
	.rating-bars { gap: 3px; height: 90px; }
	.rating-bar b { font-size: 10px; }
	.prob-row { grid-template-columns: 1fr 1.4fr 48px; font-size: 13px; }
	.seq-row > span:first-child { min-width: 0; flex: 0 0 100%; }
	.odds-hist td, .odds-hist th { padding: 6px 4px; font-size: 12px; }
}

