/* ============================================================
   PMHosting — панель хостинга. Дизайн-система pocketmine.ru.
   Светлая/тёмная тема, vanilla CSS, без фреймворков.
   ============================================================ */

:root {
	--bg: #f4f4f8;
	--surface: #ffffff;
	--surface-2: #f0f0f5;
	--surface-3: #e8e8ef;
	--text: #14141f;
	--text-2: #3d3d4f;
	--text-3: #5c5c70;
	--border: #e6e6ef;
	--border-2: #d4d4e0;
	--accent: #0a7a54;
	--accent-hover: #086644;
	--accent-soft: #e8faf3;
	--danger: #e11d48;
	--danger-soft: #fff1f2;
	--warn: #d97706;
	--warn-soft: #fffbeb;
	--r-xs: 6px;
	--r-sm: 8px;
	--r: 12px;
	--r-lg: 16px;
	--r-xl: 20px;
	--r-full: 999px;
	--shadow-xs: 0 1px 2px rgba(20, 20, 31, .04);
	--shadow-sm: 0 1px 3px rgba(20, 20, 31, .05), 0 4px 12px rgba(20, 20, 31, .04);
	--shadow: 0 2px 8px rgba(20, 20, 31, .06), 0 8px 24px rgba(20, 20, 31, .05);
	--shadow-lg: 0 8px 30px rgba(20, 20, 31, .1);
	--font: "Inter", "Inter Fallback", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	--font-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Cascadia Code", monospace;
	--ease: 160ms cubic-bezier(.2, .7, .2, 1);
	--topbar-h: 56px;
	--sidebar: 232px;
	--container: 1180px;
	--pmh-blue: #2563eb;
	--pmh-violet: #7c3aed;
	--pmh-amber: #d97706;
}

html[data-theme="dark"] {
	--bg: #0f0f14;
	--surface: #16161f;
	--surface-2: #1c1c26;
	--surface-3: #23232e;
	--text: #ececf1;
	--text-2: #c4c4cc;
	--text-3: #9a9aa8;
	--border: #262633;
	--border-2: #34343f;
	--accent: #12a878;
	--accent-hover: #15b98a;
	--accent-soft: #12241d;
	--danger: #fb7185;
	--danger-soft: #2a1519;
	--warn: #fbbf24;
	--warn-soft: #26200f;
	--shadow-xs: 0 1px 2px rgba(0, 0, 0, .4);
	--shadow-sm: 0 1px 3px rgba(0, 0, 0, .4), 0 4px 12px rgba(0, 0, 0, .35);
	--shadow: 0 2px 8px rgba(0, 0, 0, .45), 0 8px 24px rgba(0, 0, 0, .4);
	--shadow-lg: 0 8px 30px rgba(0, 0, 0, .55);
	--pmh-blue: #60a5fa;
	--pmh-violet: #c4b5fd;
	--pmh-amber: #fbbf24;
}

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

[hidden] { display: none !important; }

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

body.pmh-page {
	margin: 0;
	font-family: var(--font);
	font-size: 15px;
	line-height: 1.55;
	color: var(--text);
	background: var(--bg);
	transition: background var(--ease), color var(--ease);
	min-height: 100vh;
}

.pmh-icon { display: inline-block; vertical-align: -3px; flex-shrink: 0; }

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

code {
	font-family: var(--font-mono);
	font-size: .9em;
	background: var(--surface-2);
	border: 1px solid var(--border);
	border-radius: var(--r-xs);
	padding: 1px 6px;
}

.pmh-visually-hidden {
	position: absolute !important;
	width: 1px; height: 1px;
	clip: rect(0 0 0 0);
	overflow: hidden;
	white-space: nowrap;
}

/* ---------- App shell ---------- */

.pmh-app {
	display: grid;
	grid-template-columns: var(--sidebar) 1fr;
	min-height: 100vh;
}

.pmh-sidebar {
	position: sticky;
	top: 0;
	height: 100vh;
	display: flex;
	flex-direction: column;
	padding: 18px 14px;
	background: var(--surface);
	border-right: 1px solid var(--border);
	z-index: 60;
}

.pmh-logo {
	display: flex;
	align-items: center;
	gap: 10px;
	font-weight: 800;
	font-size: 16px;
	letter-spacing: -.02em;
	color: var(--text);
	padding: 4px 8px 18px;
}

.pmh-logo:hover { text-decoration: none; }

.pmh-logo__mark {
	width: 32px; height: 32px;
	border-radius: 10px;
	display: grid; place-items: center;
	background: linear-gradient(145deg, var(--accent), var(--accent-hover));
	color: #fff;
	box-shadow: 0 6px 16px color-mix(in srgb, var(--accent) 35%, transparent);
}

.pmh-logo__text em { font-style: normal; color: var(--accent); }

.pmh-sidebar__nav { display: flex; flex-direction: column; gap: 4px; flex: 1; }

.pmh-sidebar__link {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 10px 12px;
	border-radius: var(--r-sm);
	font-weight: 600;
	font-size: 14px;
	color: var(--text-2);
	transition: background var(--ease), color var(--ease);
}

.pmh-sidebar__link:hover { background: var(--surface-2); color: var(--text); text-decoration: none; }

