* {
	box-sizing: border-box;
}

:root {
	--bg: #070a12;
	--panel: #0d1422;
	--panel-strong: #121b2c;
	--line: #223149;
	--line-hot: #2dd4bf;
	--text: #e8edf7;
	--muted: #8996ac;
	--cyan: #38bdf8;
	--green: #22c55e;
	--yellow: #facc15;
	--red: #ef4444;
	--pink: #f472b6;
}

body {
	margin: 0;
	font-family: 'Fira Code', ui-monospace, SFMono-Regular, Menlo, Monaco,
		Consolas, 'Liberation Mono', 'Courier New', monospace;
	background:
		linear-gradient(135deg, rgba(56, 189, 248, 0.1), transparent 28%),
		linear-gradient(315deg, rgba(244, 114, 182, 0.08), transparent 28%),
		var(--bg);
	color: var(--text);
}

body::before {
	position: fixed;
	inset: 0;
	z-index: -1;
	content: "";
	background-image:
		linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
		linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
	background-size: 42px 42px;
	mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.8), transparent 78%);
}

a {
	color: #a5f3fc;
	text-decoration: none;
}

a:hover {
	color: #ffffff;
}

.container {
	width: min(1240px, calc(100% - 32px));
	min-height: 100vh;
	margin: 0 auto;
	padding: 24px 0 56px;
	display: flex;
	flex-direction: column;
	gap: 18px;
}

.command-bar {
	position: sticky;
	top: 14px;
	z-index: 5;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 18px;
	padding: 12px;
	background: rgba(7, 10, 18, 0.82);
	border: 1px solid rgba(148, 163, 184, 0.22);
	border-radius: 16px;
	backdrop-filter: blur(14px);
	box-shadow: 0 18px 46px rgba(0, 0, 0, 0.32);
}

.cockpit-brand {
	display: flex;
	align-items: center;
	gap: 6px;
	padding: 4px;
	border: 1px solid rgba(56, 189, 248, 0.2);
	border-radius: 14px;
	background:
		linear-gradient(90deg, rgba(56, 189, 248, 0.1), transparent 52%),
		#0b1220;
	box-shadow: inset 0 0 24px rgba(56, 189, 248, 0.08);
}

.cockpit-brand span {
	display: grid;
	width: 34px;
	height: 34px;
	place-items: center;
	border: 1px solid rgba(148, 163, 184, 0.22);
	border-radius: 10px;
	background:
		linear-gradient(180deg, rgba(255, 255, 255, 0.08), transparent),
		#101827;
	color: #e8edf7;
	font-size: 15px;
	font-weight: 800;
	text-shadow: 0 0 14px rgba(45, 212, 191, 0.8);
}

.cockpit-brand span:nth-child(1),
.cockpit-brand span:nth-child(4) {
	border-color: rgba(56, 189, 248, 0.42);
	color: #a5f3fc;
}

.cockpit-brand span:nth-child(2),
.cockpit-brand span:nth-child(5) {
	border-color: rgba(45, 212, 191, 0.42);
	color: #99f6e4;
}

.cockpit-brand span:nth-child(3) {
	border-color: rgba(244, 114, 182, 0.42);
	color: #fbcfe8;
}

.status-area {
	display: flex;
	align-items: center;
	justify-content: flex-end;
	gap: 10px;
	flex-wrap: wrap;
}

