:root {
	--bg: #1b1a18;
	--panel: #252320;
	--row: #2f2c28;
	--line: #3a3732;
	--text: #ece8e1;
	--muted: #a7a196;
	--gold: #f5c84a;
	--green: #46b45a;
	--purple: #9a5ae6;
	--red: #d65a4a;
	--robux: #00aa6e;
	color-scheme: dark;
}

* {
	box-sizing: border-box;
}

body {
	margin: 0;
	background: var(--bg);
	color: var(--text);
	font: 15px/1.45 system-ui, -apple-system, "Segoe UI", sans-serif;
}

a {
	color: var(--gold);
}

button,
input,
select,
textarea {
	font: inherit;
	color: inherit;
}

input,
select,
textarea {
	background: #161513;
	border: 1px solid var(--line);
	border-radius: 8px;
	padding: 8px 10px;
	min-width: 0;
}

input:focus,
select:focus,
textarea:focus {
	outline: 2px solid var(--gold);
	outline-offset: -1px;
}

button {
	background: var(--green);
	border: 0;
	border-radius: 8px;
	padding: 8px 14px;
	font-weight: 600;
	cursor: pointer;
	white-space: nowrap;
}

button:disabled {
	opacity: 0.5;
	cursor: default;
}

button.secondary {
	background: var(--line);
}

button.danger {
	background: var(--red);
}

button.purple {
	background: var(--purple);
}

.layout {
	display: grid;
	grid-template-columns: 200px 1fr;
	min-height: 100vh;
}

nav {
	background: var(--panel);
	border-right: 1px solid var(--line);
	padding: 18px 12px;
	display: flex;
	flex-direction: column;
	gap: 4px;
}

nav .brand {
	font-weight: 800;
	color: var(--gold);
	font-size: 18px;
	padding: 0 10px 14px;
}

nav a {
	color: var(--text);
	text-decoration: none;
	padding: 8px 10px;
	border-radius: 8px;
}

nav a.active,
nav a:hover {
	background: var(--row);
}

nav .spacer {
	flex: 1;
}

nav .who {
	color: var(--muted);
	font-size: 13px;
	padding: 0 10px 8px;
}

main {
	padding: 24px;
	max-width: 1100px;
	width: 100%;
}

h1 {
	font-size: 22px;
	margin: 0 0 18px;
}

h2 {
	font-size: 16px;
	margin: 0 0 12px;
	color: var(--gold);
}

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

.card,
.box {
	background: var(--panel);
	border: 1px solid var(--line);
	border-radius: 12px;
	padding: 14px 16px;
}

.box {
	margin-bottom: 16px;
}

.card .label {
	color: var(--muted);
	font-size: 13px;
}

.card .value {
	font-size: 26px;
	font-weight: 800;
}

table {
	width: 100%;
	border-collapse: collapse;
}

th,
td {
	text-align: left;
	padding: 8px 6px;
	border-bottom: 1px solid var(--line);
	vertical-align: top;
}

th {
	color: var(--muted);
	font-weight: 600;
	font-size: 13px;
}

tr.link {
	cursor: pointer;
}

tr.link:hover td {
	background: var(--row);
}

.row {
	display: flex;
	gap: 8px;
	flex-wrap: wrap;
	align-items: center;
	margin-bottom: 10px;
}

.row > input,
.row > textarea {
	flex: 1;
}

.muted {
	color: var(--muted);
}

.pill {
	display: inline-block;
	padding: 2px 8px;
	border-radius: 999px;
	font-size: 12px;
	font-weight: 700;
	background: var(--line);
}

.pill.on {
	background: var(--green);
}

.pill.bad {
	background: var(--red);
}

.pill.boost {
	background: var(--purple);
}

.grid2 {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
	gap: 16px;
}

dl {
	display: grid;
	grid-template-columns: max-content 1fr;
	gap: 6px 16px;
	margin: 0;
}

dt {
	color: var(--muted);
}

dd {
	margin: 0;
	overflow-wrap: anywhere;
}

pre {
	background: #161513;
	border-radius: 8px;
	padding: 10px;
	overflow: auto;
	max-height: 360px;
	font-size: 12px;
}

code {
	background: #161513;
	padding: 2px 6px;
	border-radius: 6px;
	overflow-wrap: anywhere;
}

svg.chart {
	width: 100%;
	height: 140px;
	display: block;
}

.login {
	max-width: 360px;
	margin: 12vh auto;
	padding: 0 16px;
}

.login .box {
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.error {
	color: #ff8a7a;
}

#toast {
	position: fixed;
	bottom: 20px;
	left: 50%;
	transform: translateX(-50%);
	background: var(--panel);
	border: 1px solid var(--line);
	border-left: 4px solid var(--green);
	padding: 10px 16px;
	border-radius: 10px;
	max-width: calc(100% - 32px);
	box-shadow: 0 6px 24px #0008;
}

#toast.bad {
	border-left-color: var(--red);
}

@media (max-width: 760px) {
	.layout {
		grid-template-columns: 1fr;
	}
	nav {
		flex-direction: row;
		flex-wrap: wrap;
		border-right: 0;
		border-bottom: 1px solid var(--line);
		padding: 10px;
	}
	nav .brand {
		width: 100%;
		padding-bottom: 6px;
	}
	nav .spacer,
	nav .who {
		display: none;
	}
	main {
		padding: 16px;
	}
	.hide-small {
		display: none;
	}
}

.m0 {
	margin: 0;
}

.mt {
	margin-top: 10px;
}

.mb {
	margin-bottom: 10px;
}

.row > .narrow {
	width: 90px;
	flex: none;
}

.row > .narrow.wide {
	width: 140px;
}

.hpbar {
	height: 22px;
	border-radius: 8px;
	background: #3c1a1a;
	overflow: hidden;
}

.hpfill {
	height: 100%;
	background: var(--red);
}