.pmh-sidebar__link.is-active {
	background: var(--accent-soft);
	color: var(--accent);
}

.pmh-sidebar__foot { padding-top: 12px; border-top: 1px solid var(--border); }

.pmh-user {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 8px;
	border-radius: var(--r);
}

.pmh-user__avatar {
	width: 34px; height: 34px;
	border-radius: 50%;
	display: grid; place-items: center;
	background: var(--accent-soft);
	color: var(--accent);
	font-weight: 800;
	font-size: 13px;
	flex-shrink: 0;
}

.pmh-user__name { display: block; font-weight: 700; font-size: 14px; }
.pmh-user__role { display: block; font-size: 12px; color: var(--text-3); }

.pmh-shell { min-width: 0; display: flex; flex-direction: column; min-height: 100vh; }

.pmh-topbar {
	position: sticky;
	top: 0;
	z-index: 50;
	height: var(--topbar-h);
	background: color-mix(in srgb, var(--bg) 82%, transparent);
	backdrop-filter: blur(12px);
	border-bottom: 1px solid var(--border);
}

.pmh-topbar__inner {
	height: 100%;
	display: flex;
	align-items: center;
	gap: 16px;
	padding: 0 28px;
}

.pmh-sidebar-toggle {
	display: none;
	width: 38px; height: 38px;
	border: 1px solid var(--border);
	border-radius: var(--r-sm);
	background: var(--surface);
	color: var(--text);
	cursor: pointer;
	place-items: center;
}

.pmh-topbar__crumb { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; }

.pmh-demo-pill {
	font-size: 11.5px;
	font-weight: 800;
	letter-spacing: .06em;
	text-transform: uppercase;
	padding: 4px 9px;
	border-radius: var(--r-full);
	background: var(--accent-soft);
	color: var(--accent);
}

.pmh-topbar__hint { font-size: 13px; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.pmh-topbar__right { display: flex; align-items: center; gap: 10px; }

.pmh-balance {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 6px 12px;
	border-radius: var(--r-full);
	border: 1px solid var(--border);
	background: var(--surface);
	color: var(--text);
	font-weight: 700;
	font-size: 13.5px;
}

.pmh-balance:hover { text-decoration: none; border-color: var(--accent); color: var(--accent); }

.pmh-container {
	width: 100%;
	max-width: var(--container);
	margin: 0 auto;
	padding: 0 28px;
}

.pmh-main { flex: 1; padding: 28px 0 48px; }

.pmh-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 16px;
}

.pmh-sidebar-backdrop { display: none; }

@media (max-width: 980px) {
	.pmh-app { grid-template-columns: 1fr; }
	.pmh-sidebar {
		position: fixed;
		left: 0; top: 0;
		transform: translateX(-110%);
		transition: transform 200ms var(--ease);
		box-shadow: var(--shadow-lg);
	}
	.pmh-app.is-nav-open .pmh-sidebar { transform: none; }
	.pmh-sidebar-toggle { display: grid; }
	.pmh-sidebar-backdrop {
		display: block;
		position: fixed; inset: 0;
		background: rgba(15, 15, 20, .45);
		z-index: 55;
	}
	.pmh-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
	.pmh-grid { grid-template-columns: 1fr; }
	.pmh-container { padding: 0 16px; }
	.pmh-topbar__inner { padding: 0 16px; }
	.pmh-topbar__hint { display: none; }
}
/* ---------- Переключатель темы ---------- */

.pmh-theme-toggle {
	width: 38px; height: 38px;
	border: 1px solid var(--border);
	border-radius: var(--r-full);
	background: var(--surface);
	cursor: pointer;
	display: grid; place-items: center;
	color: var(--text-2);
	transition: border-color var(--ease), transform var(--ease);
	position: relative;
}

.pmh-theme-toggle:hover { border-color: var(--border-2); transform: translateY(-1px); }

.pmh-theme-toggle__sun, .pmh-theme-toggle__moon { display: none; line-height: 0; }
html[data-theme="light"] .pmh-theme-toggle__moon { display: block; }
html[data-theme="dark"] .pmh-theme-toggle__sun { display: block; }

/* ---------- Кнопки ---------- */

.pmh-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 7px;
	padding: 9px 18px;
	border-radius: var(--r-sm);
	border: 1px solid var(--border-2);
	background: var(--surface);
	color: var(--text);
	font-family: inherit;
	font-size: 14px;
	font-weight: 600;
	line-height: 1.2;
	cursor: pointer;
	transition: background var(--ease), border-color var(--ease), color var(--ease), transform var(--ease), box-shadow var(--ease);
}

.pmh-btn:hover { border-color: var(--text-3); text-decoration: none; }

.pmh-btn:active { transform: translateY(1px); }

.pmh-btn:disabled {
	opacity: .45;
	cursor: not-allowed;
	pointer-events: none;
}

.pmh-btn--primary {
	background: var(--accent);
	border-color: var(--accent);
	color: #fff;
}

.pmh-btn--primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); }

