:root {
	--bg: #f4f1f2;
	--surface: rgba(255, 255, 255, 0.76);
	--surface-strong: rgba(255, 255, 255, 0.94);
	--surface-muted: rgba(25, 27, 36, 0.08);
	--text: #171922;
	--text-soft: #5e6475;
	--line: rgba(23, 25, 34, 0.1);
	--accent: #ff4149;
	--accent-strong: #db2736;
	--accent-soft: rgba(255, 65, 73, 0.14);
	--accent-glow: rgba(255, 65, 73, 0.32);
	--shadow: 0 24px 60px rgba(17, 19, 27, 0.14);
	--error: #d7263d;
	--ok: #1f9d68;
	--na: #9ba1af;
	--bold: 700;
}

body {
	margin: 0;
	min-height: 100vh;
	font-family: "IBM Plex Sans", sans-serif;
	color: var(--text);
	background:
		radial-gradient(circle at top left, rgba(255, 65, 73, 0.16), transparent 28%),
		radial-gradient(circle at top right, rgba(26, 29, 42, 0.16), transparent 26%),
		linear-gradient(180deg, #f9f7f8 0%, #ece8ea 100%);
}

p {
	margin: 0;
	font-size: 14px;
	line-height: 1.55;
}

h1 {
	margin: 0;
	font-family: "Space Grotesk", sans-serif;
	font-size: clamp(2rem, 4vw, 3rem);
	line-height: 1.02;
}

h2 {
	margin: 0;
	font-family: "Space Grotesk", sans-serif;
	font-size: 1.4rem;
}

h3 {
	font-size: 16px;
	margin-bottom: 14px;
}

h4 {
	font-size: 14px;
	margin-bottom: 10px;
	margin-top: 0;
	font-weight: var(--bold);
}

table {
	width: 100%;
}

table, th, td {
	border: 1px solid var(--line);
	border-collapse: collapse;
}

th, td {
	padding: 0.5rem 0.75rem;
}

th {
	background-color: var(--surface-muted);
}

thead th {
	text-align: left;
}

label {
	display: block;
	margin-bottom: 0.25rem;
}

a {
	color: inherit;
	text-decoration: none;
}

button,
input {
	font: inherit;
}

.header {
	padding: 1rem 1.5rem;
	background: rgba(15, 16, 25, 0.92);
	display: flex;
	align-items: center;
	gap: 0.9rem;
	border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.header .logo {
	height: 2.4rem;
	width: 2.4rem;
	border-radius: 0.5rem;
	filter: drop-shadow(0 10px 18px rgba(255, 65, 73, 0.3));
}

.header .title {
	font-family: "Space Grotesk", sans-serif;
	font-size: 1.2rem;
	font-weight: 700;
	letter-spacing: 0.03em;
	color: #ffffff;
}

.menu {
	background: rgba(255, 255, 255, 0.72);
	backdrop-filter: blur(16px);
	padding: 0.9rem 1.5rem;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	border-bottom: 1px solid rgba(23, 25, 34, 0.08);
}

.menu .pages {
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem;
}

.menu .pages .page {
	padding: 0.55rem 0.9rem;
	border-radius: 999px;
	color: var(--text-soft);
	font-weight: 600;
	transition: background-color 160ms ease, color 160ms ease, transform 160ms ease;
}

.menu .pages .page:hover,
.menu .pages .page:focus-visible {
	background: var(--accent-soft);
	color: var(--accent-strong);
	transform: translateY(-1px);
}

.menu .account {
	display: flex;
	align-items: center;
	gap: 1rem;
	color: var(--text-soft);
}

.menu .account .username {
	font-weight: var(--bold);
	color: var(--text);
}

.dashboard-shell {
	width: min(960px, calc(100% - 2rem));
	margin: 2rem auto 3rem;
}

.auth-shell {
	min-height: calc(100vh - 5rem);
	display: grid;
	place-items: center;
	padding: 2rem 1rem 3rem;
}

.auth-card {
	width: min(32rem, 100%);
	padding: 2rem;
	border: 1px solid rgba(255, 255, 255, 0.8);
	border-radius: 28px;
	box-shadow: var(--shadow);
	background:
		linear-gradient(135deg, rgba(17, 19, 27, 0.96), rgba(35, 38, 51, 0.9)),
		linear-gradient(120deg, rgba(255, 65, 73, 0.12), transparent 60%);
	color: #ffffff;
}

.auth-copy {
	margin-top: 1rem;
	color: rgba(255, 255, 255, 0.8);
	font-size: 0.98rem;
}

.auth-button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	margin-top: 1.5rem;
}

.hero-card,
.panel {
	border: 1px solid rgba(255, 255, 255, 0.8);
	border-radius: 28px;
	box-shadow: var(--shadow);
}

.hero-card {
	background:
		linear-gradient(135deg, rgba(17, 19, 27, 0.96), rgba(35, 38, 51, 0.9)),
		linear-gradient(120deg, rgba(255, 65, 73, 0.12), transparent 60%);
	color: #fff;
	padding: 2rem;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	overflow: hidden;
	position: relative;
}

.hero-card::after {
	content: "";
	position: absolute;
	inset: auto -3rem -4rem auto;
	width: 12rem;
	height: 12rem;
	background: radial-gradient(circle, rgba(255, 65, 73, 0.42), transparent 68%);
	pointer-events: none;
}

.hero-copy {
	max-width: 40rem;
	display: grid;
	gap: 0.9rem;
}

.eyebrow {
	text-transform: uppercase;
	letter-spacing: 0.18em;
	font-size: 0.78rem;
	color: rgba(255, 255, 255, 0.68);
}

.hero-text {
	max-width: 36rem;
	color: rgba(255, 255, 255, 0.8);
	font-size: 0.98rem;
}

.hero-badge {
	position: relative;
	z-index: 1;
	min-width: 5.5rem;
	height: 5.5rem;
	border-radius: 1.6rem;
	display: grid;
	place-items: center;
	background: linear-gradient(180deg, #ff5962 0%, #f23342 100%);
	font-family: "Space Grotesk", sans-serif;
	font-size: 1.8rem;
	font-weight: 700;
	box-shadow: 0 20px 40px rgba(255, 65, 73, 0.32);
}

.panel {
	margin-top: 1.5rem;
	padding: 1.6rem;
	background: var(--surface);
	backdrop-filter: blur(18px);
}

.table-wrap {
	overflow-x: auto;
}

.data-table {
	background: var(--surface-strong);
	border-radius: 22px;
	overflow: hidden;
}

.data-table td {
	background: rgba(255, 255, 255, 0.82);
}

.empty-cell {
	padding: 2rem 1rem;
	text-align: center;
	color: var(--text-soft);
}

.stream-link {
	font-weight: 700;
	color: var(--accent-strong);
}

.stream-link:hover,
.stream-link:focus-visible {
	text-decoration: underline;
}

.match-meta {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	min-width: 12rem;
}

.rank-art {
	width: 2.5rem;
	height: 2.5rem;
	object-fit: contain;
	flex-shrink: 0;
	filter: drop-shadow(0 10px 18px rgba(17, 19, 27, 0.18));
}

.match-copy {
	display: grid;
	gap: 0.15rem;
}

.match-primary {
	font-weight: 700;
}

.match-secondary {
	font-size: 0.82rem;
	color: var(--text-soft);
}


.panel-header {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 1rem;
	margin-bottom: 1.5rem;
}

.panel-subtitle {
	margin-top: 0.4rem;
	color: var(--text-soft);
}

.status-pill {
	display: inline-flex;
	align-items: center;
	padding: 0.45rem 0.8rem;
	border-radius: 999px;
	background: var(--accent-soft);
	color: var(--accent-strong);
	font-size: 0.82rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.08em;
}

.live-pill {
	background: rgba(215, 38, 61, 0.14);
	color: var(--error);
}

.rr-positive {
	color: var(--ok);
	font-weight: 700;
}

.rr-negative {
	color: var(--error);
	font-weight: 700;
}

.pagination {
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem;
	margin-top: 1.25rem;
}

.page-chip {
	padding: 0.55rem 0.85rem;
	border-radius: 999px;
	background: var(--surface-strong);
	border: 1px solid var(--line);
	font-weight: 600;
	color: var(--text-soft);
}

.page-chip.is-active {
	background: var(--accent-soft);
	border-color: rgba(255, 65, 73, 0.2);
	color: var(--accent-strong);
}

.page-chip.is-disabled {
	pointer-events: none;
	opacity: 0.45;
}

.settings-form {
	display: grid;
	gap: 1.2rem;
}

.toggle-card,
.field-group {
	padding: 1.2rem 1.25rem;
	border-radius: 22px;
	background: var(--surface-strong);
	border: 1px solid var(--line);
}

.toggle-card {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	cursor: pointer;
}

.toggle-copy {
	display: grid;
	gap: 0.35rem;
}

.field-title {
	font-size: 0.96rem;
	font-weight: 700;
}

.field-help {
	color: var(--text-soft);
	font-size: 0.92rem;
}

.toggle-control {
	position: relative;
	flex-shrink: 0;
}

.toggle-control input {
	position: absolute;
	opacity: 0;
	pointer-events: none;
}

.toggle-slider {
	display: inline-block;
	width: 4.4rem;
	height: 2.5rem;
	border-radius: 999px;
	background: rgba(24, 26, 35, 0.14);
	border: 1px solid rgba(24, 26, 35, 0.08);
	box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.22);
	transition: background-color 180ms ease, box-shadow 180ms ease;
	position: relative;
}

.toggle-slider::before {
	content: "";
	position: absolute;
	top: 0.25rem;
	left: 0.25rem;
	width: 2rem;
	height: 2rem;
	border-radius: 50%;
	background: #ffffff;
	box-shadow: 0 10px 20px rgba(17, 19, 27, 0.18);
	transition: transform 180ms ease;
}

.toggle-control input:checked + .toggle-slider {
	background: linear-gradient(180deg, #ff5962 0%, #f23342 100%);
	box-shadow: 0 0 0 5px var(--accent-glow);
}

.toggle-control input:checked + .toggle-slider::before {
	transform: translateX(1.9rem);
}

.toggle-control input:focus-visible + .toggle-slider,
input[type="text"]:focus-visible,
.primary-button:focus-visible {
	outline: 3px solid rgba(255, 65, 73, 0.24);
	outline-offset: 3px;
}

input[type="text"] {
	width: 100%;
	box-sizing: border-box;
	margin-top: 0.85rem;
	padding: 0.95rem 1rem;
	border-radius: 16px;
	border: 1px solid rgba(23, 25, 34, 0.12);
	background: #ffffff;
	color: var(--text);
	transition: border-color 160ms ease, box-shadow 160ms ease;
}

input[type="text"]::placeholder {
	color: #8f94a3;
}

input[type="text"]:focus {
	border-color: rgba(255, 65, 73, 0.45);
	box-shadow: 0 0 0 4px rgba(255, 65, 73, 0.12);
}

.form-actions {
	display: flex;
	justify-content: flex-end;
}

.primary-button {
	border: 0;
	border-radius: 999px;
	padding: 0.9rem 1.35rem;
	background: linear-gradient(180deg, #ff5962 0%, #ee3140 100%);
	color: #ffffff;
	font-weight: 700;
	letter-spacing: 0.02em;
	cursor: pointer;
	box-shadow: 0 16px 30px rgba(255, 65, 73, 0.28);
	transition: transform 160ms ease, box-shadow 160ms ease;
}

.primary-button:hover,
.primary-button:focus-visible {
	transform: translateY(-1px);
	box-shadow: 0 20px 34px rgba(255, 65, 73, 0.34);
}

@media (max-width: 720px) {
	.menu,
	.panel-header,
	.toggle-card,
	.hero-card {
		flex-direction: column;
		align-items: flex-start;
	}

	.dashboard-shell {
		width: min(100% - 1rem, 960px);
		margin-top: 1rem;
	}

	.hero-card,
	.panel {
		padding: 1.25rem;
	}

	.hero-badge {
		min-width: 4.4rem;
		height: 4.4rem;
		font-size: 1.5rem;
	}

	.form-actions {
		justify-content: stretch;
	}

	.primary-button {
		width: 100%;
	}
}

@media (prefers-reduced-motion: reduce) {
	* {
		scroll-behavior: auto;
		transition: none !important;
	}
}
