/* eFootball Tournament Manager — Frontend styles */

.ef-tm-wrap {
	--ef-tm-accent: #37003c;
	--ef-tm-accent-light: #6a1b7a;
	--ef-tm-green: #00ff85;
	--ef-tm-text: #1a1a1a;
	--ef-tm-muted: #6b7280;
	--ef-tm-border: #e7e7ea;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	color: var(--ef-tm-text);
	max-width: 720px;
	margin: 0 auto;
}

.ef-tm-header {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	margin-bottom: 14px;
}
.ef-tm-header-title { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.ef-tm-tournament-name { font-size: 20px; font-weight: 800; letter-spacing: -0.01em; }
.ef-tm-season { font-size: 13px; color: var(--ef-tm-muted); }

/* ---------- Standings block: branding panel + table card ---------- */
.ef-tm-standings-block {
	display: flex;
	border-radius: 16px;
	overflow: hidden;
	box-shadow: 0 1px 3px rgba(0,0,0,.06), 0 8px 24px rgba(0,0,0,.05);
}

.ef-tm-standings-panel {
	background: linear-gradient(160deg, #5CFF5C 0%, #17c964 22%, #6a1b9a 62%, #3d0a5c 100%);
	color: #fff;
	width: 72px;
	flex-shrink: 0;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: flex-start;
	gap: 14px;
	padding: 20px 8px;
	writing-mode: vertical-rl;
	text-orientation: mixed;
	transform: rotate(180deg);
	position: relative;
}
.ef-tm-standings-panel::before {
	content: "";
	width: 26px;
	height: 26px;
	border-radius: 50%;
	background: rgba(255,255,255,.22);
	border: 2px solid rgba(255,255,255,.75);
	flex-shrink: 0;
}
.ef-tm-panel-label {
	font-size: 15px;
	font-weight: 800;
	text-transform: none;
	letter-spacing: -0.01em;
	line-height: 1.15;
}
.ef-tm-panel-week {
	font-size: 12px;
	font-weight: 600;
	color: rgba(255,255,255,.85);
	text-transform: none;
	letter-spacing: 0;
}

.ef-tm-standings-card {
	background: #fff;
	flex: 1;
	padding: 10px 4px;
	min-width: 0;
}

.ef-tm-standings-table {
	width: 100%;
	border-collapse: collapse;
	font-size: 14px;
}
.ef-tm-standings-table thead th {
	text-align: left;
	font-size: 12px;
	font-weight: 700;
	text-transform: none;
	letter-spacing: 0;
	color: #9a9a9a;
	padding: 10px 10px 8px;
}
.ef-tm-standings-table tbody tr {
	border-top: 1px solid var(--ef-tm-border);
}
.ef-tm-standings-table td {
	padding: 9px 10px;
	white-space: nowrap;
}

.ef-tm-col-pos { width: 28px; text-align: left; font-weight: 700; color: #444; font-size: 13px; }
.ef-tm-col-club { width: auto; }
.ef-tm-col-p, .ef-tm-col-gd { width: 38px; text-align: center; color: #333; font-size: 13px; }
.ef-tm-col-pts { width: 56px; text-align: center; }
.ef-tm-col-pts strong { font-size: 14px; font-weight: 800; }

.ef-tm-club {
	display: flex;
	align-items: center;
	gap: 10px;
	min-width: 0;
}
.ef-tm-club-name {
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	font-weight: 600;
}
.ef-tm-logo {
	width: 22px;
	height: 22px;
	border-radius: 50%;
	object-fit: cover;
	flex-shrink: 0;
	background: #f0f0f0;
}
.ef-tm-logo-placeholder {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	background: var(--ef-tm-accent);
	color: #fff;
	font-size: 11px;
	font-weight: 700;
}

/* ---------- Results (light card style, unchanged) ---------- */
.ef-tm-matchweek-block { margin-bottom: 22px; }
.ef-tm-matchweek-title {
	font-size: 13px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: .05em;
	color: var(--ef-tm-muted);
	margin: 0 0 8px;
}
.ef-tm-result-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	background: #fff;
	border: 1px solid var(--ef-tm-border);
	border-radius: 10px;
	padding: 12px 14px;
	margin-bottom: 8px;
	font-size: 14px;
}
.ef-tm-fixture-team { font-weight: 600; flex: 1; }
.ef-tm-fixture-home { text-align: right; }
.ef-tm-fixture-away { text-align: left; }
.ef-tm-result-row .ef-tm-score {
	flex-shrink: 0;
	background: var(--ef-tm-accent);
	color: #fff;
	border-radius: 6px;
	padding: 4px 10px;
	font-size: 13px;
	font-weight: 700;
}
.ef-tm-fixtures-card {
	background: radial-gradient(900px 320px at 30% -10%, #2c1140 0%, #170a1f 50%, #0d0710 100%);
	border: 1px solid rgba(168, 85, 247, .45);
	border-radius: 20px;
	box-shadow: 0 0 0 1px rgba(168, 85, 247, .12), 0 0 36px rgba(147, 51, 234, .18);
	padding: 26px 18px 20px;
	margin-bottom: 22px;
	color: #fff;
}
.ef-tm-fixtures-crest {
	width: 52px;
	height: 52px;
	margin: 0 auto 14px;
	border-radius: 50%;
	border: 2px solid rgba(255,255,255,.85);
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 11px;
	font-weight: 800;
	letter-spacing: .02em;
}
.ef-tm-fixtures-mw {
	text-align: center;
	font-size: 13px;
	font-weight: 800;
	text-transform: uppercase;
	letter-spacing: .1em;
	margin-bottom: 4px;
}
.ef-tm-fixtures-day {
	text-align: center;
	font-size: 13px;
	color: rgba(255,255,255,.65);
	font-weight: 500;
	margin: 20px 0 12px;
}
.ef-tm-fixtures-day:first-of-type { margin-top: 18px; }

.ef-tm-fx-row {
	display: grid;
	grid-template-columns: 1fr auto auto auto 1fr;
	align-items: center;
	column-gap: 10px;
	padding: 9px 4px;
}
.ef-tm-fx-home-name { text-align: right; font-weight: 700; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ef-tm-fx-away-name { text-align: left; font-weight: 700; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ef-tm-fx-logo {
	width: 24px;
	height: 24px;
	border-radius: 50%;
	object-fit: cover;
	flex-shrink: 0;
	background: rgba(255,255,255,.08);
}
.ef-tm-fx-logo-placeholder {
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 9px;
	font-weight: 800;
	color: rgba(255,255,255,.9);
}
.ef-tm-fx-time {
	font-size: 12px;
	color: rgba(255,255,255,.8);
	font-weight: 600;
	white-space: nowrap;
	min-width: 58px;
	text-align: center;
}
.ef-tm-fx-score {
	font-size: 12px;
	font-weight: 800;
	white-space: nowrap;
	min-width: 44px;
	text-align: center;
	background: rgba(168, 85, 247, .25);
	border: 1px solid rgba(168, 85, 247, .5);
	border-radius: 999px;
	padding: 3px 8px;
	color: #fff;
}

@media (max-width: 400px) {
	.ef-tm-fx-home-name, .ef-tm-fx-away-name { font-size: 12.5px; }
	.ef-tm-fx-time, .ef-tm-fx-score { min-width: 44px; }
}

/* ---------- Stats ---------- */
.ef-tm-stats-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
	gap: 10px;
	margin-bottom: 20px;
}
.ef-tm-stat-box {
	background: #fff;
	border: 1px solid var(--ef-tm-border);
	border-radius: 10px;
	padding: 14px;
	display: flex;
	flex-direction: column;
	gap: 2px;
}
.ef-tm-stat-num { font-size: 22px; font-weight: 800; color: var(--ef-tm-accent); }
.ef-tm-stat-label { font-size: 11px; text-transform: uppercase; color: var(--ef-tm-muted); letter-spacing: .03em; }
.ef-tm-top-performers h4 { margin-bottom: 6px; }
.ef-tm-top-list { padding-left: 20px; }

/* ---------- Tournament list ---------- */
.ef-tm-tournament-card {
	background: #fff;
	border: 1px solid var(--ef-tm-border);
	border-radius: 10px;
	padding: 14px 16px;
	margin-bottom: 8px;
	display: flex;
	align-items: center;
	justify-content: space-between;
}
.ef-tm-tc-name { font-weight: 700; }
.ef-tm-tc-meta { display: flex; gap: 8px; align-items: center; font-size: 12px; color: var(--ef-tm-muted); }
.ef-tm-badge {
	display: inline-block;
	padding: 2px 10px;
	border-radius: 999px;
	font-size: 11px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: .03em;
}
.ef-tm-badge-draft { background: #eee; color: #555; }
.ef-tm-badge-active { background: #d9f2dd; color: #0b6e2f; }
.ef-tm-badge-completed { background: #e0e7ff; color: #3730a3; }

/* ---------- Match detail ---------- */
.ef-tm-match-detail {
	background: #fff;
	border: 1px solid var(--ef-tm-border);
	border-radius: 12px;
	padding: 20px;
	text-align: center;
}
.ef-tm-match-teams { display: flex; align-items: center; justify-content: center; gap: 16px; font-size: 18px; font-weight: 700; }
.ef-tm-match-meta { margin-top: 8px; font-size: 12px; color: var(--ef-tm-muted); }

.ef-tm-empty, .ef-tm-empty-row { color: var(--ef-tm-muted); font-style: italic; text-align: center; padding: 20px !important; }

/* ---------- Responsive: mobile ---------- */
@media (max-width: 560px) {
	.ef-tm-standings-block {
		flex-direction: column;
		border-radius: 14px;
	}
	.ef-tm-standings-panel {
		width: 100%;
		flex-direction: row;
		writing-mode: horizontal-tb;
		transform: none;
		padding: 12px 16px;
		justify-content: space-between;
	}
	.ef-tm-standings-table { font-size: 13px; }
	.ef-tm-standings-table td, .ef-tm-standings-table th { padding: 8px 6px; }
	.ef-tm-club-name { max-width: 34vw; }
	.ef-tm-fixture-row, .ef-tm-result-row { flex-wrap: wrap; }
}