.pmh-btn--danger { color: var(--danger); border-color: var(--danger); background: var(--danger-soft); }
.pmh-btn--danger:hover { background: var(--danger); color: #fff; }

.pmh-btn--ghost { border-color: transparent; background: transparent; color: var(--text-3); }
.pmh-btn--ghost:hover { background: var(--surface-2); color: var(--text); }

.pmh-btn--sm { padding: 6px 13px; font-size: 13px; }
.pmh-btn--lg { padding: 13px 26px; font-size: 15px; }

/* ---------- Карточки ---------- */

.pmh-card {
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: var(--r-lg);
	box-shadow: var(--shadow-sm);
	padding: 20px;
	transition: border-color var(--ease), box-shadow var(--ease), transform var(--ease);
}

.pmh-section { margin-top: 34px; }

.pmh-section__head {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 12px;
	margin-bottom: 16px;
}

.pmh-section__head h2 { margin: 0; font-size: 19px; letter-spacing: -.01em; }

.pmh-section__hint { font-size: 13px; color: var(--text-3); }

/* ---------- Hero дашборда ---------- */

.pmh-hero {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 20px;
	padding: 34px 38px;
	border-radius: 22px;
	color: #ececf1;
	background:
		radial-gradient(900px 280px at 88% -40%, rgba(18, 168, 120, .38), transparent 55%),
		linear-gradient(145deg, #101018 0%, #16302a 55%, #0f1c18 100%);
	position: relative;
	overflow: hidden;
	border: 1px solid rgba(255,255,255,.06);
}

.pmh-hero__grid {
	position: absolute; inset: 0;
	background-image:
		linear-gradient(rgba(255,255,255,.04) 1px, transparent 1px),
		linear-gradient(90deg, rgba(255,255,255,.04) 1px, transparent 1px);
	background-size: 28px 28px;
	mask-image: linear-gradient(180deg, #000, transparent 85%);
	pointer-events: none;
}

.pmh-hero__glow {
	position: absolute;
	right: -40px; top: -80px;
	width: 280px; height: 280px;
	border-radius: 50%;
	background: radial-gradient(circle, rgba(18, 168, 120, .4), transparent 70%);
	pointer-events: none;
}

.pmh-hero__body { position: relative; z-index: 1; max-width: 640px; }

.pmh-hero__eyebrow {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	font-size: 12px;
	font-weight: 700;
	letter-spacing: .08em;
	text-transform: uppercase;
	color: #9ae6c9;
}

.pmh-live-dot {
	width: 7px; height: 7px;
	border-radius: 50%;
	background: #34d399;
	box-shadow: 0 0 0 0 rgba(52, 211, 153, .6);
	animation: pmh-pulse 1.6s ease-in-out infinite;
	display: inline-block;
}

.pmh-hero__title { margin: 8px 0 0; font-size: 30px; font-weight: 800; letter-spacing: -.03em; }
.pmh-hero__grad { background: linear-gradient(90deg, #34d399, #a7f3d0); -webkit-background-clip: text; background-clip: text; color: transparent; }
.pmh-hero__sub { margin: 8px 0 0; color: #c4c4cc; font-size: 15px; max-width: 520px; }
.pmh-hero__cta { position: relative; z-index: 1; }

.pmh-hero .pmh-btn--primary {
	background: #12a878;
	border-color: #12a878;
	box-shadow: 0 8px 22px rgba(18, 168, 120, .4);
}

/* ---------- Статистика ---------- */

.pmh-stats {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 14px;
	margin-top: 22px;
}

.pmh-stat {
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: var(--r);
	padding: 16px 18px;
	display: flex;
	align-items: center;
	gap: 14px;
}

.pmh-stat__tile {
	width: 40px; height: 40px;
	border-radius: 12px;
	display: grid; place-items: center;
	flex-shrink: 0;
	background: var(--surface-2);
	color: var(--text-2);
}

.pmh-stat__tile--accent { background: var(--accent-soft); color: var(--accent); }
.pmh-stat__tile--green { background: var(--accent-soft); color: var(--accent); }
.pmh-stat__tile--blue { background: color-mix(in srgb, var(--pmh-blue) 14%, transparent); color: var(--pmh-blue); }
.pmh-stat__tile--violet { background: color-mix(in srgb, var(--pmh-violet) 14%, transparent); color: var(--pmh-violet); }

.pmh-stat__body { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; }

.pmh-stat__label { font-size: 12px; font-weight: 600; color: var(--text-3); text-transform: uppercase; letter-spacing: .04em; }

.pmh-stat__value { font-size: 24px; font-weight: 800; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }

.pmh-stat__value--accent { color: var(--accent); }

.pmh-sparkline { flex-shrink: 0; opacity: .9; }

@media (max-width: 640px) {
	.pmh-stats { grid-template-columns: repeat(2, 1fr); }
	.pmh-hero { flex-direction: column; align-items: flex-start; padding: 24px; }
}

/* ---------- Карточка сервера ---------- */

.pmh-server-card { display: flex; flex-direction: column; gap: 12px; }

.pmh-server-card:hover {
	border-color: var(--border-2);
	box-shadow: var(--shadow);
	transform: translateY(-2px);
}

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

.pmh-server-card__identity { display: flex; align-items: center; gap: 12px; min-width: 0; }

.pmh-server-card__tile {
	width: 42px; height: 42px;
	border-radius: 12px;
	display: grid; place-items: center;
	background: var(--surface-2);
	color: var(--text-3);
	flex-shrink: 0;
}

.pmh-server-card__tile--running { background: var(--accent-soft); color: var(--accent); }
.pmh-server-card__tile--stopped { background: var(--surface-2); color: var(--text-3); }
.pmh-server-card__tile--suspended { background: var(--danger-soft); color: var(--danger); }

.pmh-server-card__name { margin: 0; font-size: 16.5px; font-weight: 700; letter-spacing: -.01em; }

.pmh-server-card__addr { margin: 2px 0 0; font-family: var(--font-mono); font-size: 12.5px; color: var(--text-3); display: flex; align-items: center; gap: 6px; }

.pmh-server-card__addr code { background: none; border: 0; padding: 0; }

.pmh-copy {
	border: 0;
	background: transparent;
	color: var(--text-3);
	cursor: pointer;
	padding: 2px;
	border-radius: 4px;
	line-height: 0;
}

.pmh-copy:hover { color: var(--accent); background: var(--accent-soft); }

.pmh-server-card__meta { display: flex; flex-wrap: wrap; gap: 7px; }

.pmh-chip {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	padding: 3px 10px;
	border-radius: var(--r-full);
	border: 1px solid var(--border);
	background: var(--surface-2);
	font-size: 12.5px;
	font-weight: 600;
	color: var(--text-2);
}

.pmh-chip--soft { background: var(--accent-soft); border-color: transparent; color: var(--accent); }

.pmh-server-card__actions {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	margin-top: auto;
	padding-top: 14px;
	border-top: 1px solid var(--border);
}

.pmh-server-card__node { font-size: 12.5px; color: var(--text-3); }

.pmh-server-card--new {
	align-items: center;
	justify-content: center;
	gap: 8px;
	min-height: 172px;
	border-style: dashed;
	color: var(--text-3);
	font-weight: 600;
	box-shadow: none;
	background: transparent;
}

.pmh-server-card--new:hover { color: var(--accent); border-color: var(--accent); text-decoration: none; }

.pmh-server-card__plus {
	width: 44px; height: 44px;
	border-radius: 50%;
	display: grid; place-items: center;
	font-size: 26px;
	font-weight: 400;
	background: var(--accent-soft);
	color: var(--accent);
}

/* ---------- Бейджи статусов ---------- */

.pmh-badge {
	display: inline-flex;
	align-items: center;
	gap: 7px;
	padding: 4px 12px;
	border-radius: var(--r-full);
	font-size: 12.5px;
	font-weight: 700;
	white-space: nowrap;
	background: var(--surface-2);
	color: var(--text-2);
}

.pmh-badge .pmh-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--text-3); }

.pmh-badge--running { background: var(--accent-soft); color: var(--accent); }
.pmh-badge--running .pmh-dot { background: var(--accent); animation: pmh-pulse 1.6s ease-in-out infinite; }
.pmh-badge--stopped { background: var(--surface-2); color: var(--text-3); }
.pmh-badge--suspended { background: var(--danger-soft); color: var(--danger); }
.pmh-badge--suspended .pmh-dot { background: var(--danger); }
.pmh-badge--starting { background: var(--warn-soft); color: var(--warn); }

@keyframes pmh-pulse {
	0%, 100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent) 45%, transparent); }
	50% { box-shadow: 0 0 0 5px transparent; }
}

.pmh-players { display: flex; align-items: center; gap: 10px; font-size: 12.5px; color: var(--text-3); }

.pmh-players__track {
	flex: 1;
	height: 7px;
	border-radius: var(--r-full);
	background: var(--surface-3);
	overflow: hidden;
}

.pmh-players__fill {
	height: 100%;
	border-radius: var(--r-full);
	background: linear-gradient(90deg, var(--accent), var(--accent-hover));
	transition: width var(--ease);
}
/* ---------- Страница сервера ---------- */

.pmh-server-head {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 18px;
	flex-wrap: wrap;
}

.pmh-server-head__title-row { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }

.pmh-server-head__title { margin: 0; font-size: 25px; font-weight: 800; letter-spacing: -.02em; }

.pmh-server-head__addr { margin: 7px 0 0; color: var(--text-3); font-size: 14px; }

.pmh-sep { margin: 0 6px; color: var(--border-2); }

.pmh-server-head__actions { display: flex; gap: 8px; flex-wrap: wrap; }

.pmh-tabs {
	display: flex;
	gap: 2px;
	margin: 22px 0 18px;
	border-bottom: 1px solid var(--border);
	overflow-x: auto;
}

.pmh-tab {
	appearance: none;
	border: none;
	background: transparent;
	font-family: inherit;
	font-size: 14.5px;
	font-weight: 600;
	color: var(--text-3);
	padding: 10px 18px;
	cursor: pointer;
	position: relative;
	white-space: nowrap;
}

.pmh-tab::after {
	content: "";
	position: absolute;
	left: 14px; right: 14px; bottom: -1px;
	height: 2px;
	border-radius: 2px;
	background: var(--accent);
	opacity: 0;
	transform: scaleX(.4);
	transition: opacity var(--ease), transform var(--ease);
}

.pmh-tab:hover { color: var(--text); }

.pmh-tab.is-active { color: var(--text); }

.pmh-tab.is-active::after { opacity: 1; transform: scaleX(1); }

.pmh-tabpanel[hidden] { display: none !important; }

.pmh-charts {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 16px;
}

@media (max-width: 760px) {
	.pmh-charts { grid-template-columns: 1fr; }
}

.pmh-chart-card { padding: 16px 18px 12px; }

.pmh-chart-card__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 8px;
}

