/*
Theme Name: Lichbongda
Theme URI: https://lichbongda.site/
Description: Giao diện nhẹ, ưu tiên mobile cho Lichbongda.site. Tương thích League Manager.
Version: 2.3.2
Requires at least: 6.5
Requires PHP: 8.1
Text Domain: lichbongda
License: GPLv2 or later
*/

/* ---------- Tokens ---------- */
:root {
	--c-brand: #1766d6;
	--c-brand-dark: #0f4fae;
	--c-brand-soft: #eaf2fe;
	--c-live: #e5322d;
	--c-live-soft: #fdeceb;
	--c-text: #172033;
	--c-muted: #6b7489;
	--c-line: #e7ebf2;
	--c-line-soft: #eff2f7;
	--c-soft: #f5f7fb;
	--c-page: #f3f5f9;
	--c-card: #fff;
	--radius: 12px;
	--radius-sm: 8px;
	--shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 1px 3px rgba(16, 24, 40, .04);
	--header-h: 76px;
	--gap: 16px;
	--font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 12px); }
body {
	margin: 0;
	font: 15px/1.55 var(--font);
	color: var(--c-text);
	background: var(--c-page);
	overflow-wrap: break-word;
}
img, svg, video { max-width: 100%; height: auto; }
svg.icon { flex: 0 0 auto; }
a { color: var(--c-brand); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { line-height: 1.3; margin: 1.2em 0 .5em; }
h1 { font-size: 1.5rem; }
h2 { font-size: 1.25rem; }
h3 { font-size: 1.08rem; }
p, ul, ol, table { margin: 0 0 1em; }
hr { border: 0; border-top: 1px solid var(--c-line); margin: 20px 0; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 6px 8px; border-bottom: 1px solid var(--c-line); }
th { background: var(--c-soft); font-weight: 600; }
button { font: inherit; color: inherit; }
[hidden] { display: none !important; }

.skip-link, .screen-reader-text { position: absolute; left: -9999px; }
.skip-link:focus { left: 8px; top: 8px; z-index: 100000; background: #fff; padding: 8px 12px; }
.button {
	display: inline-flex; align-items: center; justify-content: center; gap: 6px;
	padding: 9px 18px; border: 0; border-radius: var(--radius-sm); cursor: pointer;
	background: var(--c-brand); color: #fff; font-weight: 600;
}
.button:hover { background: var(--c-brand-dark); text-decoration: none; }

.container { width: 100%; max-width: 1080px; margin: 0 auto; padding: 0 var(--gap); }
.lbd-card { background: var(--c-card); border: 1px solid var(--c-line); border-radius: var(--radius); box-shadow: var(--shadow); }

/* ---------- Header ---------- */
.site-header {
	position: sticky; top: 0; z-index: 1000;
	background: #fff; border-bottom: 1px solid var(--c-line);
}
.admin-bar .site-header { top: 32px; }
.header-inner { display: flex; align-items: stretch; height: var(--header-h); gap: 24px; }

.brand { display: flex; flex-direction: column; justify-content: center; flex: 0 0 auto; min-width: 0; }
.site-logo { display: flex; align-items: center; }
.site-logo-img { display: block; width: auto; height: 40px; max-width: 220px; object-fit: contain; }
.site-logo-text { font-weight: 800; font-size: 1.4rem; color: var(--c-brand); }
.brand-tagline { margin: 2px 0 0; font-size: 11.5px; line-height: 1.2; color: var(--c-muted); white-space: nowrap; }

.primary-nav { margin: 0 auto; display: flex; }
.primary-nav .menu { display: flex; list-style: none; margin: 0; padding: 0; gap: 4px; }
.primary-nav .menu > li { display: flex; }
.primary-nav .menu a {
	position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px;
	padding: 0 16px; color: #3a4357; font-size: 13.5px; font-weight: 500; white-space: nowrap;
}
.primary-nav .menu a .icon { color: #5a6378; }
.primary-nav .menu a:hover { color: var(--c-brand); text-decoration: none; }
.primary-nav .menu a:hover .icon { color: var(--c-brand); }
.primary-nav .current-menu-item > a,
.primary-nav .current_page_item > a,
.primary-nav .current-menu-item > a .icon,
.primary-nav .current_page_item > a .icon { color: var(--c-brand); font-weight: 600; }
.primary-nav .current-menu-item > a::after,
.primary-nav .current_page_item > a::after {
	content: ""; position: absolute; left: 12px; right: 12px; bottom: -1px; height: 3px;
	border-radius: 3px 3px 0 0; background: var(--c-brand);
}

.header-actions { display: flex; align-items: center; gap: 8px; flex: 0 0 auto; }
.icon-btn {
	display: inline-flex; align-items: center; justify-content: center;
	width: 42px; height: 42px; border: 1px solid var(--c-line); border-radius: 10px;
	background: #fff; color: #3a4357; cursor: pointer;
}
.icon-btn:hover, .icon-btn[aria-expanded="true"] { color: var(--c-brand); border-color: #c9d8f2; }
.nav-toggle { display: none; }
.nav-toggle-bar, .nav-toggle-bar::before, .nav-toggle-bar::after {
	display: block; width: 18px; height: 2px; background: currentColor; border-radius: 2px; position: relative;
}
.nav-toggle-bar::before, .nav-toggle-bar::after { content: ""; position: absolute; left: 0; }
.nav-toggle-bar::before { top: -6px; }
.nav-toggle-bar::after { top: 6px; }

.header-search { border-top: 1px solid var(--c-line); background: #fff; }
.search-form { display: flex; gap: 8px; padding-top: 12px; padding-bottom: 12px; }
.search-form input[type="search"] {
	flex: 1; min-width: 0; height: 42px; padding: 0 14px; font: inherit;
	border: 1px solid var(--c-line); border-radius: 10px; background: var(--c-soft);
}
.search-form input[type="search"]:focus { outline: 2px solid var(--c-brand-soft); border-color: var(--c-brand); background: #fff; }

/* ---------- Layout ---------- */
.site-content { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 20px; padding-top: 20px; padding-bottom: 40px; }
.content-area { flex: 1 1 0; min-width: 0; }
.widget-area { flex: 0 0 320px; width: 320px; }
.content-full { flex-basis: 100%; }

/* Trang thường: nội dung nằm trong thẻ card. */
.site-main > .entry, .site-main > .lich-giai, .site-main > .ketqua-giai, .site-main > .entry-header, .site-main > .post-list {
	background: var(--c-card); border: 1px solid var(--c-line); border-radius: var(--radius); box-shadow: var(--shadow);
	padding: 20px;
}
.site-main > .entry-header { margin-bottom: 16px; }

/* ---------- Entry ---------- */
.entry-header { margin-bottom: 14px; }
.entry-title, .page-title { margin: 0 0 6px; font-size: 1.45rem; font-weight: 700; }
.entry-meta, .card-meta { color: var(--c-muted); font-size: 13px; margin: 0; }
.entry-content > :first-child { margin-top: 0; }
.entry-content img { border-radius: var(--radius-sm); }
.entry-content figure { margin: 0 0 1em; }
.entry-content figure.wp-block-image, .entry-content figure.wp-block-image img { display: block; margin-left: auto; margin-right: auto; }
.entry-thumb { margin: 0 0 16px; }
.entry-tags a {
	display: inline-block; margin: 0 6px 6px 0; padding: 2px 10px;
	background: var(--c-soft); border-radius: 99px; font-size: 13px; color: var(--c-muted);
}
.rank-math-breadcrumb { font-size: 13px; color: var(--c-muted); margin-bottom: 10px; }
.rank-math-breadcrumb p { margin: 0; }
.archive-desc { color: var(--c-muted); }

/* Danh sách bài viết */
.post-list { display: grid; gap: 16px; }
.card-body { min-width: 0; }
.post-list .post-card { display: flex; gap: 14px; padding: 0 0 16px; border: 0; border-bottom: 1px solid var(--c-line); border-radius: 0; box-shadow: none; }
.card-thumb { flex: 0 0 200px; }
.card-thumb img { display: block; width: 200px; aspect-ratio: 16 / 9; object-fit: cover; border-radius: var(--radius-sm); }
.card-title { margin: 0 0 4px; font-size: 1.05rem; }
.card-title a { color: var(--c-text); }
.card-excerpt { margin: 6px 0 0; color: var(--c-muted); font-size: 14px; }
.nav-links { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 20px; }
.nav-links .page-numbers { padding: 6px 12px; border: 1px solid var(--c-line); border-radius: var(--radius-sm); background: #fff; }
.nav-links .current { background: var(--c-brand); border-color: var(--c-brand); color: #fff; }

/* ---------- Sidebar (trang thường) ---------- */
.widget {
	margin-bottom: 20px; padding: 16px; font-size: 14px;
	background: var(--c-card); border: 1px solid var(--c-line); border-radius: var(--radius); box-shadow: var(--shadow);
}
.widget-title { margin: 0 0 12px; font-size: 1rem; font-weight: 700; }
.widget ul { padding-left: 0; list-style: none; }
.widget .lm-popular-block { margin: 0 0 16px; padding: 0; background: none; border: 0; }
.widget .lm-popular-block h3 { margin: 0 0 8px; font-size: 1rem; }
.site .widget .lm-popular-list { padding-left: 0; margin: 0; }
.site .widget .lm-popular-list li { list-style: none !important; margin: 0 !important; border-bottom: 1px solid var(--c-line-soft); }
.widget .lm-popular-list a { display: block; padding: 8px 2px; color: var(--c-text); }
.widget .lm-popular-list a:hover { color: var(--c-brand); text-decoration: none; }
.widget .lm-country-header { border-radius: var(--radius-sm); }

/* ---------- Footer ---------- */
.site-footer { background: #fff; border-top: 1px solid var(--c-line); font-size: 14px; }
.footer-widgets { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 24px; padding-top: 24px; }
.footer-widgets .widget { padding: 0; border: 0; box-shadow: none; background: none; }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px 24px; padding-top: 18px; padding-bottom: 18px; }
.footer-menu { display: flex; flex-wrap: wrap; gap: 4px 18px; list-style: none; margin: 0; padding: 0; }
.footer-menu a { color: var(--c-muted); }
.site-info { margin: 0; color: var(--c-muted); }

/* =========================================================
   TRANG CHỦ
   ========================================================= */

/* ---------- Thanh chọn ngày ---------- */
.home-datebar { flex: 0 0 100%; display: flex; gap: 16px; align-items: stretch; min-width: 0; }
.datebar-days {
	flex: 1 1 auto; min-width: 0; overflow-x: auto; scrollbar-width: none;
	background: #fff; border: 1px solid var(--c-line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 6px;
}
.datebar-days::-webkit-scrollbar { display: none; }
.site .home-datebar .lm-fixtures-nav, .site .home-datebar .lm-results-nav { display: flex; flex-wrap: nowrap; gap: 0; margin: 0; }
.site .home-datebar .lm-date-btn {
	position: relative; flex: 1 0 auto; min-width: 92px; display: flex; flex-direction: column; align-items: center; justify-content: center;
	padding: 8px 12px; background: none; border-radius: var(--radius-sm); cursor: pointer; color: var(--c-text); line-height: 1.25;
}
.site .home-datebar .lm-date-btn + .lm-date-btn::before {
	content: ""; position: absolute; left: 0; top: 22%; bottom: 22%; width: 1px; background: var(--c-line);
}
.site .home-datebar .lm-date-btn b { font-size: 13.5px; font-weight: 600; }
.site .home-datebar .lm-date-btn small { font-size: 12px; color: var(--c-muted); }
.site .home-datebar .lm-date-btn:hover { background: var(--c-soft); }
.site .home-datebar .lm-date-btn.active { background: var(--c-brand); color: #fff; }
.site .home-datebar .lm-date-btn.active small { color: rgba(255, 255, 255, .85); }
.site .home-datebar .lm-date-btn.active::before, .site .home-datebar .lm-date-btn.active + .lm-date-btn::before { display: none; }

.date-pick {
	position: relative; flex: 0 0 auto; display: flex; align-items: center; gap: 10px;
	padding: 0 16px; background: #fff; border: 1px solid var(--c-line); border-radius: var(--radius); box-shadow: var(--shadow);
	font-size: 14px; font-weight: 500; cursor: pointer; white-space: nowrap;
}
.date-pick:hover { border-color: #c9d8f2; }
.date-pick.active { border-color: var(--c-brand); color: var(--c-brand); }
.date-pick input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; border: 0; padding: 0; }

/* ---------- Thẻ lịch hôm nay ---------- */
.home-card { padding: 18px; }
.card-head { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.card-head .entry-title { margin: 0; font-size: 1.3rem; }
.card-icon {
	display: inline-flex; align-items: center; justify-content: center; flex: 0 0 30px; height: 30px;
	border-radius: 8px; background: var(--c-brand); color: #fff;
}

.status-tabs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-bottom: 16px; }
.status-tab {
	display: flex; align-items: center; justify-content: center; gap: 6px; min-height: 40px; padding: 6px 10px;
	border: 1px solid var(--c-line); border-radius: var(--radius-sm); background: var(--c-soft);
	font-size: 13.5px; font-weight: 500; color: #3a4357; cursor: pointer; white-space: nowrap;
}
.status-tab:hover { border-color: #c9d8f2; color: var(--c-brand); }
.status-tab.is-active { background: var(--c-brand); border-color: var(--c-brand); color: #fff; }
.status-tab .count { font-weight: 400; }
.live-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--c-live); flex: 0 0 8px; }
.status-tab.is-active .live-dot { background: #fff; }

.home-card .entry-content > hr:first-of-type { display: none; }
#lm-fixtures-container, #lm-results-container { transition: opacity .15s; }
#lm-fixtures-container.is-loading, #lm-results-container.is-loading { opacity: .45; pointer-events: none; }
.lbd-filter-empty, .site .lm-empty { padding: 28px 12px; text-align: center; color: var(--c-muted); background: var(--c-soft); border-radius: var(--radius-sm); }

/* ---------- Khối giải & dòng trận (dùng chung mọi trang) ---------- */
.site .lm-league-block, .site .lm-date-block {
	margin: 0 0 16px; border: 1px solid var(--c-line); border-radius: var(--radius); overflow: hidden; background: #fff;
}
.site .lm-fixtures-all, .site .lm-results-all, .site .lm-fixtures { font-size: 14px; }
.block-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--c-line); }
.site .lm-league-block h3, .site .lm-date-block h3 {
	display: flex; align-items: center; gap: 12px; margin: 0 !important; padding: 0; background: none;
	font-size: 16px !important; font-weight: 700; color: var(--c-text); border-radius: 0;
}
.site .lm-date-block h3 { padding: 10px 16px; background: var(--c-soft); font-size: 14px !important; }
.site .lm-league-block > h3 { padding: 12px 16px; border-bottom: 1px solid var(--c-line); }
.site .lm-league-block h3 img { float: none; width: 32px; height: 32px; margin: 0; object-fit: contain; flex: 0 0 32px; }
.block-more { display: inline-flex; align-items: center; gap: 2px; font-size: 13px; white-space: nowrap; }

.site .lm-match {
	display: grid; grid-template-columns: 84px minmax(0, 1fr) 72px minmax(0, 1fr);
	align-items: center; column-gap: 12px; min-height: 46px; padding: 6px 16px;
	border-bottom: 1px solid var(--c-line-soft);
}
.site .lm-match:last-child { border-bottom: 0; }
.site .lm-match:hover { background: #fafcff; }
.site .lm-time { width: auto; display: flex; flex-wrap: wrap; align-items: center; gap: 2px 6px; min-width: 0; font-weight: 500; color: var(--c-text); font-size: 13.5px; }
.site .lm-match.is-ft .lm-time, .site .lm-match.is-other .lm-time { color: var(--c-muted); }
/* Vòng / bảng đấu (trang Kết quả): dòng nhỏ dưới giờ. */
.site .lm-round { float: none; display: block; flex: 0 0 100%; max-width: 100%; margin: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--c-muted); font-size: 11px; font-weight: 400; }
.live-pill {
	display: inline-flex; align-items: center; gap: 4px; padding: 2px 6px; border-radius: 4px;
	background: var(--c-live); color: #fff; font-size: 10.5px; font-weight: 700; letter-spacing: .02em; line-height: 1.3;
}
.live-pill::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: #fff; }
.live-min { color: var(--c-live); font-weight: 700; }

.site .lm-team { display: flex; align-items: center; gap: 10px; min-width: 0; color: var(--c-text); }
.site .lm-team.lm-home { justify-content: flex-end; text-align: right; }
.site .lm-team img, .site .lm-team.lm-home img, .site .lm-away img {
	float: none; width: 26px; height: 26px; flex: 0 0 26px; margin: 0 !important; object-fit: contain;
}
.site .lm-score { width: auto; text-align: center; font-weight: 700; font-size: 16px; letter-spacing: .02em; color: var(--c-text); white-space: nowrap; }
.site .lm-match.is-live .lm-score { color: var(--c-live); }
.site .lm-match.is-up .lm-score { color: #a2a9b8; font-weight: 600; }
.site .lm-match .card { display: inline-block; margin-left: 4px; padding: 1px 3px; border: 0; border-radius: 2px; box-shadow: none; font-size: 10px; line-height: 1.1; }

/* Lọc theo trạng thái */
.lm-fixtures-all[data-filter="live"] .lm-match:not(.is-live),
.lm-fixtures-all[data-filter="up"] .lm-match:not(.is-up),
.lm-fixtures-all[data-filter="ft"] .lm-match:not(.is-ft),
.lm-results-all[data-filter="live"] .lm-match:not(.is-live),
.lm-results-all[data-filter="up"] .lm-match:not(.is-up),
.lm-results-all[data-filter="ft"] .lm-match:not(.is-ft) { display: none; }

/* Menu trong trang giải (Lịch / Kết quả / BXH / Kèo) */
.site .lm-league-menu { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 18px; }
.site .lm-league-menu a { margin: 0; padding: 7px 14px; border-radius: var(--radius-sm); background: var(--c-soft); color: #3a4357; font-size: 14px; border: 1px solid var(--c-line); }
.site .lm-league-menu a.active { background: var(--c-brand); border-color: var(--c-brand); color: #fff; }

/* Nút ngày ở trang Kết quả (không phải trang chủ) */
.site .lm-fixtures-nav, .site .lm-results-nav { gap: 8px; }
.site .lm-date-btn { border-radius: var(--radius-sm); }
.site .lm-date-btn.active { background: var(--c-brand); color: #fff; }

/* ---------- Bảng xếp hạng ---------- */
/* Thanh "Xem nhanh BXH" (plugin in style nội tuyến nên cần !important). */
.site .lm-ranking-filter {
	display: flex !important; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
	text-align: left !important; margin: 0 0 14px !important; padding: 12px 14px;
	background: var(--c-soft); border: 1px solid var(--c-line); border-radius: var(--radius);
}
.site .lm-ranking-filter h2 { display: flex; align-items: center; gap: 8px; margin: 0 !important; font-size: 15px !important; font-weight: 600 !important; color: var(--c-text); }
.site .lm-ranking-filter h2::before, .site .lm-ranking-links h2::before, .site .entry-content > h2::before {
	content: ""; flex: 0 0 4px; width: 4px; height: 18px; border-radius: 2px; background: var(--c-brand);
}
.site #lm-ranking-select {
	appearance: none; -webkit-appearance: none; min-width: 220px; height: 40px; padding: 0 38px 0 14px;
	font: inherit; font-size: 14px; font-weight: 500; color: var(--c-text); cursor: pointer;
	background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%236b7489' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9.5l6 6 6-6'/%3E%3C/svg%3E") no-repeat right 12px center;
	border: 1px solid var(--c-line); border-radius: var(--radius-sm);
}
.site #lm-ranking-select:hover, .site #lm-ranking-select:focus { border-color: var(--c-brand); outline: 0; }

/* Bảng + chú thích màu bên dưới. */
.site .lm-ranking { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 18px; margin-bottom: 18px; }
.site .lm-ranking > * { flex: 0 0 100%; min-width: 0; }
.site .lm-ranking::before, .site .lm-ranking::after {
	order: 2; flex: 0 0 auto; padding-left: 16px; font-size: 12.5px; color: var(--c-muted); background: no-repeat 0 50% / 10px 10px;
}
.site .lm-ranking::before { content: "Top 4 (dự cúp châu lục)"; background-image: radial-gradient(circle, var(--c-brand) 4px, transparent 4.5px); }
.site .lm-ranking::after { content: "Nhóm cuối bảng"; background-image: radial-gradient(circle, var(--c-live) 4px, transparent 4.5px); }

.site .lm-ranking-block { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 0 0 16px; background: #fff; border: 1px solid var(--c-line); border-radius: var(--radius); }
.site .lm-ranking .lm-ranking-block { margin-bottom: 0; }
.site .lm-table-ranking { margin: 0; font-size: 14px; font-variant-numeric: tabular-nums; border-collapse: collapse; }
.site .lm-table-ranking th {
	padding: 10px 8px; background: var(--c-soft); color: var(--c-muted); border-bottom: 1px solid var(--c-line);
	font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .03em; text-align: center;
}
.site .lm-table-ranking th:nth-child(2) { text-align: left; }
.site .lm-table-ranking td { padding: 9px 8px; border-bottom: 1px solid var(--c-line-soft); text-align: center; color: #3a4357; }
.site .lm-table-ranking tbody tr:last-child td { border-bottom: 0; }
.site .lm-table-ranking tbody tr:hover td { background: #f7faff; }
/* Plugin tự tô nền rank-top / rank-relegation không nhất quán: giao diện dùng vạch màu ở cột hạng. */
.site .lm-table-ranking .rank-top, .site .lm-table-ranking .rank-relegation { background: none; }
.site .lm-table-ranking td:first-child { position: relative; width: 44px; font-weight: 600; color: var(--c-muted); }
.site .lm-table-ranking tbody td:first-child::before {
	content: ""; position: absolute; left: 0; top: 6px; bottom: 6px; width: 3px; border-radius: 0 3px 3px 0; background: transparent;
}
.site .lm-table-ranking tbody tr.rank-top td:first-child { color: var(--c-brand); }
.site .lm-table-ranking tbody tr.rank-top td:first-child::before { background: var(--c-brand); }
/* 3 đội cuối – chỉ với bảng giải VĐQG (từ 10 đội), không áp cho bảng đấu cúp. */
.site .lm-table-ranking tbody:has(tr:nth-child(10)) tr:nth-last-child(-n+3) td:first-child { color: var(--c-live); }
.site .lm-table-ranking tbody:has(tr:nth-child(10)) tr:nth-last-child(-n+3) td:first-child::before { background: var(--c-live); }
.site .lm-table-ranking td.team { text-align: left; font-weight: 600; color: var(--c-text); white-space: nowrap; }
.site .lm-table-ranking td.team img { width: 22px; height: 22px; margin: 0 10px 0 0; vertical-align: middle; object-fit: contain; }
.site .lm-table-ranking td.points { font-weight: 800; font-size: 15px; color: var(--c-text); }
.site .team-form { display: flex; gap: 4px; justify-content: center; }
.site .team-form span {
	display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 22px; padding: 0;
	border-radius: 6px; font-size: 11px; font-weight: 700; line-height: 1;
}
.site .form-win { background: #e6f6ec; color: #1a8a46; }
.site .form-draw { background: #fff4dc; color: #b7791f; }
.site .form-loss { background: #fdeceb; color: #d92d20; }

/* Danh sách "BXH các giải đấu khác" (hơn 300 giải): lưới cột trong khung cuộn. */
.site .lm-ranking-links { margin-top: 24px; }
.site .lm-ranking-links h2 { display: flex; align-items: center; gap: 8px; margin: 0 0 12px; font-size: 1.1rem; }
.site .lm-ranking-links ul {
	display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; max-height: 360px; overflow-y: auto;
	margin: 0; padding: 12px; list-style: none; background: var(--c-soft); border: 1px solid var(--c-line); border-radius: var(--radius);
}
.site .lm-ranking-links li { margin: 0; }
.site .lm-ranking-links a {
	display: block; padding: 7px 10px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
	background: #fff; border: 1px solid var(--c-line); border-radius: var(--radius-sm); color: var(--c-text); font-size: 13px;
}
.site .lm-ranking-links a:hover { border-color: var(--c-brand); color: var(--c-brand); text-decoration: none; }

/* Phần chữ giới thiệu trong trang. */
.site .entry-content > h2 { display: flex; align-items: center; gap: 8px; margin: 28px 0 10px; font-size: 1.15rem; }
.site .entry-content > p, .site .entry-content > ul { color: #3a4357; line-height: 1.7; }
.site .entry-content > ul { padding-left: 20px; }
.site .entry-content > ul li { margin-bottom: 4px; }
.site .entry-content > ul li::marker { color: var(--c-brand); }

@media (max-width: 767px) {
	.site .lm-ranking-filter { padding: 10px 12px; }
	.site #lm-ranking-select { width: 100%; min-width: 0; }
	.site .lm-table-ranking { font-size: 13px; }
	.site .lm-table-ranking th, .site .lm-table-ranking td { padding: 8px 5px; }
	.site .lm-table-ranking td:first-child { width: 32px; }
	.site .lm-table-ranking td.team { max-width: 150px; overflow: hidden; text-overflow: ellipsis; }
	.site .lm-table-ranking td.team img { width: 20px; height: 20px; margin-right: 6px; }
	.site .lm-ranking-links ul { grid-template-columns: repeat(2, minmax(0, 1fr)); max-height: 300px; }
}

/* ---------- Cột phải trang chủ ---------- */
.home-aside { display: flex; flex-direction: column; gap: 16px; }
.side-card { padding: 16px; }
.side-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.side-title { display: flex; align-items: center; gap: 8px; margin: 0; font-size: 1.05rem; font-weight: 700; }
.side-title .live-dot { width: 10px; height: 10px; flex-basis: 10px; }
.side-icon { display: inline-flex; color: var(--c-brand); }
.side-icon-star { color: #f5a524; }
.side-icon-star svg { fill: #f5a524; }
.side-icon-trophy { color: #1766d6; }
.side-more {
	display: inline-flex; align-items: center; gap: 2px; padding: 0; border: 0; background: none;
	color: var(--c-brand); font-size: 13px; cursor: pointer; white-space: nowrap;
}
.side-more:hover { text-decoration: underline; }
.side-empty { margin: 8px 0 4px; color: var(--c-muted); font-size: 14px; }

.mini-match {
	display: grid; grid-template-columns: 40px minmax(0, 1fr) 24px auto 24px minmax(0, 1fr);
	align-items: center; column-gap: 8px; padding: 11px 0; border-bottom: 1px solid var(--c-line-soft); font-size: 13.5px;
}
.mini-match:last-child { border-bottom: 0; }
.mini-match img, .logo-ph { width: 24px; height: 24px; object-fit: contain; }
.logo-ph { display: inline-block; border-radius: 50%; background: var(--c-soft); }
.mini-time { font-size: 13px; color: var(--c-muted); }
.mini-time.is-live { color: var(--c-live); font-weight: 700; }
.mini-team { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mini-team.home { text-align: right; }
.mini-score { font-weight: 700; text-align: center; min-width: 40px; }
.mini-match.is-hot { grid-template-columns: 48px minmax(0, 1fr); }
.mini-fixture { display: flex; flex-direction: column; align-items: center; gap: 3px; min-width: 0; }
.mini-teams { display: grid; grid-template-columns: minmax(0, 1fr) 24px auto 24px minmax(0, 1fr); align-items: center; column-gap: 8px; width: 100%; }
.mini-vs {
	display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; border-radius: 50%;
	background: var(--c-soft); color: var(--c-muted); font-size: 11px;
}
.mini-league { font-size: 12px; color: var(--c-muted); }

.league-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin: 8px 0 0; padding: 0; list-style: none; }
.league-grid a {
	display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 8px 12px;
	border: 1px solid var(--c-line); border-radius: var(--radius-sm); color: var(--c-text); font-size: 13.5px;
}
.league-grid a:hover { border-color: #c9d8f2; color: var(--c-brand); text-decoration: none; }
.league-logo { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 22px; height: 22px; color: var(--c-brand); }
.league-logo img { width: 22px; height: 22px; object-fit: contain; }
.league-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.news-list { margin: 4px 0 0; padding: 0; list-style: none; }
.news-list li + li { border-top: 1px solid var(--c-line-soft); }
.news-list a { display: flex; gap: 12px; padding: 10px 0; color: var(--c-text); }
.news-list a:hover { text-decoration: none; }
.news-list a:hover .news-title { color: var(--c-brand); }
.news-thumb { flex: 0 0 108px; width: 108px; height: 64px; object-fit: cover; border-radius: var(--radius-sm); }
.news-body { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.news-title { font-size: 14px; font-weight: 600; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.news-time { font-size: 12px; color: var(--c-muted); }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
	.primary-nav .menu a { padding: 0 10px; }
	.brand-tagline { display: none; }
}
@media (max-width: 960px) {
	:root { --header-h: 60px; }
	.header-inner { align-items: center; gap: 12px; }
	.site-logo-img { height: 34px; }
	.nav-toggle { display: inline-flex; }
	.primary-nav {
		display: none; position: absolute; left: 0; right: 0; top: 100%; margin: 0;
		background: #fff; border-bottom: 1px solid var(--c-line); box-shadow: 0 10px 20px rgba(16, 24, 40, .08);
	}
	.nav-open .primary-nav { display: block; }
	.primary-nav .menu { flex-direction: column; padding: 6px var(--gap) 10px; gap: 0; width: 100%; }
	.primary-nav .menu a { flex-direction: row; justify-content: flex-start; gap: 12px; padding: 12px 4px; border-bottom: 1px solid var(--c-line-soft); font-size: 15px; }
	.primary-nav .menu a::after { display: none; }
	.header-actions { margin-left: auto; }
	.site-content { flex-direction: column; flex-wrap: nowrap; align-items: stretch; gap: 16px; padding-top: 14px; }
	.widget-area { width: 100%; flex-basis: auto; }
	.home-datebar { flex-basis: auto; }
}
@media (max-width: 782px) {
	.admin-bar .site-header { top: 46px; }
}
@media (max-width: 600px) {
	.admin-bar .site-header { top: 0; }
}
@media (max-width: 768px) {
	/* Plugin ẩn cột HS và Đ trên mobile; hiện lại cột Điểm, ẩn cột Phong độ. */
	.site .lm-table-ranking th:nth-child(8), .site .lm-table-ranking td:nth-child(8) { display: table-cell; font-weight: 700; }
	.site .lm-table-ranking th:nth-child(9), .site .lm-table-ranking td:nth-child(9) { display: none; }
}
@media (max-width: 767px) {
	/* Chừa chỗ cho thanh điều hướng dưới cùng của League Manager (60px). */
	body { padding-bottom: 64px; }
	.container { padding: 0 12px; }
	h1, .entry-title, .page-title { font-size: 1.25rem; }
	.site-main > .entry, .site-main > .lich-giai, .site-main > .ketqua-giai, .site-main > .entry-header { padding: 14px; }
	.home-card { padding: 12px; }
	.card-head .entry-title { font-size: 1.1rem; }

	/* Thanh ngày: lưới 4 cột × 2 hàng (7 ngày + "Chọn ngày"), không vuốt ngang. */
	.home-datebar { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
	.datebar-days, .site .home-datebar .lm-fixtures-nav, .site .home-datebar .lm-results-nav { display: contents; }
	.site .home-datebar .lm-date-btn {
		min-width: 0; padding: 7px 2px; background: #fff; border: 1px solid var(--c-line); border-radius: var(--radius-sm);
	}
	.site .home-datebar .lm-date-btn + .lm-date-btn::before { display: none; }
	.site .home-datebar .lm-date-btn b { font-size: 12.5px; }
	.site .home-datebar .lm-date-btn small { font-size: 10.5px; white-space: nowrap; }
	.site .home-datebar .lm-date-btn.active { border-color: var(--c-brand); }
	.date-pick {
		flex-direction: column; justify-content: center; gap: 2px; min-width: 0; padding: 6px 2px;
		border-radius: var(--radius-sm); box-shadow: none; font-size: 12px; line-height: 1.25; text-align: center; white-space: normal;
	}
	.date-pick .icon { width: 16px; height: 16px; }
	.date-pick .icon:last-of-type { display: none; }

	/* Tab lọc: lưới 2 × 2. */
	.status-tabs { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; margin-bottom: 12px; }
	.status-tab { min-height: 36px; padding: 6px 4px; font-size: 12.5px; white-space: normal; line-height: 1.2; text-align: center; }

	.block-head { padding: 10px 12px; }
	.site .lm-league-block h3 { font-size: 15px !important; gap: 10px; }
	.site .lm-league-block h3 img { width: 26px; height: 26px; flex-basis: 26px; }
	.site .lm-match { grid-template-columns: 52px minmax(0, 1fr) 46px minmax(0, 1fr); column-gap: 8px; padding: 6px 10px; font-size: 13px; }
	.site .lm-time { font-size: 12px; flex-wrap: wrap; gap: 2px 4px; }
	.live-pill { font-size: 9.5px; padding: 1px 4px; }
	.site .lm-team { gap: 6px; }
	.site .lm-team img, .site .lm-team.lm-home img, .site .lm-away img { width: 22px; height: 22px; flex-basis: 22px; }
	.site .lm-score { font-size: 14px; }

	.card-thumb { flex-basis: 120px; }
	.card-thumb img { width: 120px; }
	.card-excerpt { display: none; }
}

/* ---------- Bảng kèo theo giải (League Manager: .lm-odds-table) ---------- */
.lm-odds-table { overflow-x: auto; -webkit-overflow-scrolling: touch; margin-bottom: 20px; }
.site .lm-odds-table .listing-match {
	width: 100%; table-layout: fixed; border-collapse: separate; border-spacing: 0;
	border: 1px solid var(--c-line); border-radius: var(--radius); overflow: hidden;
	font-size: 14px; line-height: 22px; font-variant-numeric: tabular-nums; margin: 0;
}
.site .lm-odds-table .listing-match td {
	padding: 8px 6px; border-bottom: 1px solid var(--c-line); vertical-align: top;
	white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.site .lm-odds-table .listing-match tr:last-child td { border-bottom: 0; }
/* Hàng quảng cáo trống giữa các trận. */
.site .lm-odds-table .listing-match tr:not(.match-row):not(.row-header) { display: none; }

.site .lm-odds-table .row-header td {
	background: var(--c-brand); color: #fff; font-size: 13px; font-weight: 600; white-space: normal; line-height: 1.25;
	text-align: center; vertical-align: middle; padding: 8px 4px; border-bottom: 0;
}
.site .lm-odds-table .row-header td:nth-child(1) { width: 64px; }
.site .lm-odds-table .row-header td:nth-child(2) { width: auto; text-align: left; padding-left: 10px; }
.site .lm-odds-table .row-header td:nth-child(3),
.site .lm-odds-table .row-header td:nth-child(4) { width: 130px; }
.site .lm-odds-table .row-header td:nth-child(5) { width: 64px; }

.site .lm-odds-table .match-row.even td { background: var(--c-soft); }
.site .lm-odds-table .match-row:hover td { background: #eaf4ff; }
.site .lm-odds-table .match-row td:nth-child(1) { color: var(--c-muted); font-size: 13px; text-align: center; }
.site .lm-odds-table .match-row td:nth-child(2) { padding-left: 10px; }
.site .lm-odds-table .match-row td:nth-child(3),
.site .lm-odds-table .match-row td:nth-child(5),
.site .lm-odds-table .match-row td:nth-child(7) { text-align: center; }
.site .lm-odds-table .match-row td:nth-child(4),
.site .lm-odds-table .match-row td:nth-child(6) { text-align: right; padding-right: 10px; border-right: 1px solid var(--c-line); }
.site .lm-odds-table .match-row td:nth-child(5) { color: var(--c-muted); }
/* Đội chấp và mức kèo. */
.site .lm-odds-table .fc-above { color: var(--c-live); font-weight: 700; }

@media (max-width: 600px) {
	.site .lm-odds-table .listing-match { font-size: 12px; line-height: 18px; }
	.site .lm-odds-table .listing-match td { padding: 6px 3px; }
	.site .lm-odds-table .row-header td { font-size: 11px; padding: 6px 2px; }
	.site .lm-odds-table .row-header td:nth-child(1) { width: 36px; }
	.site .lm-odds-table .row-header td:nth-child(2) { padding-left: 6px; }
	.site .lm-odds-table .row-header td:nth-child(3),
	.site .lm-odds-table .row-header td:nth-child(4) { width: 72px; }
	.site .lm-odds-table .row-header td:nth-child(5) { width: 38px; }
	.site .lm-odds-table .match-row td:nth-child(1) { font-size: 11px; }
	.site .lm-odds-table .match-row td:nth-child(2) { padding-left: 6px; }
	.site .lm-odds-table .match-row td:nth-child(4),
	.site .lm-odds-table .match-row td:nth-child(6) { padding-right: 5px; }
	.site .lm-odds-table .match-row td:nth-child(1),
	.site .lm-odds-table .match-row td:nth-child(3),
	.site .lm-odds-table .match-row td:nth-child(5),
	.site .lm-odds-table .match-row td:nth-child(7) { padding-left: 1px; padding-right: 1px; }
	/* Mức kèo như "0.5-1" cần vừa cột 36px. */
	.site .lm-odds-table .match-row td:nth-child(3),
	.site .lm-odds-table .match-row td:nth-child(5) { font-size: 11px; letter-spacing: -.3px; text-overflow: clip; }
}

/* ---------- Link chi tiết trận trên dòng trận (League Manager: .lm-match-link) ---------- */
.site .lm-match { position: relative; }
.site .lm-match-link { position: absolute; inset: 0; z-index: 1; border-radius: inherit; }
.site .lm-match-link:focus-visible { outline: 2px solid var(--c-brand); outline-offset: -2px; }
.site .lm-match:has(.lm-match-link) { cursor: pointer; }
.site .lm-match:has(.lm-match-link):hover .lm-team { color: var(--c-brand); }
a.mini-match { color: inherit; }
a.mini-match:hover { text-decoration: none; background: #fafcff; }
a.mini-match:hover .mini-team { color: var(--c-brand); }

/* ---------- 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; }
}

/* ---------- Phân trang kết quả theo giải (League Manager: .lm-pagination) ---------- */
.site .lm-pagination { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 8px; margin: 16px 0 8px; }
.site .lm-pagination a { display: inline-flex; align-items: center; min-height: 38px; padding: 6px 16px; border: 1px solid var(--c-line); border-radius: 999px; background: var(--c-card); font-weight: 600; font-size: 14px; color: var(--c-brand); }
.site .lm-pagination a:hover { border-color: var(--c-brand); background: var(--c-brand-soft); text-decoration: none; }
.site .lm-page-info { padding: 0 6px; color: var(--c-muted); font-size: 13.5px; }
