body { background: #222; color: #eee; font-family: sans-serif; margin: 0; }
.calendar-container { max-width: 700px; margin: 32px auto; background: #181818; border-radius: 12px; padding: 24px; box-shadow: 0 2px 16px #0008; }
.site-nav {
	display: flex;
	gap: 8px;
	margin-bottom: 14px;
	flex-wrap: wrap;
}
.site-nav-link {
	display: inline-block;
	padding: 8px 12px;
	border: 1px solid #3a3a3a;
	border-radius: 8px;
	background: #202020;
	color: #cbd5e1;
	text-decoration: none;
	font-size: 0.88rem;
	font-weight: 600;
}
.site-nav-link:hover {
	border-color: #60a5fa;
	color: #dbeafe;
}
.site-nav-link.is-active {
	background: #1d4ed8;
	border-color: #1d4ed8;
	color: #eff6ff;
}
h1, h2 { color: #fff; }
#calendarGrid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; margin-bottom: 32px; }
.calendar-header { font-weight: bold; text-align: center; background: #333; border-radius: 4px; padding: 6px 0; }
.calendar-day { background: #292929; border-radius: 4px; min-height: 60px; padding: 4px; text-align: left; position: relative; }
.calendar-day.has-event { background: #292929; color: #eee; }
.calendar-event-list { margin-top: 4px; }
.calendar-event { font-size: 0.95em; margin-bottom: 4px; padding: 6px; border-radius: 6px; display: flex; flex-direction: column; gap: 4px; }
.calendar-event-title { font-size: 0.68rem; line-height: 1.1; color: #d1d5db; font-weight: 500; }
.calendar-event-main { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-weight: 600; }
.calendar-event-time { font-size: 0.68rem; line-height: 1; color: #cbd5e1; white-space: nowrap; }
.calendar-event,
.upcoming-event-item {
	cursor: pointer;
}
.upcoming-events-section { margin-bottom: 20px; }
.upcoming-events-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.upcoming-events-header h2 { margin: 0; font-size: 1.05rem; }
.stats-panel {
	padding: 10px;
	border-radius: 10px;
	background: #202020;
	border: 1px solid #323232;
}
.player-tabs {
	display: flex;
	gap: 8px;
	flex-wrap: wrap;
	margin-bottom: 12px;
}
.player-tab {
	border: 1px solid #3a3a3a;
	border-radius: 8px;
	background: #181818;
	color: #d1d5db;
	padding: 8px 12px;
	font-size: 0.88rem;
	font-weight: 600;
	cursor: pointer;
}
.player-tab.is-active {
	background: #0f766e;
	border-color: #0f766e;
	color: #ecfeff;
}
.player-teams {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 8px;
}
.player-team-card {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	padding: 10px;
	border-radius: 8px;
	border: 1px solid #3a3a3a;
	background: #181818;
}
.player-team-logo {
	width: 52px;
	height: 52px;
	object-fit: contain;
	border-radius: 6px;
	background: #101010;
	padding: 2px;
}
.player-team-name {
	font-weight: 700;
	color: #f3f4f6;
	line-height: 1.2;
}
.player-team-trophies {
	display: flex;
	align-items: center;
	gap: 10px;
	margin-top: 6px;
	margin-bottom: 8px;
}
.player-team-trophy {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	font-weight: 700;
	line-height: 1;
}
.player-team-trophy-icon {
	font-size: 0.95rem;
}
.player-team-trophy-count {
	font-size: 0.84rem;
	color: #e5e7eb;
}
.player-team-trophy.is-gold .player-team-trophy-icon {
	color: #fbbf24;
}
.player-team-trophy.is-silver .player-team-trophy-icon {
	color: #d1d5db;
}
.player-team-trophy.is-bronze .player-team-trophy-icon {
	color: #d97706;
}
.player-team-sport {
	font-size: 0.78rem;
	color: #9ca3af;
}
.player-team-meta-section {
	margin-top: 10px;
}
.player-team-meta-label {
	font-size: 0.72rem;
	font-weight: 700;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: #94a3b8;
	margin-bottom: 6px;
}
.player-team-meta-values {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
}
.player-team-meta-pill {
	display: inline-flex;
	align-items: center;
	padding: 4px 8px;
	border-radius: 999px;
	background: #0f172a;
	border: 1px solid #334155;
	color: #e2e8f0;
	font-size: 0.76rem;
	line-height: 1.1;
	cursor: pointer;
	font-family: inherit;
}
.player-team-meta-pill.is-active {
	background: #1d4ed8;
	border-color: #60a5fa;
	color: #eff6ff;
}
.player-team-meta-empty {
	font-size: 0.76rem;
	color: #9ca3af;
}
.player-team-record-title {
	font-size: 0.76rem;
	font-weight: 700;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: #93c5fd;
	margin-bottom: 6px;
}
.player-team-record-summary {
	font-size: 1.35rem;
	font-weight: 800;
	color: #f8fafc;
	line-height: 1;
	padding: 4px 0;
}
.player-team-record-detail {
	margin-top: 4px;
	font-size: 0.78rem;
	color: #cbd5e1;
}
.player-team-record-placement {
	margin-top: 6px;
	font-size: 0.86rem;
	font-weight: 700;
	color: #facc15;
}
.player-team-soccer-stats {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 8px;
	margin-top: 12px;
}
.player-team-soccer-stat {
	display: flex;
	flex-direction: column;
	gap: 6px;
	padding: 10px;
	border-radius: 8px;
	background: #0f172a;
	border: 1px solid #334155;
}
.player-team-soccer-stat-label {
	font-size: 0.72rem;
	font-weight: 700;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: #93c5fd;
}
.player-team-soccer-stat-value {
	font-size: 1.25rem;
	font-weight: 800;
	color: #f8fafc;
	line-height: 1;
}
.player-stats-modal-section {
	margin-top: 14px;
	padding-top: 12px;
	border-top: 1px solid #2f3b52;
}
.player-stats-modal-title {
	font-size: 0.8rem;
	font-weight: 700;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: #93c5fd;
	margin-bottom: 10px;
}
.player-stats-event-card {
	padding: 10px;
	border-radius: 8px;
	background: #0f172a;
	border: 1px solid #334155;
	margin-bottom: 8px;
}
.player-stats-event-heading {
	font-size: 0.82rem;
	font-weight: 700;
	color: #f8fafc;
	margin-bottom: 8px;
}
.player-stats-event-values {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 8px;
}
.player-stats-event-item {
	display: flex;
	flex-direction: column;
	gap: 4px;
	padding: 8px;
	border-radius: 6px;
	background: #111827;
	border: 1px solid #243041;
}
.player-stats-event-label {
	font-size: 0.72rem;
	font-weight: 700;
	letter-spacing: 0.03em;
	text-transform: uppercase;
	color: #94a3b8;
}
.player-stats-event-value {
	font-size: 0.98rem;
	font-weight: 700;
	color: #f8fafc;
}
.player-team-record-empty {
	font-size: 0.8rem;
	color: #9ca3af;
	padding: 4px 0;
}
.player-team-games-section {
	margin-top: 14px;
	padding-top: 12px;
	border-top: 1px solid #2f3b52;
}
.player-team-games-links {
	display: flex;
	gap: 12px;
	flex-wrap: wrap;
}
.player-team-games-link {
	border: none;
	background: transparent;
	padding: 0;
	font-size: 0.82rem;
	font-weight: 700;
	color: #93c5fd;
	text-decoration: underline;
	cursor: pointer;
}
.player-team-games-link:hover {
	color: #dbeafe;
}
.player-team-games-list {
	margin-top: 10px;
	display: flex;
	flex-direction: column;
	gap: 6px;
}
.player-team-games-list-title {
	font-size: 0.78rem;
	font-weight: 700;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: #94a3b8;
}
.player-team-games-item {
	padding: 8px 10px;
	border-radius: 8px;
	background: #0f172a;
	border: 1px solid #334155;
	font-size: 0.82rem;
	line-height: 1.3;
	color: #e2e8f0;
}
.upcoming-events-list { max-height: 280px; overflow-y: auto; display: flex; flex-direction: column; gap: 8px; padding-right: 4px; }
.upcoming-event-item { background: #202020; border: 1px solid #323232; border-left: 4px solid var(--event-color, #2563eb); border-radius: 8px; padding: 10px 12px; display: flex; flex-direction: column; gap: 6px; }
.upcoming-event-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.upcoming-event-right { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.upcoming-competition-logo { width: 30px; height: 30px; object-fit: contain; border-radius: 6px; background: #171717; border: 1px solid #343434; padding: 2px; }
.upcoming-event-left { display: flex; align-items: center; gap: 10px; min-width: 0; }
.upcoming-event-logos { display: flex; align-items: center; gap: 8px; font-weight: 600; min-width: 0; }
.upcoming-event-logos .team-logo { width: 40px; height: 40px; }
.upcoming-event-matchup { color: #e5e7eb; font-size: 0.82rem; line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.upcoming-vs { color: #cbd5e1; font-size: 0.82rem; }
.upcoming-event-date { color: #cbd5e1; font-size: 0.76rem; white-space: nowrap; }
.upcoming-event-title { color: #f3f4f6; font-size: 0.86rem; font-weight: 600; }
.upcoming-event-meta { display: flex; flex-direction: column; gap: 2px; color: #9ca3af; font-size: 0.74rem; }
.upcoming-empty { margin: 0; padding: 14px 12px; background: #202020; border: 1px solid #323232; border-radius: 8px; color: #9ca3af; }
.event-modal {
	position: fixed;
	inset: 0;
	z-index: 1000;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 16px;
}
.event-modal-backdrop {
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, 0.58);
}
.event-modal-panel {
	position: relative;
	width: min(560px, 100%);
	max-height: 80vh;
	overflow: auto;
	background: #171717;
	border: 1px solid #3a3a3a;
	border-radius: 12px;
	box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5);
	padding: 14px;
}
.event-modal-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin-bottom: 10px;
}
.event-modal-header h2 {
	margin: 0;
	font-size: 1.1rem;
}
.event-modal-actions {
	display: inline-flex;
	align-items: center;
	gap: 8px;
}
.event-modal-header button {
	height: 34px;
	padding: 0 12px;
	border-radius: 8px;
	border: 1px solid #3a3a3a;
	background: #202020;
	color: #e5e7eb;
	cursor: pointer;
}
.event-modal-header button:disabled {
	opacity: 0.45;
	cursor: not-allowed;
}
.event-modal-body {
	display: flex;
	flex-direction: column;
	gap: 8px;
}
.record-modal-logo-wrap {
	display: flex;
	justify-content: center;
	align-items: center;
	padding: 6px 0 2px;
}
.record-modal-logo {
	width: 72px;
	height: 72px;
	object-fit: contain;
	border-radius: 10px;
	background: #101010;
	border: 1px solid #2f2f2f;
	padding: 6px;
}
.event-matchup-block {
	display: grid;
	grid-template-columns: 1fr auto 1fr;
	gap: 12px;
	align-items: center;
	padding: 10px;
	border-radius: 8px;
	background: #202020;
	border: 1px solid #2f2f2f;
}
.event-matchup-side {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 8px;
	min-width: 0;
}
.event-matchup-top-row {
	display: flex;
	align-items: center;
	gap: 10px;
}
.event-matchup-logo-wrap {
	width: 100px;
	height: 100px;
	border-radius: 10px;
	background: #171717;
	display: flex;
	align-items: center;
	justify-content: center;
	border: 1px solid #343434;
}
.event-matchup-logo {
	width: 80px;
	height: 80px;
	object-fit: contain;
}
.event-matchup-fallback {
	font-size: 1rem;
	font-weight: 700;
	color: #e5e7eb;
}
.event-matchup-score {
	min-width: 32px;
	text-align: center;
	font-size: 2rem;
	font-weight: 700;
	line-height: 1;
	color: #f3f4f6;
}
.event-matchup-name {
	font-size: 1rem;
	font-weight: 700;
	color: #e5e7eb;
	text-align: center;
	line-height: 1.2;
	word-break: break-word;
}
.event-matchup-center {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 6px;
}
.event-matchup-vs {
	font-size: 0.72rem;
	letter-spacing: 0.06em;
	font-weight: 700;
	color: #9ca3af;
}
.event-matchup-result {
	font-size: 1.5rem;
	font-weight: 700;
	width: 40px;
	height: 40px;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 8px;
}
.event-matchup-result-w {
	background: #10b981;
	color: #fff;
}
.event-matchup-result-l {
	background: #ef4444;
	color: #fff;
}
.event-matchup-result-d {
	background: #6b7280;
	color: #fff;
}
.event-tournament-header {
	display: flex;
	justify-content: center;
	align-items: center;
	padding: 12px;
	border-radius: 8px;
	background: #202020;
	border: 1px solid #2f2f2f;
}
.event-tournament-logo {
	width: 110px;
	height: 110px;
	object-fit: contain;
	border-radius: 10px;
	background: #171717;
	border: 1px solid #343434;
	padding: 8px;
}
.event-tournament-name {
	font-size: 1rem;
	font-weight: 700;
	color: #f3f4f6;
	text-align: center;
}
.event-detail-row {
	display: grid;
	grid-template-columns: 110px 1fr;
	gap: 10px;
	align-items: start;
	padding: 8px 10px;
	border-radius: 8px;
	background: #202020;
	border: 1px solid #2f2f2f;
}
.event-detail-label {
	color: #9ca3af;
	font-size: 0.82rem;
	text-transform: uppercase;
	letter-spacing: 0.03em;
}
.event-detail-value {
	color: #f3f4f6;
	font-size: 0.92rem;
	line-height: 1.35;
	word-break: break-word;
}
.event-detail-competition {
	display: inline-flex;
	align-items: center;
	gap: 8px;
}
.event-detail-competition-logo {
	width: 24px;
	height: 24px;
	object-fit: contain;
	border-radius: 4px;
	background: #171717;
	border: 1px solid #343434;
	padding: 2px;
}
.day-number { font-weight: 600; }
.hint-text { color: #c7d2fe; margin-top: 0; margin-bottom: 14px; }
.legend-key { margin: 0 0 10px; color: #d1d5db; font-size: 0.9rem; }
.scrimmage-star { color: #f59e0b; font-weight: 700; }
.month-nav {
	display: grid;
	grid-template-columns: 1fr auto 1fr;
	align-items: center;
	gap: 10px;
	margin-bottom: 8px;
}
.month-nav h2 {
	margin: 0;
	font-size: 1.15rem;
	text-align: center;
}
.month-nav #prevMonthBtn {
	justify-self: start;
}
.month-nav #viewPrevMonthBtn {
	justify-self: start;
}
.month-nav #nextMonthBtn {
	justify-self: end;
}
.month-nav #viewNextMonthBtn {
	justify-self: end;
}
.month-nav button {
	border: 1px solid #3a3a3a;
	border-radius: 6px;
	background: #202020;
	color: #eee;
	padding: 4px 8px;
	font-size: 0.82rem;
	line-height: 1.1;
	cursor: pointer;
}
.subtle-btn {
	display: block;
	margin: 0 auto 14px;
	padding: 4px 8px;
	font-size: 0.82rem;
	color: #9ca3af;
	background: transparent;
	border: 1px solid #3a3a3a;
	border-radius: 999px;
	cursor: pointer;
	opacity: 0.85;
}
.subtle-btn:hover {
	color: #d1d5db;
	opacity: 1;
}
.calendar-day.selected-day {
	box-shadow: inset 0 0 0 2px #f59e0b;
}
#addressList { list-style: none; padding: 0; }
#addressList li { background: #292929; margin-bottom: 6px; border-radius: 4px; padding: 8px; }

.editor-section { margin-bottom: 24px; }
.is-hidden { display: none !important; }
.editor-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-bottom: 10px; }
.event-form {
	display: flex;
	flex-direction: column;
	gap: 8px;
}
:root {
	--control-height: 40px;
}
.all-day-toggle {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	height: var(--control-height);
	padding: 0 10px;
	border: 1px solid #454545;
	border-radius: 6px;
	background: linear-gradient(180deg, #232323 0%, #1c1c1c 100%);
	box-sizing: border-box;
	line-height: 1;
	cursor: pointer;
}
.toggle-label-text {
	font-size: 0.95rem;
	color: #f3f4f6;
}
.toggle-input {
	position: absolute;
	opacity: 0;
	pointer-events: none;
}
.toggle-track {
	width: 42px;
	height: 22px;
	display: inline-flex;
	align-items: center;
	flex-shrink: 0;
	border-radius: 999px;
	background: linear-gradient(180deg, #4b5563 0%, #374151 100%);
	padding: 2px;
	box-sizing: border-box;
	box-shadow: inset 0 1px 2px #0007;
	transition: background 0.2s ease, box-shadow 0.2s ease;
}
.toggle-thumb {
	display: block;
	width: 18px;
	height: 18px;
	border-radius: 50%;
	background: radial-gradient(circle at 35% 35%, #ffffff 0%, #e5e7eb 70%, #d1d5db 100%);
	box-shadow: 0 1px 2px #0006;
	transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.toggle-input:checked + .toggle-track {
	background: linear-gradient(180deg, #3b82f6 0%, #1d4ed8 100%);
	box-shadow: inset 0 1px 2px #0005, 0 0 0 1px #60a5fa66;
}
.toggle-input:checked + .toggle-track .toggle-thumb {
	transform: translateX(20px);
	box-shadow: 0 2px 4px #0008;
}
.toggle-input:focus-visible + .toggle-track {
	box-shadow: 0 0 0 2px #93c5fd;
}
.time-range-row {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 8px;
}
.team-preview {
	display: flex;
	align-items: center;
	gap: 8px;
	height: var(--control-height);
	padding: 0 10px;
	border: 1px solid #3a3a3a;
	border-radius: 6px;
	background: #202020;
	box-sizing: border-box;
	font-size: 0.92rem;
	color: #d1d5db;
}
.simple-checkbox {
	display: flex;
	align-items: center;
	gap: 8px;
	height: var(--control-height);
	padding: 0 10px;
	border: 1px solid #3a3a3a;
	border-radius: 6px;
	background: #202020;
	box-sizing: border-box;
	cursor: pointer;
}
.simple-checkbox input {
	width: 16px;
	height: 16px;
	margin: 0;
}
.side-options {
	display: flex;
	justify-content: flex-end;
}
.team-logo {
	width: 22px;
	height: 22px;
	object-fit: contain;
	border-radius: 4px;
	background: transparent;
	padding: 0;
}
.calendar-event .team-logo {
	width: 48px;
	height: 48px;
}
#teamPreviewLogo.team-logo {
	width: 28px;
	height: 28px;
}
.event-label-wrap {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 4px;
}
.matchup-inline {
	display: inline-flex;
	align-items: center;
	gap: 4px;
}
.event-badge {
	font-size: 0.72rem;
	line-height: 1;
	padding: 3px 6px;
	border-radius: 999px;
	background: #f59e0b;
	color: #111827;
	font-weight: 700;
}
.editor-form input,
.editor-form select,
.editor-form button,
.inline-controls button {
	height: var(--control-height);
	border: 1px solid #3a3a3a;
	border-radius: 6px;
	background: #202020;
	color: #eee;
	padding: 0 10px;
	box-sizing: border-box;
}
.editor-form select {
	appearance: none;
	background-image: linear-gradient(45deg, transparent 50%, #93c5fd 50%), linear-gradient(135deg, #93c5fd 50%, transparent 50%);
	background-position: calc(100% - 16px) calc(50% - 3px), calc(100% - 10px) calc(50% - 3px);
	background-size: 6px 6px, 6px 6px;
	background-repeat: no-repeat;
	padding-right: 30px;
}
.event-form textarea {
	border: 1px solid #3a3a3a;
	border-radius: 6px;
	background: #202020;
	color: #eee;
	padding: 10px;
	box-sizing: border-box;
	min-height: 92px;
	resize: vertical;
	font-family: inherit;
}
.editor-form button,
.inline-controls button {
	cursor: pointer;
	background: #2563eb;
	border-color: #2563eb;
}
.inline-controls button.danger { background: #b91c1c; border-color: #b91c1c; }
.editable-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.inline-controls { display: flex; gap: 6px; }
.backend-links {
	display: flex;
	gap: 10px;
	margin-top: 12px;
	margin-bottom: 12px;
}
.backend-links a {
	display: inline-block;
	padding: 6px 10px;
	border: 1px solid #3a3a3a;
	border-radius: 6px;
	color: #c7d2fe;
	text-decoration: none;
	font-size: 0.9rem;
	background: #202020;
}
.backend-links a:hover {
	border-color: #60a5fa;
	color: #dbeafe;
}
.link-row { margin-top: 16px; }
.link-row a { color: #93c5fd; text-decoration: none; }
.link-row a:hover { text-decoration: underline; }

.admin-page .calendar-day {
	cursor: pointer;
	transition: transform 0.08s ease, box-shadow 0.12s ease;
}

.admin-page .calendar-day.calendar-day-empty {
	cursor: default;
}

.admin-page .calendar-day:hover {
	transform: translateY(-1px);
	box-shadow: inset 0 0 0 1px #60a5fa;
}

.admin-page .calendar-day.calendar-day-empty:hover {
	transform: none;
	box-shadow: none;
}

@media (max-width: 640px) {
	.editor-form { grid-template-columns: 1fr; }
	.time-range-row { grid-template-columns: 1fr; }
	.editable-row { flex-direction: column; align-items: flex-start; }
	.event-detail-row { grid-template-columns: 1fr; }
	.player-teams { grid-template-columns: 1fr; }
	.player-team-soccer-stats { grid-template-columns: 1fr; }
	.player-stats-event-values { grid-template-columns: 1fr; }
}