.pmh-chart-card__head h3 { margin: 0; font-size: 14px; font-weight: 700; color: var(--text-2); }

.pmh-chart-card__val {
	font-size: 15px;
	font-weight: 800;
	font-variant-numeric: tabular-nums;
	color: var(--accent);
}

.pmh-chart-card canvas { width: 100%; height: 150px; display: block; }

.pmh-info-card { margin-top: 16px; padding: 8px 20px; }

.pmh-info { margin: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; }

.pmh-info__row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	padding: 12px 0;
	border-bottom: 1px solid var(--border);
}

.pmh-info__row:nth-last-child(-n+3) { border-bottom: none; }

.pmh-info__row dt { color: var(--text-3); font-size: 13px; font-weight: 600; }

.pmh-info__row dd { margin: 0; font-weight: 600; font-size: 13.5px; font-variant-numeric: tabular-nums; text-align: right; }

@media (max-width: 760px) {
	.pmh-info { grid-template-columns: 1fr; }
	.pmh-info__row { border-bottom: 1px solid var(--border); }
	.pmh-info__row:last-child { border-bottom: none; }
}

/* ---------- Консоль ---------- */

.pmh-console-card { padding: 0; overflow: hidden; }

.pmh-console-card__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 14px 18px;
	border-bottom: 1px solid var(--border);
}

