
@font-face {
	font-family: 'VK Sans Display';
	src: url( '../fonts/VKSansDisplay-DemiBold.ttf' ) format( 'truetype' );
	font-weight: 400 900;
	font-display: swap;
}

/* Inter and Roboto Mono are served locally (Fontsource builds, OFL): latin and cyrillic subsets */
@font-face { font-family: 'Inter'; src: url( '../fonts/inter-latin-500-normal.woff2' ) format( 'woff2' ); font-weight: 500; font-display: swap; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Inter'; src: url( '../fonts/inter-latin-600-normal.woff2' ) format( 'woff2' ); font-weight: 600; font-display: swap; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Inter'; src: url( '../fonts/inter-latin-700-normal.woff2' ) format( 'woff2' ); font-weight: 700; font-display: swap; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Inter'; src: url( '../fonts/inter-cyrillic-500-normal.woff2' ) format( 'woff2' ); font-weight: 500; font-display: swap; unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'Inter'; src: url( '../fonts/inter-cyrillic-600-normal.woff2' ) format( 'woff2' ); font-weight: 600; font-display: swap; unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'Inter'; src: url( '../fonts/inter-cyrillic-700-normal.woff2' ) format( 'woff2' ); font-weight: 700; font-display: swap; unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'Roboto Mono'; src: url( '../fonts/roboto-mono-latin-400-normal.woff2' ) format( 'woff2' ); font-weight: 400; font-display: swap; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Roboto Mono'; src: url( '../fonts/roboto-mono-cyrillic-400-normal.woff2' ) format( 'woff2' ); font-weight: 400; font-display: swap; unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }

:root {
	--bg: #171717;
	--surface: #1b1b1b;
	--surface-2: #1d1d1d;
	--control: #222222;
	--surface-3: #2e2e2e;
	--line: #2e2e2e;
	--track: #3b3b3b;
	--chart-dim: #4f2529;
	--text: #ffffff;
	--text-muted: #5e5e5e;
	--text-soft: #a0a0a0;
	--accent: #dc3545;
	--accent-dark: #7e2a32;
	--accent-bg: rgba( 220, 53, 69, .12 );
	--success: #35dc6e;
	--success-bg: rgba( 53, 220, 110, .12 );
	--warning: #dc7b35;
	--warning-bg: rgba( 220, 123, 53, .12 );
	--info: #35bbd9;
	--radius-s: 4px;
	--radius: 6px;
	--radius-l: 12px;
	--sidebar-w: 290px;
	--gap: 20px;
	--pad: 35px;
	--font: 'VK Sans Display', 'Inter', system-ui, sans-serif;
	--font-mono: 'Roboto Mono', monospace;
}

*, *::before, *::after { box-sizing: border-box; }

[hidden] { display: none !important; }

html { -webkit-text-size-adjust: 100%; }

body {
	margin: 0;
	min-height: 100vh;
	background: var( --bg );
	color: var( --text );
	font: 500 14px/1.6 var( --font );
}

body.is-locked { overflow: hidden; }

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

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

button { cursor: pointer; background: none; border: 0; padding: 0; }

.icon { display: block; width: 24px; height: 24px; flex-shrink: 0; }

/* Layout */

.sidebar {
	position: fixed;
	inset: 0 auto 0 0;
	width: var( --sidebar-w );
	display: flex;
	flex-direction: column;
	padding: 52px 20px 20px;
	overflow-y: auto;
	background: var( --surface );
}

.sidebar__nav { display: flex; flex-direction: column; gap: 6px; margin-top: 40px; }

.sidebar__bottom { display: flex; flex-direction: column; gap: 6px; margin-top: auto; padding-top: 16px; }

.content {
	margin-left: var( --sidebar-w );
	padding: var( --pad );
	min-width: 0;
}

.logo { font-size: 36px; font-weight: 700; line-height: 45px; text-align: center; white-space: nowrap; }

.logo span { color: var( --accent ); }

.nav-item {
	display: flex;
	align-items: center;
	gap: 14px;
	width: 100%;
	min-height: 48px;
	padding: 6px 18px;
	border-radius: var( --radius );
	color: rgba( 160, 160, 160, .5 );
	font-size: 16px;
	font-weight: 600;
	text-align: left;
	transition: background .15s, color .15s;
}

.nav-item:hover { background: rgba( 23, 23, 23, .5 ); }

.nav-item.is-active { color: var( --accent ); font-weight: 700; }

