:root {
	--club-primary: #ec0000;
	--app-bg: #f5f5f3;
	--app-border: #d9d9d6;
	--app-text: #222;
	--app-muted: #666;
}

* {
	box-sizing: border-box;
}

body {
	margin: 0;
	background: var(--app-bg);
	color: var(--app-text);
	font-size: 14px;
	line-height: 1.35;
}

a {
	color: var(--club-primary);
}

.app-shell {
	min-height: 100vh;
	display: flex;
}

.app-sidebar {
	width: 245px;
	background: #fff;
	border-right: 1px solid var(--app-border);
	padding: 18px 14px;
	position: sticky;
	top: 0;
	height: 100vh;
}

.app-brand {
	display: flex;
	align-items: center;
	gap: 10px;
	padding-bottom: 16px;
	margin-bottom: 12px;
	border-bottom: 1px solid var(--app-border);
}

.app-brand-mark {
	width: 34px;
	height: 34px;
	display: flex;
	align-items: center;
	justify-content: center;
	color: var(--club-primary);
}

.app-badminton-icon {
	width: 31px;
	height: 31px;
	fill: none;
	stroke: currentColor;
	stroke-width: 3;
	stroke-linecap: square;
	stroke-linejoin: miter;
}

.app-brand-title {
	font-weight: 700;
	font-size: 14px;
}

.app-brand-subtitle {
	font-size: 12px;
	color: var(--app-muted);
}

.app-nav {
	display: flex;
	flex-direction: column;
	gap: 2px;
}

.app-nav-link {
	display: flex;
	align-items: center;
	gap: 9px;
	padding: 8px 9px;
	color: #333;
	text-decoration: none;
	border-left: 3px solid transparent;
}

.app-nav-link:hover,
.app-nav-link.active {
	background: #f2f2f0;
	border-left-color: var(--club-primary);
	color: #111;
}

.app-nav-icon {
	width: 18px;
	text-align: center;
	color: var(--club-primary);
}

.app-main {
	flex: 1;
	padding: 20px 22px 14px;
	min-width: 0;
}

.app-main-public {
	max-width: 880px;
	margin: 0 auto;
	padding-top: 34px;
}

.app-topbar {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 14px;
	margin-bottom: 16px;
	padding-bottom: 14px;
	border-bottom: 1px solid var(--app-border);
}

.app-topbar h1 {
	font-size: 23px;
	line-height: 1.15;
	margin: 0 0 4px;
}

.app-topbar p {
	margin: 0;
	color: var(--app-muted);
	font-size: 13px;
}

.app-userbox {
	display: flex;
	align-items: center;
	gap: 10px;
	white-space: nowrap;
}

.team-switch-form .form-select {
	width: 220px;
}

.user-meta {
	font-size: 12px;
	text-align: right;
}

.user-meta span {
	display: block;
	color: var(--app-muted);
}

.app-card,
.card {
	background: #fff;
	border: 1px solid var(--app-border);
	border-radius: 0;
	box-shadow: none;
}

.app-card {
	padding: 16px;
	margin-bottom: 16px;
}

.card-header,
.card-footer {
	background: #fafafa;
	border-color: var(--app-border);
	border-radius: 0 !important;
}

.card-body {
	padding: 14px;
}

.form-control,
.form-select,
.btn,
.alert,
.badge {
	border-radius: 0 !important;
}

.form-label {
	font-size: 12px;
	font-weight: 600;
	margin-bottom: 3px;
}

.form-control,
.form-select {
	font-size: 13px;
	padding: 5px 8px;
}

.btn {
	font-size: 13px;
	padding: 5px 10px;
}

.btn-primary {
	background: var(--club-primary);
	border-color: var(--club-primary);
}

.btn-primary:hover {
	filter: brightness(.92);
	background: var(--club-primary);
	border-color: var(--club-primary);
}

.table {
	font-size: 13px;
	margin-bottom: 0;
}

.table > :not(caption) > * > * {
	padding: 6px 8px;
	vertical-align: middle;
}

.table thead th {
	font-size: 12px;
	text-transform: none;
	white-space: nowrap;
	background: #f7f7f5;
	border-bottom: 1px solid var(--app-border);
}

.table-compact > :not(caption) > * > * {
	padding: 4px 6px;
}

.table-actions {
	white-space: nowrap;
	width: 1%;
}

.table-bool {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 18px;
	height: 18px;
	font-size: 12px;
}

.table-bool-yes {
	color: #198754;
}

.table-bool-no {
	color: #b02a37;
}

.meta-muted {
	color: var(--app-muted);
	font-size: 12px;
}

.stat-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
	gap: 12px;
	margin-bottom: 16px;
}

.stat-card {
	background: #fff;
	border: 1px solid var(--app-border);
	padding: 13px;
}

.stat-label {
	font-size: 12px;
	color: var(--app-muted);
}

.stat-value {
	font-size: 25px;
	font-weight: 700;
	line-height: 1.1;
}

.public-header {
	background: #fff;
	border-left: 4px solid var(--club-primary);
	padding: 16px;
	margin-bottom: 16px;
}

.public-header h1 {
	font-size: 24px;
	margin: 0 0 6px;
}

.public-header p {
	margin: 0;
	color: var(--app-muted);
}

.alert {
	font-size: 13px;
	padding: 9px 11px;
}

.app-footer {
	margin-top: 22px;
	padding-top: 12px;
	border-top: 1px solid var(--app-border);
	font-size: 12px;
	color: var(--app-muted);
}

.lineup-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
	gap: 12px;
}

.lineup-box {
	border: 1px solid var(--app-border);
	background: #fff;
	padding: 10px;
}

.lineup-box h3 {
	font-size: 15px;
	margin: 0 0 8px;
}

@media (max-width: 900px) {
	.app-shell {
		display: block;
	}

	.app-sidebar {
		width: auto;
		height: auto;
		position: static;
		border-right: 0;
		border-bottom: 1px solid var(--app-border);
		padding: 10px;
	}

	.app-nav {
		flex-direction: row;
		overflow-x: auto;
		padding-bottom: 4px;
	}

	.app-nav-link {
		white-space: nowrap;
	}

	.app-main {
		padding: 14px;
	}

	.app-topbar,
	.app-userbox {
		flex-direction: column;
		align-items: flex-start;
	}

	.team-switch-form .form-select {
		width: 100%;
	}
}