.pmh-console-card__head h3 { margin: 0; font-size: 15px; }

.pmh-console-card__state { font-size: 12px; color: var(--accent); font-weight: 600; }

.pmh-console-card__tools { display: flex; gap: 8px; }

.pmh-console {
	background: #0d0d12;
	color: #d6d6de;
	font-family: var(--font-mono);
	font-size: 12.8px;
	line-height: 1.75;
	padding: 14px 18px;
	height: 420px;
	overflow-y: auto;
	overscroll-behavior: contain;
}

.pmh-console__line { white-space: pre-wrap; word-break: break-word; }

.pmh-console__line .ts { color: #6f6f7d; margin-right: 8px; user-select: none; }

.pmh-console__line--info .msg { color: #d6d6de; }
.pmh-console__line--warn .msg { color: #fbbf24; }
.pmh-console__line--error .msg { color: #fb7185; }
.pmh-console__line--chat .msg { color: #7dd3fc; }
.pmh-console__line--cmd .msg { color: #12a878; font-weight: 600; }

.pmh-console-input {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 12px 18px;
	border-top: 1px solid #26262e;
	background: #13131a;
}

.pmh-console-input__prompt { color: #12a878; font-weight: 700; font-family: var(--font-mono); }

.pmh-console-input input {
	flex: 1;
	background: transparent;
	border: none;
	outline: none;
	color: #ececf1;
	font-family: var(--font-mono);
	font-size: 13px;
	padding: 6px 0;
}

.pmh-console-input input::placeholder { color: #55555f; }

/* ---------- Файловый менеджер ---------- */

.pmh-files-card { padding: 0; overflow: hidden; }

.pmh-files-card__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 14px 18px;
	border-bottom: 1px solid var(--border);
}

.pmh-files-card__head h3 { margin: 0; font-size: 15px; }

.pmh-files-card__tools { display: flex; align-items: center; gap: 8px; }

.pmh-files { display: grid; grid-template-columns: 280px 1fr; min-height: 440px; }

@media (max-width: 720px) {
	.pmh-files { grid-template-columns: 1fr; }
	.pmh-files__tree { max-height: 220px; overflow-y: auto; }
}

.pmh-files__tree {
	border-right: 1px solid var(--border);
	padding: 12px 10px;
	overflow-y: auto;
	background: var(--surface-2);
}

.pmh-tree-item {
	display: flex;
	align-items: center;
	gap: 7px;
	padding: 5px 10px;
	border-radius: var(--r-xs);
	font-size: 13.5px;
	color: var(--text-2);
	cursor: pointer;
	user-select: none;
}

.pmh-tree-item:hover { background: var(--surface-3); }

.pmh-tree-item.is-active { background: var(--accent-soft); color: var(--accent); font-weight: 600; }

.pmh-tree-item--dir { font-weight: 600; color: var(--text); }

.pmh-tree-icon { font-size: 12px; width: 16px; text-align: center; flex-shrink: 0; }

.pmh-tree-children { padding-left: 18px; }

.pmh-files__editor { display: flex; flex-direction: column; min-width: 0; }

.pmh-files__editor-empty {
	flex: 1;
	display: grid;
	place-items: center;
	color: var(--text-3);
	font-size: 14px;
	padding: 30px;
	text-align: center;
}

.pmh-files__editor-body { flex: 1; display: flex; flex-direction: column; padding: 14px 18px; gap: 10px; }

.pmh-files__editor-meta {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	font-size: 12.5px;
	color: var(--text-3);
}

.pmh-files__editor-body textarea {
	flex: 1;
	min-height: 320px;
	resize: vertical;
	background: #0d0d12;
	color: #d6d6de;
	border: 1px solid var(--border);
	border-radius: var(--r-sm);
	font-family: var(--font-mono);
	font-size: 12.8px;
	line-height: 1.6;
	padding: 12px 14px;
	outline: none;
}

.pmh-files__editor-body textarea:focus { border-color: var(--accent); }

.pmh-files__editor-actions { display: flex; gap: 8px; justify-content: flex-end; }
/* ---------- Бэкапы ---------- */

.pmh-backups-card { padding: 0; overflow: hidden; }

.pmh-backups-card__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 14px 18px;
	border-bottom: 1px solid var(--border);
}

.pmh-backups-card__head h3 { margin: 0; font-size: 15px; }

.pmh-backups { display: flex; flex-direction: column; }

.pmh-backup {
	display: flex;
	align-items: center;
	gap: 14px;
	padding: 14px 18px;
	border-bottom: 1px solid var(--border);
}

.pmh-backup:last-child { border-bottom: none; }

.pmh-backup__icon {
	width: 38px; height: 38px;
	flex-shrink: 0;
	border-radius: var(--r-sm);
	display: grid; place-items: center;
	background: var(--accent-soft);
	color: var(--accent);
	font-size: 16px;
}

.pmh-backup__info { flex: 1; min-width: 0; }

.pmh-backup__title { font-weight: 600; font-size: 14px; }

.pmh-backup__meta { font-size: 12.5px; color: var(--text-3); }

.pmh-backups__note { margin: 0; padding: 12px 18px; font-size: 12.5px; color: var(--text-3); border-top: 1px solid var(--border); }

/* ---------- Мастер создания ---------- */

.pmh-create { max-width: 860px; }

.pmh-create__head h1 { margin: 0; font-size: 26px; font-weight: 800; letter-spacing: -.02em; }

.pmh-create__head p { margin: 8px 0 0; color: var(--text-3); }

.pmh-create__form { margin-top: 26px; display: flex; flex-direction: column; gap: 26px; }

.pmh-fieldset {
	border: 1px solid var(--border);
	border-radius: var(--r-lg);
	background: var(--surface);
	padding: 20px 22px;
	margin: 0;
	box-shadow: var(--shadow-sm);
}

.pmh-fieldset legend { padding: 0 8px; font-weight: 700; font-size: 14px; color: var(--text-2); }

.pmh-tariff-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-top: 8px; }

@media (max-width: 760px) { .pmh-tariff-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 420px) { .pmh-tariff-grid { grid-template-columns: 1fr; } }

.pmh-tariff {
	display: flex;
	flex-direction: column;
	gap: 7px;
	padding: 16px;
	border: 2px solid var(--border);
	border-radius: var(--r);
	cursor: pointer;
	position: relative;
	transition: border-color var(--ease), box-shadow var(--ease), transform var(--ease);
}

.pmh-tariff:hover { border-color: var(--border-2); transform: translateY(-2px); }

.pmh-tariff.is-selected {
	border-color: var(--accent);
	box-shadow: 0 0 0 4px var(--accent-soft);
}

.pmh-tariff input { position: absolute; opacity: 0; pointer-events: none; }

.pmh-tariff__name { font-weight: 800; font-size: 16px; }

.pmh-tariff__price { font-size: 19px; font-weight: 800; color: var(--accent); }

.pmh-tariff__price small { font-size: 12px; color: var(--text-3); font-weight: 500; margin-left: 3px; }

.pmh-tariff__specs { display: flex; flex-direction: column; gap: 3px; font-size: 12.5px; color: var(--text-3); }

.pmh-field-row { margin-top: 8px; }

.pmh-field { display: flex; flex-direction: column; gap: 7px; }

.pmh-field__label { font-size: 13px; font-weight: 600; color: var(--text-2); }

.pmh-input, .pmh-select {
	width: 100%;
	padding: 11px 14px;
	border: 1px solid var(--border-2);
	border-radius: var(--r-sm);
	background: var(--surface);
	color: var(--text);
	font-family: inherit;
	font-size: 14.5px;
	outline: none;
	transition: border-color var(--ease), box-shadow var(--ease);
}

.pmh-input:focus, .pmh-select:focus {
	border-color: var(--accent);
	box-shadow: 0 0 0 3px var(--accent-soft);
}

.pmh-select { max-width: 320px; }

.pmh-field-hint { margin: 8px 0 0; font-size: 12.5px; color: var(--text-3); }

.pmh-create__submit {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	flex-wrap: wrap;
}

.pmh-create__total { font-size: 15px; color: var(--text-2); }

.pmh-create__total strong { font-size: 22px; color: var(--text); margin-right: 2px; }

.pmh-create__note { margin: 4px 0 0; font-size: 12.5px; color: var(--text-3); }

.pmh-create__success-card {
	max-width: 520px;
	margin-top: 26px;
	text-align: center;
	padding: 38px 30px;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 10px;
}

.pmh-create__success-icon {
	width: 58px; height: 58px;
	border-radius: 50%;
	display: grid; place-items: center;
	background: var(--accent-soft);
	color: var(--accent);
	font-size: 26px;
	font-weight: 800;
}

.pmh-create__success-card h2 { margin: 0; }

.pmh-create__success-card p { margin: 0; color: var(--text-3); }

/* ---------- Пустые состояния ---------- */

.pmh-empty { text-align: center; padding: 70px 20px; }

.pmh-empty h1 { margin: 0 0 8px; font-size: 24px; }

.pmh-empty p { color: var(--text-3); }

/* ---------- Тосты ---------- */

.pmh-toasts {
	position: fixed;
	right: 20px;
	bottom: 20px;
	z-index: 200;
	display: flex;
	flex-direction: column;
	gap: 10px;
	pointer-events: none;
}

.pmh-toast {
	display: flex;
	align-items: center;
	gap: 10px;
	min-width: 260px;
	max-width: 380px;
	padding: 13px 16px;
	border-radius: var(--r);
	background: var(--text);
	color: var(--bg);
	font-size: 14px;
	font-weight: 600;
	box-shadow: var(--shadow-lg);
	animation: pmh-toast-in 220ms cubic-bezier(.2, .7, .2, 1);
}

.pmh-toast--ok::before { content: "✓"; color: #34d399; font-weight: 800; }
.pmh-toast--err::before { content: "✕"; color: #fb7185; font-weight: 800; }
.pmh-toast--info::before { content: "ℹ"; color: #7dd3fc; font-weight: 800; }

.pmh-toast.is-leaving { opacity: 0; transform: translateY(8px); transition: opacity 200ms, transform 200ms; }

@keyframes pmh-toast-in {
	from { opacity: 0; transform: translateY(10px) scale(.97); }
	to { opacity: 1; transform: none; }
}

/* ---------- Подвал ---------- */

.pmh-footer { border-top: 1px solid var(--border); background: var(--surface); }

.pmh-footer__inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	flex-wrap: wrap;
	padding-top: 18px;
	padding-bottom: 18px;
	font-size: 13px;
	color: var(--text-2);
}

.pmh-footer p { margin: 0; }

.pmh-footer__muted { color: var(--text-3); }

.pmh-footer__inner { padding-left: 28px; padding-right: 28px; }

/* ---------- v1.1 extras ---------- */

.pmh-page-head { margin-bottom: 22px; }
.pmh-page-head h1 { margin: 0; font-size: 26px; font-weight: 800; letter-spacing: -.02em; }
.pmh-page-head p { margin: 6px 0 0; color: var(--text-3); }

.pmh-chip { display: inline-flex; align-items: center; gap: 5px; }
.pmh-btn .pmh-icon, .pmh-tab .pmh-icon, .pmh-chip .pmh-icon { margin-right: 1px; }

.pmh-server-head__tile {
	width: 48px; height: 48px;
	border-radius: 14px;
	display: grid; place-items: center;
	background: var(--surface-2);
	flex-shrink: 0;
}
.pmh-server-head__tile--running { background: var(--accent-soft); color: var(--accent); }
.pmh-server-head__tile--stopped { color: var(--text-3); }
.pmh-server-head__tile--suspended { background: var(--danger-soft); color: var(--danger); }
.pmh-server-head__title-line { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.pmh-addr-pill {
	display: inline-flex; align-items: center; gap: 6px;
	font-family: var(--font-mono); font-size: 13px;
}

.pmh-tab { display: inline-flex; align-items: center; gap: 7px; }
.pmh-chart-card__title { display: flex; align-items: center; gap: 8px; }
.pmh-chart-card__val--accent { color: var(--accent); }
.pmh-chart-card__val--blue { color: var(--pmh-blue); }
.pmh-chart-card__val--amber { color: var(--pmh-amber); }
.pmh-chart-card__val--violet { color: var(--pmh-violet); }

.pmh-info__row dt { display: flex; align-items: center; gap: 8px; }

.pmh-window-dots { display: flex; gap: 6px; margin-right: 10px; }
.pmh-window-dots i { width: 9px; height: 9px; border-radius: 50%; display: block; background: #3f3f46; }
.pmh-window-dots i:nth-child(1) { background: #fb7185; }
.pmh-window-dots i:nth-child(2) { background: #fbbf24; }
.pmh-window-dots i:nth-child(3) { background: #34d399; }

.pmh-console-card__title { display: flex; align-items: center; }

.pmh-dash-split {
	display: grid;
	grid-template-columns: 1.4fr 1fr;
	gap: 22px;
	margin-top: 34px;
}

@media (max-width: 900px) { .pmh-dash-split { grid-template-columns: 1fr; } }

.pmh-nodes-strip { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
@media (max-width: 760px) { .pmh-nodes-strip { grid-template-columns: 1fr; } }

.pmh-node-mini header { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.pmh-node-mini p { margin: 8px 0 12px; font-size: 13px; color: var(--text-3); }

.pmh-bar { display: flex; flex-direction: column; gap: 5px; font-size: 12px; color: var(--text-3); }
.pmh-bar span { display: flex; justify-content: space-between; }
.pmh-bar__track { height: 7px; border-radius: var(--r-full); background: var(--surface-3); overflow: hidden; }
.pmh-bar__fill { height: 100%; border-radius: var(--r-full); background: var(--accent); }
.pmh-bar__fill--blue { background: var(--pmh-blue); }
.pmh-bar__fill--violet { background: var(--pmh-violet); }

.pmh-activity { padding: 6px 0; }
.pmh-activity__row {
	display: grid;
	grid-template-columns: 12px 1fr auto;
	gap: 12px;
	align-items: start;
	padding: 12px 18px;
	border-bottom: 1px solid var(--border);
}
.pmh-activity__row:last-child { border-bottom: 0; }
.pmh-activity__dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); margin-top: 6px; }
.pmh-activity__row strong { display: block; font-size: 13.5px; }
.pmh-activity__row span { font-size: 12.5px; color: var(--text-3); }
.pmh-activity__row time { font-size: 12px; color: var(--text-3); white-space: nowrap; }

.pmh-nodes-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
@media (max-width: 900px) { .pmh-nodes-grid { grid-template-columns: 1fr; } }

.pmh-node-card__head { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
.pmh-node-card__head h2 { margin: 0; font-size: 18px; }
.pmh-node-card__head p { margin: 6px 0 0; font-size: 13px; color: var(--text-3); display: flex; align-items: center; gap: 6px; }
.pmh-node-card__meta { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin: 16px 0; }
.pmh-node-card__meta dt { font-size: 11.5px; color: var(--text-3); text-transform: uppercase; letter-spacing: .04em; }
.pmh-node-card__meta dd { margin: 2px 0 0; font-weight: 700; }
.pmh-node-card .pmh-bars { display: flex; flex-direction: column; gap: 10px; }

.pmh-billing-stats { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 14px; }
@media (max-width: 800px) { .pmh-billing-stats { grid-template-columns: 1fr; } }

.pmh-billing-hero {
	background: linear-gradient(145deg, #101018, #16302a);
	color: #ececf1;
	border: 0;
}
.pmh-billing-hero .pmh-stat__label { color: #9ae6c9; }
.pmh-billing-hero__sum { display: block; font-size: 36px; font-weight: 800; letter-spacing: -.03em; margin: 6px 0; }
.pmh-billing-hero p { color: #c4c4cc; margin: 0 0 16px; }

.pmh-table-wrap { padding: 0; overflow: auto; }
.pmh-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.pmh-table th, .pmh-table td { text-align: left; padding: 12px 16px; border-bottom: 1px solid var(--border); }
.pmh-table th { font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--text-3); font-weight: 700; }
.pmh-table tr:last-child td { border-bottom: 0; }

.pmh-list-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 18px; border-bottom: 1px solid var(--border); }
.pmh-list-head h3 { margin: 0; font-size: 15px; display: flex; align-items: center; gap: 8px; }
.pmh-list { padding: 4px 0; }
.pmh-list__row { display: flex; align-items: center; gap: 12px; padding: 12px 18px; border-bottom: 1px solid var(--border); }
.pmh-list__row:last-child { border-bottom: 0; }
.pmh-list__info { flex: 1; min-width: 0; }
.pmh-list__info strong { display: block; }
.pmh-list__info span { font-size: 12.5px; color: var(--text-3); }
.pmh-list__empty { padding: 28px 18px; color: var(--text-3); text-align: center; }
.pmh-plugin-tile {
	width: 36px; height: 36px;
	border-radius: 10px;
	display: grid; place-items: center;
	background: var(--accent-soft);
	color: var(--accent);
}

.pmh-create__eyebrow { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; color: var(--accent); }
.pmh-fieldset__num {
	display: inline-grid; place-items: center;
	width: 22px; height: 22px;
	border-radius: 50%;
	background: var(--accent-soft);
	color: var(--accent);
	font-size: 12px;
	font-weight: 800;
	margin-right: 8px;
}
.pmh-tariff { position: relative; }
.pmh-tariff__rec {
	position: absolute; top: 8px; right: 8px;
	font-size: 10px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase;
	background: var(--accent); color: #fff;
	padding: 3px 7px; border-radius: var(--r-full);
}
.pmh-tariff__check {
	position: absolute; top: 8px; left: 8px;
	width: 18px; height: 18px;
	border-radius: 50%;
	background: var(--surface-2);
	color: transparent;
	display: grid; place-items: center;
}
.pmh-tariff.is-selected .pmh-tariff__check { background: var(--accent); color: #fff; }
.pmh-tariff__tile {
	width: 36px; height: 36px;
	border-radius: 10px;
	display: grid; place-items: center;
	background: var(--accent-soft);
	color: var(--accent);
}
.pmh-tariff__specs span { display: flex; align-items: center; gap: 6px; }
.pmh-create__total { display: flex; align-items: baseline; gap: 8px; }
.pmh-create__total-label { font-size: 13px; color: var(--text-3); }
.pmh-create__total-period { color: var(--text-3); margin-left: 4px; }

.pmh-empty__icon {
	width: 56px; height: 56px;
	border-radius: 50%;
	display: grid; place-items: center;
	margin: 0 auto 12px;
	background: var(--warn-soft);
	color: var(--warn);
}

.pmh-files-card__title, .pmh-backups-card__title { display: flex; align-items: center; gap: 8px; }
.pmh-files-card__path { font-family: var(--font-mono); font-size: 12px; color: var(--text-3); }

html[data-theme="dark"] .pmh-sidebar { background: #12121a; }