.nav-item--dashed { border: 1px dashed rgba( 93, 93, 93, .5 ); background: rgba( 23, 23, 23, .5 ); }

.topbar, .tabbar, .burger-menu { display: none; }

/* Cards & typography */

.card {
	background: var( --surface );
	border-radius: var( --radius );
	padding: 30px 40px;
}

.card__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; }

.card__title { margin: 0; font-size: 21px; font-weight: 700; line-height: 32px; }

.card__subtitle { margin: 0; color: var( --text-muted ); font-size: 14px; }

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

.text-success { color: var( --success ); }

.text-danger { color: var( --accent ); }

.text-warning { color: var( --warning ); }

/* Buttons */

.btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	height: 48px;
	padding: 0 20px;
	border-radius: var( --radius-s );
	background: var( --control );
	color: var( --text-muted );
	font-size: 14px;
	transition: filter .15s, opacity .15s;
}

.btn:hover { filter: brightness( 1.25 ); }

.btn:disabled { opacity: .5; cursor: progress; }

.btn--block { width: 100%; }

.btn--danger { background: var( --accent-bg ); color: var( --accent ); }

.btn--success { background: var( --success-bg ); color: var( --success ); }

.btn--warning { background: var( --warning-bg ); color: var( --warning ); }

.btn--primary { background: var( --accent ); color: var( --text ); }

/* Summary stats */

.stats { display: grid; grid-template-columns: repeat( 5, 1fr ); gap: var( --gap ); margin-bottom: var( --gap ); }

.stat {
	display: flex;
	align-items: center;
	gap: 15px;
	height: 96px;
	padding: 0 15px;
	border-radius: var( --radius );
	background: var( --surface );
	white-space: nowrap;
}

.stat__icon { display: grid; place-items: center; width: 56px; height: 56px; border-radius: 50%; background: var( --control ); flex-shrink: 0; }

.stat__icon .icon { width: 32px; height: 32px; }

.stat__value { font-size: 21px; font-weight: 700; line-height: 26px; }

.stat__label { color: var( --text-muted ); font-size: 14px; line-height: 20px; }

/* Dashboard grid */

.dashboard { display: grid; grid-template-columns: 612fr 928fr; gap: var( --gap ); align-items: start; }

.dashboard__col { display: flex; flex-direction: column; gap: var( --gap ); min-width: 0; }

.chart-card { padding: 40px 30px 30px 40px; }

.chart-card .card__head { margin-bottom: 30px; }

/* Select */

.select { position: relative; flex-shrink: 0; }

.select__btn {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	min-width: 181px;
	height: 48px;
	padding: 0 16px;
	border-radius: var( --radius-s );
	background: var( --control );
	color: var( --text-muted );
	white-space: nowrap;
}

.select__btn .icon { width: 16px; height: 16px; transition: transform .2s; }

.select.is-open .select__btn .icon { transform: rotate( 180deg ); }

.select__list {
	position: absolute;
	top: calc( 100% + 10px );
	right: 0;
	z-index: 10;
	display: none;
	min-width: 100%;
	overflow: hidden;
	border-radius: var( --radius-s );
	background: var( --surface-2 );
	box-shadow: 0 0 36px rgba( 0, 0, 0, .35 );
}

.select.is-open .select__list { display: block; }

.select__opt {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	width: 100%;
	height: 60px;
	padding: 0 16px;
	color: var( --text-muted );
	white-space: nowrap;
	text-align: right;
}

.select__opt:hover { background: rgba( 255, 255, 255, .03 ); }

.select__opt.is-selected { color: var( --text ); background: rgba( 255, 255, 255, .03 ); }

.select__opt--all { justify-content: flex-end; }

.checkbox {
	display: grid;
	place-items: center;
	width: 16px;
	height: 16px;
	border: 1px solid var( --text-muted );
	border-radius: var( --radius-s );
	color: transparent;
}

.checkbox .icon { width: 10px; height: 10px; }