.status-button,
.section-heading a,
.actions a {
	min-height: 34px;
	padding: 8px 12px;
	border: 1px solid rgba(148, 163, 184, 0.25);
	border-radius: 10px;
	background: #101827;
	color: var(--text);
	font: inherit;
	font-size: 12px;
	cursor: pointer;
	transition: border-color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.status-button:hover:not(:disabled),
.section-heading a:hover,
.actions a:hover {
	border-color: rgba(45, 212, 191, 0.7);
	background: #142033;
	transform: translateY(-1px);
}

.status-button:disabled {
	opacity: 0.65;
	cursor: wait;
}

.status-timestamp,
.status-live {
	padding: 8px 10px;
	border: 1px solid rgba(148, 163, 184, 0.16);
	border-radius: 10px;
	background: rgba(15, 23, 42, 0.72);
	font-size: 12px;
	color: var(--muted);
}

.status-live {
	position: relative;
	padding-left: 26px;
	color: #cbd5e1;
}

.status-live::before {
	position: absolute;
	top: 50%;
	left: 10px;
	width: 8px;
	height: 8px;
	border-radius: 50%;
	content: "";
	transform: translateY(-50%);
	background: currentColor;
	box-shadow: 0 0 16px currentColor;
}

.status-live.status-online {
	color: var(--green);
}

.status-live.status-waiting {
	color: var(--yellow);
}

.status-live.status-offline {
	color: var(--red);
}

.panel {
	position: relative;
	overflow: hidden;
	background:
		linear-gradient(145deg, rgba(255, 255, 255, 0.06), transparent 30%),
		var(--panel);
	border: 1px solid rgba(148, 163, 184, 0.2);
	border-radius: 18px;
	box-shadow: 0 22px 70px rgba(0, 0, 0, 0.3);
}

.panel::after {
	position: absolute;
	inset: auto 0 0;
	height: 3px;
	content: "";
	background: linear-gradient(90deg, var(--cyan), var(--line-hot), var(--pink));
	opacity: 0.75;
}

.section-heading {
	position: relative;
	z-index: 1;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	margin-bottom: 18px;
}

.section-heading.compact {
	margin-bottom: 14px;
}

.eyebrow {
	display: block;
	margin-bottom: 5px;
	color: var(--line-hot);
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 1.8px;
	text-transform: uppercase;
}

h2,
h3,
p {
	margin: 0;
}

.section-heading h2 {
	font-size: 22px;
	line-height: 1.1;
}

.actions {
	display: flex;
	align-items: center;
	gap: 8px;
}

.icon-link {
	display: grid;
	width: 40px;
	padding: 7px;
	place-items: center;
}

.icon-link img {
	width: 22px;
	height: 22px;
}

.scoreboard {
	padding: 22px;
}

.score-grid {
	position: relative;
	z-index: 1;
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 16px;
}

.card {
	position: relative;
	overflow: hidden;
	display: flex;
	flex-direction: column;
	gap: 14px;
	min-height: 138px;
	padding: 16px;
	background: var(--panel-strong);
	border: 1px solid rgba(148, 163, 184, 0.18);
	border-radius: 16px;
}

.card::before {
	position: absolute;
	top: 0;
	right: 0;
	width: 96px;
	height: 96px;
	content: "";
	background:
		linear-gradient(135deg, transparent 0 48%, rgba(255, 255, 255, 0.12) 48% 52%, transparent 52%),
		linear-gradient(45deg, transparent 0 48%, rgba(255, 255, 255, 0.08) 48% 52%, transparent 52%);
	opacity: 0.65;
}

.player-card {
	min-height: 240px;
	padding: 18px;
	border-color: rgba(56, 189, 248, 0.26);
}

.player-denis {
	background:
		linear-gradient(135deg, rgba(56, 189, 248, 0.2), transparent 52%),
		var(--panel-strong);
}

.player-diogo {
	background:
		linear-gradient(135deg, rgba(244, 114, 182, 0.18), transparent 52%),
		var(--panel-strong);
}

.player-topline {
	display: flex;
	align-items: center;
	gap: 12px;
}

.player-avatar {
	overflow: hidden;
	display: grid;
	width: 54px;
	height: 54px;
	place-items: center;
	border: 1px solid rgba(255, 255, 255, 0.2);
	border-radius: 15px;
	background:
		linear-gradient(145deg, rgba(45, 212, 191, 0.26), rgba(56, 189, 248, 0.08)),
		#0a101b;
	color: #ffffff;
	font-size: 24px;
	font-weight: 800;
	box-shadow: inset 0 0 24px rgba(45, 212, 191, 0.16);
}

.player-avatar img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.player-card h3 {
	font-size: 24px;
}

.metric-list {
	position: relative;
	z-index: 1;
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 10px;
	margin: auto 0 0;
	padding: 0;
	list-style: none;
}

.metric-list li {
	min-height: 82px;
	padding: 12px;
	border: 1px solid rgba(148, 163, 184, 0.16);
	border-radius: 14px;
	background: rgba(5, 10, 20, 0.42);
}

.metric-list li > span {
	display: block;
	margin-bottom: 8px;
	color: var(--muted);
	font-size: 11px;
	text-transform: uppercase;
}

.metric-list strong {
	display: block;
	color: #ffffff;
	font-size: 24px;
	line-height: 1.05;
	word-break: break-word;
}

.metric-list .time-left {
	grid-column: 1 / -1;
	min-height: 70px;
}

.metric-list .time-left strong {
	font-size: 16px;
	line-height: 1.35;
}

.telemetry-divider {
	display: grid;
	grid-template-columns: 18px 1fr 70px 1fr 18px;
	align-items: center;
	gap: 10px;
	min-height: 30px;
	padding: 0 8px;
}

.telemetry-line {
	height: 1px;
	background:
		linear-gradient(90deg, transparent, rgba(56, 189, 248, 0.48), rgba(45, 212, 191, 0.58), transparent),
		linear-gradient(90deg, transparent 0 45%, rgba(255, 255, 255, 0.45) 45% 47%, transparent 47%);
}

.telemetry-node {
	width: 18px;
	height: 18px;
	border: 1px solid rgba(45, 212, 191, 0.65);
	border-radius: 50%;
	background: #08111d;
	box-shadow:
		0 0 18px rgba(45, 212, 191, 0.28),
		inset 0 0 10px rgba(45, 212, 191, 0.16);
}

.telemetry-pulse {
	height: 20px;
	border: 1px solid rgba(244, 114, 182, 0.45);
	border-radius: 999px;
	background:
		linear-gradient(90deg, transparent 0 16%, rgba(244, 114, 182, 0.52) 16% 24%, transparent 24% 40%, rgba(56, 189, 248, 0.5) 40% 48%, transparent 48% 66%, rgba(45, 212, 191, 0.52) 66% 74%, transparent 74%),
		#0d1422;
	box-shadow: inset 0 0 16px rgba(244, 114, 182, 0.12);
}

.layout {
	display: grid;
	grid-template-columns: minmax(520px, 0.95fr) minmax(320px, 0.65fr);
	gap: 18px;
	align-items: start;
}

.payments-panel,
.store-panel {
	padding: 18px;
}

.payments-table {
	position: relative;
	z-index: 1;
	overflow-x: auto;
	border-radius: 14px;
	border: 1px solid rgba(148, 163, 184, 0.16);
}

.payments-table table {
	width: 100%;
	border-collapse: collapse;
	font-size: 12px;
	color: #d5deef;
}

.payments-table th,
.payments-table td {
	border-bottom: 1px solid rgba(148, 163, 184, 0.14);
	padding: 10px;
	text-align: left;
	vertical-align: top;
}

.payments-table th {
	position: sticky;
	top: 0;
	background: #182234;
	color: #ffffff;
	font-weight: 700;
}

.payments-table tr:nth-child(even) td {
	background: rgba(255, 255, 255, 0.025);
}

.payments-table tr.row-past-month td {
	background: rgba(239, 68, 68, 0.14);
	color: #fecaca;
}

.payments-table tr.row-current-month td {
	background: rgba(250, 204, 21, 0.14);
	color: #fef08a;
}

.payments-table tr.is-loading td {
	height: 38px;
	color: transparent;
}

.payments-table tr.is-loading td::before {
	display: block;
	width: min(72px, 70%);
	height: 10px;
	border-radius: 999px;
	background: rgba(148, 163, 184, 0.16);
	content: "";
}

.payments-table td.payment-current-date,
.payments-table .cell-note span.payment-current-date {
	background: rgba(250, 204, 21, 0.22);
	color: #fef08a;
	font-weight: 700;
}

.payments-table td.payment-past,
.payments-table .cell-note span.payment-past {
	background: rgba(239, 68, 68, 0.22);
	color: #fecaca;
	font-weight: 700;
}

.payments-table .cell-competencia {
	font-weight: 700;
	color: #ffffff;
}

.payments-table .cell-note {
	color: #e2e8f0;
	font-size: 11px;
	line-height: 1.4;
}

.payments-table .cell-note span {
	display: block;
	margin-bottom: 6px;
	padding: 5px 7px;
	border-radius: 9px;
}

.payments-table .cell-note .cell-note-empty {
	color: transparent;
	padding: 0;
}

.payments-error {
	padding: 14px;
	font-size: 13px;
	color: var(--muted);
}

.grid,
.store-shelf {
	position: relative;
	z-index: 1;
	display: grid;
	grid-template-columns: 1fr;
	gap: 12px;
}

.store-shelf .card {
	min-height: 118px;
	border-left: 4px solid var(--line-hot);
	background:
		linear-gradient(90deg, rgba(45, 212, 191, 0.14), transparent 55%),
		var(--panel-strong);
}

.store-shelf .card h3 {
	font-size: 16px;
	line-height: 1.25;
}

.store-shelf .card ul {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin: 0;
	padding: 0;
	list-style: none;
	color: #d5deef;
}

.store-shelf .card li {
	padding: 7px 9px;
	border: 1px solid rgba(148, 163, 184, 0.16);
	border-radius: 10px;
	background: rgba(5, 10, 20, 0.38);
}

.card strong {
	color: #ffffff;
}

.card.error {
	border-color: rgba(248, 113, 113, 0.55);
	background: rgba(127, 29, 29, 0.32);
}

.card.empty {
	border-style: dashed;
	color: var(--muted);
}

@media (max-width: 900px) {
	.command-bar,
	.section-heading {
		align-items: flex-start;
		flex-direction: column;
	}

	.status-area {
		width: 100%;
		justify-content: flex-start;
	}

	.score-grid,
	.layout {
		grid-template-columns: 1fr;
	}

}

@media (max-width: 640px) {
	.container {
		width: min(100% - 20px, 1240px);
		padding-top: 10px;
	}

	.command-bar {
		position: static;
	}

	.cockpit-brand {
		width: 100%;
		justify-content: space-between;
	}

	.status-area > * {
		width: 100%;
	}

	.scoreboard,
	.payments-panel,
	.store-panel {
		padding: 14px;
	}

	.section-heading h2 {
		font-size: 19px;
	}

	.metric-list {
		grid-template-columns: 1fr;
	}

	.metric-list .time-left {
		grid-column: auto;
	}

	.telemetry-divider {
		grid-template-columns: 14px 1fr 46px 1fr 14px;
		gap: 7px;
	}
}