.is-selected .checkbox { border-color: var( --accent ); background: var( --accent ); color: #f9f9f9; }

/* Dots & progress */

.dot { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var( --text-muted ); }

.dot--accent { background: var( --accent ); }

.dot--mid { background: var( --accent-dark ); }

.dot--dim { background: var( --chart-dim ); }

.progress { position: relative; height: 2px; border-radius: 12px; background: var( --track ); }

.progress i {
	position: absolute;
	inset: 0 auto 0 0;
	border-radius: 12px;
	background: linear-gradient( 90deg, rgba( 220, 53, 69, 0 ), var( --accent ) );
	box-shadow: 0 0 8px var( --accent );
	transition: width .4s;
}

/* Server card */

.server-card {
	display: grid;
	grid-template-columns: 212px 1fr;
	gap: 20px 30px;
	padding: 20px 30px 30px;
	border-radius: var( --radius );
	background: var( --surface );
}

.server-card__image {
	display: grid;
	place-items: center;
	height: 202px;
	border: 1px dashed rgba( 93, 93, 93, .5 );
	border-radius: var( --radius );
	background: rgba( 23, 23, 23, .5 );
	color: var( --surface-3 );
}

.server-card__image .icon { width: 96px; height: 96px; }

.server-card__info { display: flex; flex-direction: column; gap: 18px; padding-top: 10px; min-width: 0; }

.server-card__name { margin: 0 0 10px; font-size: 21px; font-weight: 700; line-height: 26px; }

.server-card__props { display: flex; flex-direction: column; gap: 10px; margin: 0; color: var( --text-muted ); }

.server-card__props div { display: flex; justify-content: space-between; gap: 10px; }

.server-card__props dd { margin: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.server-card__players { display: flex; align-items: center; gap: 9px; color: var( --text ); }

.server-card__players .dot { width: 9px; height: 9px; background: var( --accent ); box-shadow: 0 0 8px var( --accent ), 0 0 16px var( --accent ); }

.server-card.is-off .server-card__players .dot { background: var( --text-muted ); box-shadow: none; }

.server-card__actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

.server-card .btn { height: 48px; }

/* Bar chart */

.bar-chart { position: relative; display: flex; justify-content: space-between; gap: 4px; height: 336px; padding: 0 3px 0 40px; }

/* Bars shrink to fit 24 hours into the card; 30 px under the stacks are the time labels */
.bar { position: relative; display: flex; flex: 0 1 36px; flex-direction: column; align-items: center; justify-content: flex-end; min-width: 0; }

.bar__stack { display: flex; flex-direction: column; width: 100%; height: 306px; justify-content: flex-end; cursor: pointer; }

.bar-axis { position: absolute; top: 0; bottom: 30px; left: 0; width: 32px; }

.bar-axis span { position: absolute; right: 8px; color: var( --text-muted ); font-size: 12px; line-height: 1; transform: translateY( 50% ); }

.bar__seg { width: 100%; transition: height .4s; }

.bar__seg--peak { background: var( --accent ); border-radius: 18px 18px 0 0; }

.bar__seg--avg { background: var( --accent-dark ); }

.bar__seg--min { background: linear-gradient( var( --chart-dim ), rgba( 79, 37, 41, 0 ) ); }

.bar__label { min-height: 15px; margin-top: 15px; color: var( --text-muted ); font-size: 12px; line-height: 15px; white-space: nowrap; }

.chart-tip {
	position: absolute;
	z-index: 5;
	padding: 10px;
	border-radius: var( --radius );
	background: var( --control );
	box-shadow: 0 0 36px rgba( 0, 0, 0, .1 );
	font-size: 11px;
	line-height: 16px;
	white-space: nowrap;
	pointer-events: none;
	transform: translate( -50%, -100% );
}

.chart-tip div { display: flex; align-items: center; gap: 8px; }

.chart-tip .chart-tip__time { color: var( --text-muted ); }

.chart-tip .dot { width: 5px; height: 5px; }

/* Line chart */

.line-chart { position: relative; height: 336px; }

.line-chart svg { display: block; width: 100%; height: 100%; overflow: visible; }

.line-chart__axis { fill: var( --text-muted ); font-size: 12px; font-family: var( --font ); }

.line-chart__badge {
	position: absolute;
	padding: 0 12px;
	border-radius: var( --radius-s );
	background: var( --accent );
	font-size: 10px;
	font-weight: 700;
	line-height: 24px;
	pointer-events: none;
	transform: translate( -50%, calc( -100% - 14px ) );
}

/* KPI in card head */

.kpi { display: flex; flex-direction: column; gap: 4px; margin-left: auto; }

.kpi + .kpi { margin-left: 0; }

.kpi__label { display: flex; align-items: center; gap: 8px; color: var( --text-muted ); line-height: 20px; }

.kpi b { font-size: 21px; line-height: 26px; }

.chart-card .card__head:has( .kpi ) { gap: 70px; }

/* Table */

.table-card { padding: 35px 20px 20px; }

.table { width: 100%; border-collapse: separate; border-spacing: 0; }

.table th { padding: 0 36px 26px; color: var( --text-muted ); font-size: 12px; font-weight: 500; text-align: left; }

.table td { height: 82px; padding: 0 36px; color: var( --text-muted ); white-space: nowrap; }

.table tbody tr:nth-child( odd ) td { background: var( --surface-2 ); }

.table td:first-child { border-radius: var( --radius ) 0 0 var( --radius ); }

.table td:last-child { border-radius: 0 var( --radius ) var( --radius ) 0; color: var( --text ); }

.table td.text-success { color: var( --success ); }

.table td.text-danger { color: var( --accent ); }

/* Dashboard orders: long transaction types and nicks wrap instead of pushing the table out of the card */
.table--orders th { padding: 0 16px 26px; }

.table--orders td { padding: 8px 16px; white-space: normal; }

.table--orders td:first-child, .table--orders td:nth-child( 2 ), .table--orders td:last-child { white-space: nowrap; }

.ta-r { text-align: right !important; }

.table__empty { text-align: center; }

/* Toast */

.toast {
	position: fixed;
	right: 24px;
	bottom: 24px;
	z-index: 100;
	max-width: 360px;
	padding: 14px 20px;
	border-radius: var( --radius );
	background: var( --surface-3 );
	box-shadow: 0 10px 30px rgba( 0, 0, 0, .4 );
	opacity: 0;
	transform: translateY( 10px );
	pointer-events: none;
	transition: opacity .2s, transform .2s;
}

.toast.is-visible { opacity: 1; transform: none; }

/* Activity: requests and page loads */

.busy-bar { position: fixed; top: 0; left: 0; right: 0; z-index: 200; height: 3px; overflow: hidden; opacity: 0; pointer-events: none; transition: opacity .2s; }

.busy-bar.is-visible { opacity: 1; }

.busy-bar::after { content: ''; position: absolute; top: 0; bottom: 0; left: -35%; width: 35%; background: var( --accent ); box-shadow: 0 0 8px var( --accent ); animation: progress-slide 1.2s ease-in-out infinite; }

.btn.is-busy { pointer-events: none; }

.btn.is-busy::before { content: ''; flex: none; width: 14px; height: 14px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin .8s linear infinite; }

/* Short screens: landscape phones, small laptops */

@media ( min-width: 769px ) and ( max-height: 760px ) {

	:root { --sidebar-w: 240px; --pad: 20px; }

	.sidebar { padding: 24px 15px 15px; }

	.sidebar .logo { font-size: 28px; line-height: 36px; }

	.sidebar__nav { margin-top: 24px; }

	.nav-item { padding: 6px 16px; gap: 12px; font-size: 15px; }

	.nav-item .icon { width: 20px; height: 20px; }

}

/* Laptops: dashboard folds into one column, stats wrap */

@media ( min-width: 769px ) and ( max-width: 1400px ) {

	.stats { grid-template-columns: repeat( auto-fill, minmax( 230px, 1fr ) ); }

	.dashboard { grid-template-columns: 1fr; }

	.chart-card .card__head:has( .kpi ) { flex-wrap: wrap; gap: 20px 40px; }

}

/* Mobile */

@media ( max-width: 768px ) {

	:root { --pad: 10px; --gap: 10px; --radius: 4px; --radius-s: 2.5px; --radius-l: 9px; }

	.stats, .dashboard { font-size: 9px; }

	.sidebar { display: none; }

	.content { margin-left: 0; padding: 0 var( --pad ) 120px; }

	body::after {
		content: '';
		position: fixed;
		inset: auto 0 0;
		z-index: 19;
		height: 102px;
		background: linear-gradient( rgba( 23, 23, 23, 0 ), var( --bg ) );
		pointer-events: none;
	}

	.topbar {
		position: sticky;
		top: 0;
		z-index: 20;
		display: flex;
		align-items: center;
		justify-content: space-between;
		height: 84px;
		padding: 0 24px 0 36px;
		background: var( --bg );
	}

	.topbar .logo { font-size: 23px; line-height: 29px; }

	.burger { display: flex; flex-direction: column; align-items: flex-end; justify-content: center; gap: 7px; width: 36px; height: 36px; z-index: 31; }

	.burger span { display: block; height: 2px; background: var( --text ); border-radius: 2px; transition: transform .2s, opacity .2s, width .2s; }

	.burger span:nth-child( 1 ) { width: 32px; }

	.burger span:nth-child( 2 ) { width: 22px; }

	.burger span:nth-child( 3 ) { width: 16px; }

	.burger.is-open span { width: 26px; }

	.burger.is-open span:nth-child( 1 ) { transform: translateY( 9px ) rotate( 45deg ); }

	.burger.is-open span:nth-child( 2 ) { opacity: 0; }

	.burger.is-open span:nth-child( 3 ) { transform: translateY( -9px ) rotate( -45deg ); }

	.burger-menu {
		position: fixed;
		inset: 84px 0 0;
		z-index: 30;
		display: flex;
		flex-direction: column;
		gap: 20px;
		padding: 0 var( --pad ) 15px;
		background: var( --bg );
		opacity: 0;
		visibility: hidden;
		transition: opacity .2s, visibility .2s;
	}

	.burger-menu.is-open { opacity: 1; visibility: visible; }

	.burger-menu__body { flex: 1; overflow-y: auto; }

	.burger-menu .btn { height: 60px; }

	.tabbar {
		position: fixed;
		left: 50%;
		bottom: 20px;
		z-index: 20;
		display: flex;
		gap: 5px;
		padding: 10px;
		border: 1px solid rgba( 94, 94, 94, .12 );
		border-radius: var( --radius-l );
		background: var( --surface );
		transform: translateX( -50% );
		box-shadow: 0 0 36px rgba( 0, 0, 0, .1 );
	}

	.tabbar__item {
		display: grid;
		place-items: center;
		width: 52px;
		height: 52px;
		border-radius: var( --radius-l );
		color: var( --text-soft );
	}

	.tabbar__item.is-active { background: #232323; color: var( --accent ); }

	.card { padding: 20px; }

	.dashboard .card__title { font-size: 13px; line-height: 16px; }

	.dashboard .card__subtitle { font-size: 9px; line-height: 12px; }

	.dashboard .btn { height: 30px; padding: 0 12px; font-size: 8.5px; }

	/* Summary: horizontal scroll */

	.stats { display: flex; overflow-x: auto; margin: 0 calc( var( --pad ) * -1 ) var( --gap ); padding: 0 var( --pad ); scrollbar-width: none; }

	.stats::-webkit-scrollbar { display: none; }

	.stat { flex: 0 0 192px; height: 72px; gap: 11px; padding: 0 11px; border-radius: 4.5px; }

	.stat__icon { width: 42px; height: 42px; }

	.stat__icon .icon { width: 24px; height: 24px; }

	.stat__value { font-size: 13px; line-height: 16px; }

	.stat__label { font-size: 9px; line-height: 12px; }

	/* Dashboard */

	.dashboard { grid-template-columns: 1fr; }

	.dashboard__col--wide { display: none; }

	.chart-card { padding: 20px; }

	.chart-card .card__head { margin-bottom: 20px; }

	.dashboard .select__btn { min-width: 110px; height: 30px; padding: 0 10px; gap: 10px; border-radius: 2.5px; font-size: 8.5px; }

	.dashboard .select__btn .icon { width: 10px; height: 10px; }

	.dashboard .select__opt { height: 36px; padding: 0 10px; font-size: 8.5px; }

	.bar-chart { height: 201px; padding: 0 0 0 26px; gap: 2px; }

	.bar { flex-basis: 22px; }

	.bar-axis { bottom: 15px; width: 22px; }

	.bar-axis span { right: 5px; font-size: 7px; }

	.bar__stack { height: 186px; }

	.bar__seg--peak { border-radius: 11px 11px 0 0; }

	.bar__label { min-height: 5px; margin-top: 10px; font-size: 7px; line-height: 5px; }

	.server-card { grid-template-columns: 130px 1fr; gap: 20px 18px; padding: 18px 18px 18px; }

	.server-card__image { height: 124px; }

	.server-card__image .icon { width: 58px; height: 58px; }

	.server-card__info { gap: 14px; padding-top: 6px; }

	.server-card__name { margin-bottom: 8px; font-size: 13px; line-height: 16px; }

	.server-card__props { gap: 8px; line-height: 12px; }

	.server-card__players .dot { width: 6px; height: 6px; }

	.server-card__actions { gap: 6px; }

	.server-card .btn { height: 30px; }

	.toast { left: var( --pad ); right: var( --pad ); bottom: 110px; max-width: none; }

}
