:root {
	--bg:        #0d0a0f;
	--card:      #1a1520;
	--card-2:    #16111b;
	--raised:    #221a29;
	--line:      #342a3c;
	--line-soft: #271f2e;

	--text:    #f1e8ef;
	--text-2:  #d4c4ce;
	--muted:   #a088a0;

	--accent:        #ff4f8b;
	--accent-strong: #e83a73;
	--accent-soft:   rgba(255, 79, 139, 0.14);
	--accent-glow:   rgba(255, 79, 139, 0.32);

	--gold:      #ffd27a;
	--gold-line: #b9923a;

	--ok:     #5fe08a;
	--ok-line:#2c8a52;
	--warn:   #ffce5c;
	--warn-line:#a8842f;
	--danger: #ff5c7a;
	--purple: #c79bff;
	--purple-line:#6b4ca8;

	--radius:    18px;
	--radius-sm: 12px;
	--radius-xs: 8px;
	--shadow:    0 24px 60px rgba(0, 0, 0, 0.6);
	--shadow-sm: 0 8px 22px rgba(0, 0, 0, 0.4);

	/* ── НЕОН-ГЕЙМИНГ: стекло + свечение ── */
	--glass:       rgba(26, 21, 32, 0.55);   /* матовое стекло карточек (поверх blur) */
	--glass-2:     rgba(20, 16, 26, 0.6);
	--glass-line:  rgba(255, 255, 255, 0.08);
	--neon-1:      #ff4f8b;                   /* розовый неон */
	--neon-2:      #c79bff;                   /* фиолетовый неон */
	--neon-3:      #5cd0ff;                   /* голубой акцент (для статусов/инфо) */
	--neon-grad:   linear-gradient(100deg, var(--neon-1), var(--neon-2));
	--neon-grad-3: linear-gradient(100deg, #ff4f8b, #c79bff 55%, #5cd0ff);
	--glow-1:      0 0 18px rgba(255, 79, 139, 0.45);
	--glow-2:      0 0 22px rgba(199, 123, 255, 0.4);
	--blur:        18px;
}

* { box-sizing: border-box; }

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

body {
	margin: 0;
	min-height: 100vh;
	font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
	color: var(--text);
	background:
		radial-gradient(1100px 560px at 50% -12%, rgba(255, 79, 139, 0.14), transparent 60%),
		radial-gradient(900px 520px at 110% 8%, rgba(199, 123, 255, 0.10), transparent 55%),
		radial-gradient(800px 600px at -10% 110%, rgba(255, 138, 180, 0.06), transparent 55%),
		var(--bg);
	background-attachment: fixed;
	line-height: 1.5;
	-webkit-font-smoothing: antialiased;
}

::selection { background: var(--accent-soft); }

* { scrollbar-width: thin; scrollbar-color: var(--line) transparent; }
*::-webkit-scrollbar { width: 9px; height: 9px; }
*::-webkit-scrollbar-thumb { background: var(--line); border-radius: 8px; }
*::-webkit-scrollbar-thumb:hover { background: #45374e; }

.hidden { display: none !important; }
.muted { color: var(--muted); }

.wrap {
	max-width: 600px;
	margin: 0 auto;
	padding: 28px 16px 56px;
}

.brand {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 14px;
	margin: 8px 0 26px;
	animation: rise 0.5s ease both;
}
.brand-mark {
	font-size: 2rem;
	line-height: 1;
	filter: drop-shadow(0 4px 10px rgba(255, 79, 139, 0.45));
}
.brand-text { text-align: left; }
.brand h1 {
	margin: 0;
	font-size: 2rem;
	font-weight: 800;
	letter-spacing: 0.5px;
	background: linear-gradient(95deg, #fff 8%, #ffb3d2 45%, var(--accent) 100%);
	-webkit-background-clip: text;
	background-clip: text;
	color: transparent;
}
.brand-sub {
	margin: 2px 0 0;
	font-size: 0.8rem;
	color: var(--muted);
	letter-spacing: 0.3px;
}

.card {
	position: relative;
	background:
		linear-gradient(180deg, rgba(255, 255, 255, 0.035), transparent 120px),
		var(--card);
	border: 1px solid var(--line);
	border-radius: var(--radius);
	padding: 26px;
	box-shadow: var(--shadow);
	animation: rise 0.45s ease both;
}
.card::before {
	content: "";
	position: absolute;
	inset: 0 0 auto 0;
	height: 1px;
	background: linear-gradient(90deg, transparent, rgba(255, 180, 210, 0.16), transparent);
	border-radius: var(--radius) var(--radius) 0 0;
}

h2.section-title {
	display: flex;
	align-items: center;
	gap: 8px;
	font-size: 1.05rem;
	font-weight: 700;
	margin: 26px 0 14px;
}
.section-ico { font-size: 1.05rem; }

form { display: flex; flex-direction: column; gap: 14px; }

.field { display: flex; flex-direction: column; gap: 6px; }
.field-label { font-size: 0.78rem; color: var(--muted); letter-spacing: 0.2px; }

input, select, textarea {
	font: inherit;
	width: 100%;
	min-height: 46px;
	padding: 12px 14px;
	background: var(--card-2);
	border: 1px solid var(--line);
	border-radius: var(--radius-sm);
	color: var(--text);
	font-size: 0.95rem;
	transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
}
input::placeholder { color: #7a6478; }
input:focus, select:focus, textarea:focus {
	outline: none;
	border-color: var(--accent);
	background: #1a131f;
	box-shadow: 0 0 0 3px var(--accent-soft);
}

button {
	font: inherit;
	cursor: pointer;
	border: none;
	border-radius: var(--radius-sm);
	font-weight: 600;
	transition: transform 0.12s ease, filter 0.15s, background 0.15s, border-color 0.15s, box-shadow 0.15s, color 0.15s;
}
button:active { transform: translateY(1px); }
button:disabled { cursor: not-allowed; }

.btn-primary,
.set-foot .btn-primary,
.link-form button {
	min-height: 46px;
	padding: 12px 20px;
	color: #fff;
	background: linear-gradient(180deg, var(--accent), var(--accent-strong));
	box-shadow: 0 4px 14px var(--accent-glow);
}
.btn-primary:hover,
.link-form button:hover { filter: brightness(1.07); box-shadow: 0 6px 20px var(--accent-glow); }
.btn-block { width: 100%; }

.link-btn {
	background: transparent;
	color: var(--muted);
	padding: 8px 12px;
	font-weight: 500;
	border-radius: var(--radius-xs);
	min-height: 38px;
}
.link-btn:hover { color: var(--text); background: rgba(255, 255, 255, 0.05); }

.error {
	color: var(--danger);
	min-height: 18px;
	font-size: 0.85rem;
	margin: 10px 0 0;
}

.auth-card { max-width: 420px; margin: 4vh auto 0; }
.auth-lead { margin: 0 0 18px; color: var(--text-2); font-size: 0.95rem; text-align: center; }
.vk-btn {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 9px;
	background: #4a76a8;
	box-shadow: 0 4px 14px rgba(74, 118, 168, 0.4);
}
.vk-btn:hover { filter: brightness(1.08); box-shadow: 0 6px 20px rgba(74, 118, 168, 0.5); }

.tabs {
	display: flex;
	gap: 6px;
	margin-bottom: 22px;
	padding: 5px;
	background: var(--card-2);
	border: 1px solid var(--line-soft);
	border-radius: 12px;
}
.tab {
	flex: 1;
	padding: 11px;
	background: transparent;
	border: none;
	border-radius: 9px;
	color: var(--muted);
	font-size: 0.92rem;
	font-weight: 600;
}
.tab:hover { color: var(--text-2); }
.tab.active {
	color: #fff;
	background: linear-gradient(180deg, var(--accent), var(--accent-strong));
	box-shadow: 0 4px 12px var(--accent-glow);
}

.topbar {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 12px;
	padding-bottom: 18px;
	margin-bottom: 4px;
	border-bottom: 1px solid var(--line-soft);
	font-size: 0.9rem;
}
.user { display: flex; align-items: center; gap: 11px; min-width: 0; }
.avatar {
	display: grid;
	place-items: center;
	width: 38px;
	height: 38px;
	border-radius: 50%;
	background: radial-gradient(circle at 50% 35%, #3a2a3a, #16111b);
	border: 1px solid var(--line);
	font-size: 1.05rem;
	flex: 0 0 auto;
}
.user-meta { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-meta b { color: var(--text); font-weight: 700; }

.link-form { flex-direction: row; flex-wrap: wrap; gap: 10px; }
.link-form input { flex: 1 1 160px; min-width: 140px; }
.link-form button { flex: 0 0 auto; }

.empty-note {
	text-align: center;
	padding: 28px 16px;
	border: 1px dashed var(--line);
	border-radius: var(--radius-sm);
	margin-top: 12px;
}

.links {
	list-style: none;
	padding: 0;
	margin: 14px 0 0;
	display: flex;
	flex-direction: column;
	gap: 12px;
}
.links li {
	display: flex;
	flex-direction: column;
	gap: 12px;
	padding: 16px;
	background: var(--card-2);
	border: 1px solid var(--line);
	border-radius: var(--radius-sm);
	box-shadow: var(--shadow-sm);
	transition: border-color 0.15s, transform 0.15s, box-shadow 0.15s;
}
.links li:hover { border-color: #50405a; transform: translateY(-1px); }

.links .meta { min-width: 0; display: flex; flex-direction: column; gap: 5px; }
.links .label { font-weight: 700; font-size: 1rem; }
.links .url { color: var(--muted); font-size: 0.8rem; word-break: break-all; overflow-wrap: anywhere; }

.links .status {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 8px;
	margin-top: 3px;
	font-size: 0.8rem;
}

.badge {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	padding: 3px 10px;
	border-radius: 999px;
	font-size: 0.74rem;
	font-weight: 600;
	border: 1px solid var(--line);
	color: var(--text-2);
	background: rgba(255, 255, 255, 0.03);
	white-space: nowrap;
}
.badge.ok    { color: var(--ok);     border-color: var(--ok-line);   background: rgba(95, 224, 138, 0.10); }
.badge.warn  { color: var(--warn);   border-color: var(--warn-line); background: rgba(255, 206, 92, 0.10); }
.badge.bad   { color: var(--danger); border-color: var(--danger);    background: rgba(255, 92, 122, 0.10); }
.badge.muted { color: var(--muted);  background: rgba(255, 255, 255, 0.02); }
.err-hint { cursor: help; color: var(--warn); }

.links .actions { display: flex; flex-wrap: wrap; gap: 8px; }
.links .act, .links .del {
	background: var(--raised);
	color: var(--text-2);
	border: 1px solid var(--line);
	padding: 9px 13px;
	min-height: 40px;
	font-size: 0.82rem;
	border-radius: var(--radius-xs);
	font-weight: 600;
}
.links .act:hover { color: var(--text); border-color: var(--accent); background: #2a2030; }
/* кнопки-иконки (шестерёнка/рестарт) — ровные квадратные, моноцветный глиф */
.links .act.settings, .links .act.restart {
	width: 40px;
	padding: 0;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	font-size: 1.05rem;
	line-height: 1;
	font-variant-emoji: text;
}
.links .del { margin-left: auto; color: var(--muted); }
.links .del:hover { color: var(--danger); border-color: var(--danger); background: rgba(255, 92, 122, 0.08); }

.links .act.autoplay { color: var(--ok); border-color: var(--ok-line); background: rgba(95, 224, 138, 0.08); }
.links .act.autoplay:hover { background: rgba(95, 224, 138, 0.16); border-color: var(--ok); }
.links .act.autoplay.on { color: var(--danger); border-color: var(--danger); background: rgba(255, 92, 122, 0.10); }
.links .act.autoplay.on:hover { background: rgba(255, 92, 122, 0.18); }
.links .act.broadcast { color: var(--purple); border-color: var(--purple-line); background: rgba(167, 123, 255, 0.10); }
.links .act.broadcast:hover { background: rgba(167, 123, 255, 0.20); color: #ddc4ff; }

.subpanel {
	margin-top: 22px;
	padding: 16px;
	background: var(--card-2);
	border: 1px solid var(--line);
	border-radius: var(--radius-sm);
	box-shadow: var(--shadow-sm);
	animation: rise 0.35s ease both;
}
.subpanel-head {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 10px;
	font-size: 0.9rem;
	margin-bottom: 12px;
}
.subpanel-head b { color: var(--text); }

.msg-list {
	max-height: 340px;
	overflow-y: auto;
	background: #100a13;
	border: 1px solid var(--line-soft);
	border-radius: var(--radius-xs);
	padding: 12px;
	font-size: 0.82rem;
	line-height: 1.55;
	font-family: "Cascadia Code", "SFMono-Regular", Consolas, monospace;
}
.msg { padding: 2px 0; word-break: break-word; }
.msg-time { color: var(--muted); margin-right: 6px; }
.msg-kind { color: var(--accent); font-weight: 600; }

.set-panel { padding: 14px; }
.set-form { gap: 6px; }

.set-section {
	background: #130d17;
	border: 1px solid var(--line-soft);
	border-radius: var(--radius-xs);
	padding: 0 10px;
}
.set-section + .set-section { margin-top: 6px; }
.set-section > summary {
	cursor: pointer;
	padding: 9px 0;
	font-weight: 600;
	font-size: 0.85rem;
	list-style: none;
	user-select: none;
	display: flex;
	align-items: center;
	gap: 6px;
}
.set-section > summary::-webkit-details-marker { display: none; }
.set-section > summary::before { content: "▸"; color: var(--accent); font-size: 0.75rem; transition: transform 0.15s; }
.set-section[open] > summary::before { transform: rotate(90deg); }
.set-section[open] { padding-bottom: 10px; }

.set-field { display: flex; flex-direction: column; gap: 4px; margin: 8px 0; }
.set-label { color: var(--muted); font-size: 0.76rem; }

.set-switch {
	flex-direction: row;
	align-items: center;
	gap: 9px;
	cursor: pointer;
	font-size: 0.84rem;
	display: flex;
	margin: 0;
}
.set-switch input { width: 17px; height: 17px; accent-color: var(--accent); flex: 0 0 auto; }

.set-field input[type="number"],
.set-field input[type="text"],
.set-select,
.set-filter {
	min-height: 34px;
	padding: 7px 9px;
	background: #100a13;
	border: 1px solid var(--line-soft);
	border-radius: 7px;
	color: var(--text);
	font-size: 0.84rem;
}
.set-field input[type="number"] { max-width: 130px; }
.set-select { width: 100%; max-width: 100%; }

.set-slider-row { display: flex; align-items: center; gap: 10px; }
.set-slider-row input[type="range"] { flex: 1; accent-color: var(--accent); height: 4px; }
.set-slider-val {
	color: var(--accent);
	font-size: 0.78rem;
	min-width: 64px;
	text-align: right;
	font-variant-numeric: tabular-nums;
}

.set-multi { display: flex; flex-direction: column; gap: 1px; }
.set-multi-scroll {
	max-height: 190px;
	overflow-y: auto;
	border: 1px solid var(--line-soft);
	border-radius: 7px;
	padding: 5px;
	background: #100a13;
}
.set-check {
	display: flex;
	align-items: center;
	gap: 7px;
	padding: 4px 6px;
	border-radius: 6px;
	cursor: pointer;
	font-size: 0.82rem;
}
.set-check:hover { background: var(--accent-soft); }
.set-check input { width: 15px; height: 15px; accent-color: var(--accent); flex: 0 0 auto; }
.set-check span { word-break: break-word; }

.set-foot { display: flex; align-items: center; gap: 10px; margin-top: 12px; }
.set-foot .btn-primary { min-height: 38px; padding: 8px 16px; font-size: 0.85rem; }
.set-status { font-size: 0.82rem; }
.set-status.ok { color: var(--ok); }
.set-status.bad { color: var(--danger); }

.match-panel {
	position: fixed;
	inset: 0;
	z-index: 60;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 18px;
	background: rgba(8, 4, 9, 0.80);
	backdrop-filter: blur(4px);
	-webkit-backdrop-filter: blur(4px);
	animation: fade 0.2s ease both;
}

.match-window {
	width: min(1200px, 100%);
	height: min(800px, 100%);
	display: flex;
	flex-direction: column;
	border: 1px solid var(--gold-line);
	border-radius: var(--radius);
	box-shadow: 0 0 0 1px rgba(255, 210, 122, 0.18), var(--shadow);
	overflow: hidden;
	background: #150a14;
	animation: pop 0.22s ease both;
}

.match-head {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 10px;
	font-size: 0.92rem;
	padding: 13px 18px;
	color: var(--gold);
	background: linear-gradient(180deg, #1c1708, #120d04);
	border-bottom: 1px solid #6b5417;
	flex: 0 0 auto;
}
.match-head-title { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.match-head-title b { color: #fff; }
.match-head .link-btn:hover { color: var(--gold); background: rgba(255, 210, 122, 0.1); }

.match-mode {
	display: inline-block;
	margin-left: 8px;
	padding: 2px 10px;
	border-radius: 999px;
	font-size: 0.72rem;
	font-weight: 700;
	letter-spacing: 0.5px;
	color: #ffe6a3;
	background: rgba(185, 146, 58, 0.20);
	border: 1px solid var(--gold);
	white-space: nowrap;
}

.match-body {
	flex: 1 1 auto;
	overflow: hidden;
	display: flex;
	background: #1b1320;
}
.match-empty {
	margin: auto;
	padding: 30px 16px;
	text-align: center;
	color: var(--muted);
	background: rgba(21, 10, 20, 0.7);
	border: 1px dashed #6b5417;
	border-radius: 12px;
}
#match-frame {
	flex: 1 1 auto;
	width: 100%;
	height: 100%;
	border: 0;
	display: block;
	background: #1b1320;
}

.match-trial {
	flex: 0 0 auto;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 10px;
	padding: 11px 18px;
	color: #ffe6c2;
	background: linear-gradient(180deg, #7a4c1c, #4a2c0c);
	border-bottom: 1px solid var(--gold);
	box-shadow: inset 0 0 24px rgba(255, 206, 92, 0.12);
	animation: trial-pulse 1.5s ease-in-out infinite;
}
@keyframes trial-pulse {
	0%, 100% { box-shadow: inset 0 0 24px rgba(255, 206, 92, 0.12); }
	50%      { box-shadow: inset 0 0 30px rgba(255, 206, 92, 0.30); }
}
.match-trial .mt-text {
	font-weight: 800;
	font-size: 1rem;
	letter-spacing: 0.3px;
	text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
	margin-right: auto;
}
.mt-btn, .mc-btn {
	padding: 9px 16px;
	min-height: 40px;
	font-size: 0.85rem;
	font-weight: 600;
	border-radius: var(--radius-xs);
	border: 1px solid var(--line);
	cursor: pointer;
}
.mt-btn:disabled, .mc-btn:disabled { opacity: 0.45; cursor: not-allowed; filter: none; }
.mt-condemn, .mc-trial.mt-condemn { color: #fff; background: #c0392b; border-color: #ff7a7a; }
.mt-condemn:not(:disabled):hover { background: #e04434; }
.mt-acquit { color: #d6ffe2; background: rgba(28, 122, 69, 0.85); border-color: #4fe08a; }
.mt-acquit:not(:disabled):hover { background: #1c7a45; }
.match-trial .mt-hint { color: #ffe6c2; font-size: 0.78rem; opacity: 0.85; }

.match-controls {
	flex: 0 0 auto;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 9px;
	padding: 11px 16px;
	background: linear-gradient(180deg, #120d04, #1c1708);
	border-top: 1px solid #6b5417;
}
.match-controls .mc-btn {
	background: var(--raised);
	color: var(--text);
}
.match-controls .mc-btn:hover:not(:disabled) { border-color: var(--accent); }

.mc-manual { color: var(--ok); border-color: var(--ok-line); background: rgba(95, 224, 138, 0.10) !important; }
.mc-manual:hover { background: rgba(95, 224, 138, 0.18) !important; }
.mc-manual.on { color: var(--gold); border-color: var(--warn-line); background: rgba(168, 131, 51, 0.18) !important; }

.mc-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.mc-actions.disabled { opacity: 0.55; }
.mc-trial { color: #ffd0a0; border-color: #7a4c1c; background: rgba(208, 138, 58, 0.12) !important; }
.mc-trial:not(:disabled):hover { background: rgba(208, 138, 58, 0.22) !important; }

.mc-chat { flex-direction: row; align-items: center; gap: 7px; margin: 0; }
.mc-chat input {
	min-height: 40px;
	min-width: 180px;
	padding: 8px 12px;
	background: #100a13;
	border: 1px solid var(--line);
	border-radius: var(--radius-xs);
	color: var(--text);
	font-size: 0.86rem;
}
.mc-chat input:disabled { opacity: 0.45; cursor: not-allowed; }

.mc-smiles {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 3px;
	flex: 1 1 100%;
	margin-top: 2px;
}
.mc-smiles .mc-smile {
	width: 22px;
	height: 22px;
	cursor: pointer;
	border-radius: 5px;
	padding: 1px;
	border: 1px solid transparent;
	transition: background 0.12s, border-color 0.12s, transform 0.12s;
}
.mc-smiles .mc-smile:hover { background: rgba(95, 224, 138, 0.18); border-color: var(--ok); transform: scale(1.15); }
.mc-smiles.disabled { opacity: 0.45; pointer-events: none; }

.mc-hint { color: var(--muted); font-size: 0.78rem; }
.mc-status { font-size: 0.8rem; margin-left: auto; font-weight: 600; }
.mc-status.ok { color: var(--ok); }
.mc-status.bad { color: var(--danger); }

@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes pop  { from { opacity: 0; transform: scale(0.97); } to { opacity: 1; transform: none; } }

@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after { animation: none !important; transition: none !important; }
}

@media (min-width: 640px) {
	.wrap { padding: 40px 20px 64px; }
	.brand h1 { font-size: 2.2rem; }
}

@media (max-width: 600px) {
	.match-panel { padding: 0; }
	.match-window {
		width: 100%;
		height: 100%;
		border-radius: 0;
		border: 0;
	}
	.match-head { padding: 12px 14px; }
	.match-trial, .match-controls { padding: 10px 12px; }
	.mc-chat { flex: 1 1 100%; }
	.mc-chat input { flex: 1 1 auto; min-width: 0; }
	.mc-status { flex-basis: 100%; margin-left: 0; }
}

@media (max-width: 420px) {
	.card { padding: 18px; }
	.links li { padding: 14px; }
	.links .act, .links .del { flex: 1 1 auto; justify-content: center; text-align: center; }
	.links .del { flex: 0 0 auto; }
}

/* мобилка: кнопки карточки бота умещаются — старт/стоп на всю ширину, остальные равными в ряд (✕ не отрывается) */
@media (max-width: 560px) {
	.links .actions { gap: 8px; }
	.links .act.autoplay { flex: 1 1 100%; }
	.links .act.broadcast, .links .act.settings, .links .act.restart, .links .del {
		flex: 1 1 0; margin-left: 0; justify-content: center;
	}
}

/* ════════════════════════════════════════════════════════════════════════
   НЕОН-ГЕЙМИНГ — стекло, свечение, анимация (слой поверх базовой темы)
   ════════════════════════════════════════════════════════════════════════ */

/* живой фон: медленно дрейфующие неоновые пятна */
body::before {
	content: "";
	position: fixed;
	inset: -20% -20% -20% -20%;
	z-index: -1;
	pointer-events: none;
	background:
		radial-gradient(40% 40% at 18% 22%, rgba(255, 79, 139, 0.16), transparent 70%),
		radial-gradient(38% 38% at 84% 16%, rgba(199, 123, 255, 0.14), transparent 70%),
		radial-gradient(45% 45% at 70% 92%, rgba(92, 208, 255, 0.08), transparent 70%);
	filter: blur(14px);
	animation: drift 22s ease-in-out infinite alternate;
}
@keyframes drift {
	0%   { transform: translate3d(0, 0, 0) scale(1); }
	50%  { transform: translate3d(2%, -2%, 0) scale(1.06); }
	100% { transform: translate3d(-2%, 2%, 0) scale(1.02); }
}

/* СТЕКЛО + неоновая рамка для карточек */
.card {
	background:
		linear-gradient(180deg, rgba(255, 255, 255, 0.05), transparent 140px),
		var(--glass);
	backdrop-filter: blur(var(--blur)) saturate(135%);
	-webkit-backdrop-filter: blur(var(--blur)) saturate(135%);
	border: 1px solid var(--glass-line);
}
/* анимированная неон-линия сверху карточки */
.card::before {
	height: 2px;
	background: var(--neon-grad-3);
	background-size: 200% 100%;
	opacity: 0.9;
	box-shadow: 0 0 14px rgba(255, 79, 139, 0.5);
	animation: sheen 6s linear infinite;
}
@keyframes sheen { to { background-position: 200% 0; } }

/* БРЕНД — неоновое свечение + переливание */
.brand h1 {
	background: var(--neon-grad-3);
	background-size: 200% auto;
	-webkit-background-clip: text;
	background-clip: text;
	color: transparent;
	animation: sheen 8s linear infinite;
	filter: drop-shadow(0 2px 12px rgba(255, 79, 139, 0.35));
}
.brand-mark { filter: drop-shadow(0 0 12px rgba(255, 79, 139, 0.6)); }

/* КНОПКИ — неон-градиент + свечение */
.btn-primary, .set-foot .btn-primary, .link-form button {
	background: var(--neon-grad);
	background-size: 160% auto;
	box-shadow: 0 6px 20px rgba(255, 79, 139, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.25);
}
.btn-primary:hover, .link-form button:hover {
	background-position: right center;
	box-shadow: var(--glow-1), 0 8px 26px rgba(199, 123, 255, 0.4);
	transform: translateY(-1px);
}

/* ИНПУТЫ — неоновый фокус */
input, select, textarea { background: var(--glass-2); border-color: var(--glass-line); }
input:focus, select:focus, textarea:focus {
	border-color: var(--neon-1);
	box-shadow: 0 0 0 3px var(--accent-soft), var(--glow-1);
}

/* стеклянные карточки ссылок + неон при наведении */
.links li {
	background: var(--glass-2);
	border-color: var(--glass-line);
	backdrop-filter: blur(8px);
	-webkit-backdrop-filter: blur(8px);
}
.links li:hover { border-color: rgba(255, 79, 139, 0.5); box-shadow: var(--glow-1); transform: translateY(-2px); }

/* статусные точки — свечение «онлайн» */
.badge.run, .badge.on { border-color: var(--ok-line); color: var(--ok); box-shadow: 0 0 12px rgba(95, 224, 138, 0.35); }

/* ── АДМИН-ПАНЕЛЬ ── */
.admin-card { border-color: rgba(199, 123, 255, 0.3); }
.admin-toolbar { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin: 4px 0 16px; }
.admin-subtitle { display: flex; align-items: center; gap: 8px; font-size: 0.95rem; font-weight: 700; margin: 22px 0 12px; color: var(--text-2); }

/* тумблер open-access */
.switch { display: inline-flex; align-items: center; gap: 10px; font-size: 0.85rem; color: var(--text-2); cursor: pointer; user-select: none; }
.switch input { display: none; }
.switch .slider { position: relative; width: 46px; height: 26px; border-radius: 999px; background: var(--glass-2); border: 1px solid var(--glass-line); transition: background 0.2s, box-shadow 0.2s; flex: 0 0 auto; }
.switch .slider::after { content: ""; position: absolute; top: 2px; left: 2px; width: 20px; height: 20px; border-radius: 50%; background: #b9a8c0; transition: transform 0.2s, background 0.2s; }
.switch input:checked + .slider { background: var(--neon-grad); box-shadow: var(--glow-1); }
.switch input:checked + .slider::after { transform: translateX(20px); background: #fff; }

/* карточка пользователя */
.admin-users { display: flex; flex-direction: column; gap: 12px; }
.admin-user { background: var(--glass-2); border: 1px solid var(--glass-line); border-radius: var(--radius-sm); padding: 14px; backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); transition: border-color 0.15s; }
.admin-user.is-admin { border-color: rgba(199, 123, 255, 0.45); box-shadow: var(--glow-2); }
.admin-user.me { outline: 1px dashed rgba(255, 79, 139, 0.4); }
.au-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.au-name { font-weight: 700; font-size: 0.95rem; display: flex; align-items: center; gap: 7px; min-width: 0; }
.au-name { flex-wrap: wrap; }
.au-name .you { font-size: 0.72rem; color: var(--neon-1); font-weight: 600; }
.au-seen { flex: 1 1 100%; font-size: 0.72rem; color: var(--muted); font-weight: 500; display: flex; align-items: center; gap: 4px; margin-top: 1px; }
.au-seen.online { color: var(--ok); text-shadow: 0 0 8px rgba(95, 224, 138, 0.4); }
.au-meta { font-size: 0.75rem; color: var(--muted); }
.au-actions { display: flex; align-items: center; gap: 8px; margin-left: auto; flex-wrap: wrap; }

/* сегментированный выбор уровня доступа */
.seg { display: inline-flex; padding: 3px; gap: 3px; background: var(--glass); border: 1px solid var(--glass-line); border-radius: 999px; }
.seg button { padding: 6px 12px; border-radius: 999px; font-size: 0.76rem; font-weight: 600; color: var(--muted); background: transparent; min-height: 0; }
.seg button:hover { color: var(--text-2); }
.seg button.on { color: #fff; background: var(--neon-grad); box-shadow: var(--glow-1); }
.seg button.on.lvl0 { background: linear-gradient(180deg, #5a4a5a, #3a2e3a); box-shadow: none; color: var(--text-2); }

.btn-danger { padding: 7px 13px; border-radius: var(--radius-xs); font-size: 0.78rem; font-weight: 600; color: #ffd9e1; background: rgba(255, 92, 122, 0.14); border: 1px solid rgba(255, 92, 122, 0.4); min-height: 0; }
.btn-danger:hover { background: rgba(255, 92, 122, 0.26); box-shadow: 0 0 14px rgba(255, 92, 122, 0.35); color: #fff; }

/* боты пользователя в админке */
.au-links { display: flex; flex-direction: column; gap: 7px; margin-top: 12px; }
.au-link { display: flex; align-items: center; gap: 9px; font-size: 0.82rem; padding: 8px 11px; background: var(--glass); border: 1px solid var(--glass-line); border-radius: var(--radius-xs); flex-wrap: wrap; }
.au-link .dot { width: 9px; height: 9px; border-radius: 50%; background: #5a4a5a; flex: 0 0 auto; }
.au-link.run .dot { background: var(--ok); box-shadow: 0 0 10px rgba(95, 224, 138, 0.6); }
.au-link .lbl { font-weight: 600; }
.au-link .ph { color: var(--muted); font-size: 0.76rem; }
.au-link .restart { margin-left: auto; font-size: 0.74rem; padding: 5px 10px; color: var(--neon-2); background: rgba(199, 123, 255, 0.12); border: 1px solid rgba(199, 123, 255, 0.35); border-radius: 999px; min-height: 0; }
.au-link .restart:hover { background: rgba(199, 123, 255, 0.24); box-shadow: var(--glow-2); }
.au-empty { font-size: 0.78rem; color: var(--muted); margin-top: 8px; }

/* лента ошибок (из файла логов, НЕ из БД) */
.admin-errors { display: flex; flex-direction: column; gap: 4px; max-height: 260px; overflow: auto; background: var(--glass-2); border: 1px solid var(--glass-line); border-radius: var(--radius-sm); padding: 10px; }
.err-line { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: 0.74rem; color: #ffb3c0; line-height: 1.45; word-break: break-word; padding: 2px 0; border-bottom: 1px solid rgba(255, 255, 255, 0.04); }
.err-empty { font-size: 0.8rem; color: var(--ok); text-align: center; padding: 14px; }

/* ФИКС: общий input:focus давал чекбоксам/радио/слайдерам «рамку-свечение». Убираем для них. */
input[type="checkbox"], input[type="radio"], input[type="range"] { -webkit-tap-highlight-color: transparent; min-height: 0; }
input[type="checkbox"]:focus, input[type="radio"]:focus, input[type="range"]:focus {
	box-shadow: none; background: none; border-color: transparent; outline: none;
}
.set-switch, .set-check { -webkit-tap-highlight-color: transparent; user-select: none; }

/* LIVE-индикатор (вместо иконки 📺) — пульсирующая красная точка + LIVE */
.live-badge { display: inline-flex; align-items: center; gap: 6px; font-weight: 800; font-size: 0.72rem; letter-spacing: 0.6px; color: #ff5c7a; }
.live-badge::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #ff3b5c; box-shadow: 0 0 9px #ff3b5c, 0 0 3px #fff; animation: livepulse 1.3s ease-in-out infinite; flex: 0 0 auto; }
@keyframes livepulse { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: 0.35; transform: scale(0.7); } }

/* админ: кнопки «смотреть LIVE» и «удалить бота» в строке бота */
.au-link .au-watch { margin-left: auto; font-size: 0.74rem; padding: 5px 11px; color: #ffd9e1; background: rgba(255, 59, 92, 0.14); border: 1px solid rgba(255, 59, 92, 0.45); border-radius: 999px; min-height: 0; font-weight: 700; }
.au-link .au-watch:hover { background: rgba(255, 59, 92, 0.26); box-shadow: 0 0 14px rgba(255, 59, 92, 0.4); }
.au-link .au-watch + .restart, .au-link .au-watch ~ .au-del-link { margin-left: 0; }
.au-link .restart { margin-left: 0; }

/* группа кнопок бота: на десктопе справа в строке, на мобилке — отдельной второй строкой */
.au-link { flex-wrap: wrap; }
.au-link-btns { display: inline-flex; align-items: center; gap: 6px; margin-left: auto; }
.au-link-btns .au-watch, .au-link-btns .restart, .au-link-btns .au-del-link { margin-left: 0; }
@media (max-width: 560px) {
	.au-link-btns { flex: 1 1 100%; margin-left: 0; margin-top: 8px; }
	.au-link-btns > button { flex: 1; justify-content: center; }
}
.au-del-link { font-size: 0.78rem; padding: 5px 9px; color: #ffd9e1; background: rgba(255, 92, 122, 0.12); border: 1px solid rgba(255, 92, 122, 0.4); border-radius: 999px; min-height: 0; }
.au-del-link:hover { background: rgba(255, 92, 122, 0.26); box-shadow: 0 0 12px rgba(255, 92, 122, 0.35); }

/* поиск по пользователям в админке */
.admin-search { flex: 1 1 220px; min-width: 180px; max-width: 360px; min-height: 40px; }

/* кнопка «Админка» в топбаре */
.admin-link { color: var(--neon-2); font-weight: 600; }
.admin-link:hover { color: #e3c8ff; background: rgba(199, 123, 255, 0.12); box-shadow: var(--glow-2); }

/* логотип (SVG: бот в федоре + нейросеть) и переключатель языка RU/LV */
.brand { position: relative; }
.brand-logo { width: 48px; height: 48px; flex: 0 0 auto; filter: drop-shadow(0 0 10px rgba(255, 79, 139, 0.5)); }
.lang { position: absolute; right: 0; top: 50%; transform: translateY(-50%); display: inline-flex; gap: 2px; padding: 3px; background: var(--glass-2); border: 1px solid var(--glass-line); border-radius: 999px; }
.lang-btn { padding: 5px 10px; border-radius: 999px; font-size: 0.72rem; font-weight: 700; letter-spacing: 0.5px; color: var(--muted); background: transparent; min-height: 0; }
.lang-btn:hover { color: var(--text-2); }
.lang-btn.on { color: #fff; background: var(--neon-grad); box-shadow: var(--glow-1); }

/* ════════════════════════════════════════════════════════════════════════
   ДАШБОРД-РАСКЛАДКА — широкий контейнер + сетка ботов (убираем пустоту по бокам)
   ════════════════════════════════════════════════════════════════════════ */
.wrap { max-width: 1120px; }
.auth-card { max-width: 420px; }            /* вход остаётся узким и по центру */

/* «Мои ссылки» — адаптивная сетка карточек: 1 колонка на узком, 2–3 на широком */
.links {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
	gap: 14px;
	align-items: start;
}
.links li { height: 100%; }                 /* карточки одной строки — равной высоты */
.links li:hover { transform: translateY(-3px); }

/* форма добавления — на всю ширину окна (юзер): Название | Ссылка | Добавить в один ряд */
.link-form { max-width: none; }
.link-form input { flex: 1 1 200px; }
.link-form button { flex: 0 0 auto; }

/* на мобилке кнопка «Добавить» — во всю ширину; сетка ботов — одна колонка (без сдвигов по ширине) */
@media (max-width: 560px) {
	.link-form button { flex: 1 1 100%; width: 100%; }
	.links { grid-template-columns: 1fr; }

	/* верхняя строка ЛК: ник отдельной строкой, кнопки «Админка/Выйти» — ровными кнопками ниже */
	.cabinet-card .topbar { flex-wrap: wrap; gap: 10px; }
	.cabinet-card .topbar .user { flex: 1 1 100%; justify-content: flex-start; }
	.cabinet-card .topbar > .link-btn {
		flex: 1 1 0;
		min-height: 44px;
		justify-content: center;
		text-align: center;
		border: 1px solid var(--glass-line);
		border-radius: var(--radius-xs);
		background: var(--glass-2);
		color: var(--text-2);
	}
	.cabinet-card .topbar > .admin-link { color: var(--neon-2); border-color: rgba(199, 123, 255, 0.4); }
}

/* красивая неоновая линия-разделитель под шапкой админ-панели */
.admin-card .topbar {
	border-bottom: none;
	position: relative;
	padding-bottom: 18px;
}
.admin-card .topbar::after {
	content: "";
	position: absolute;
	left: 0; right: 0; bottom: 0;
	height: 2px;
	border-radius: 2px;
	background: linear-gradient(90deg, transparent 0%, var(--neon-1) 30%, var(--neon-2) 70%, transparent 100%);
	background-size: 200% 100%;
	box-shadow: 0 0 14px rgba(199, 123, 255, 0.55);
	animation: sheen 6s linear infinite;
}

/* подпанели (сообщения/настройки) — читаемая ширина по центру, а не во всю карточку */
.subpanel { max-width: 880px; margin-left: auto; margin-right: auto; }

/* админ: список пользователей шире — карточки в 2 колонки на широком экране */
@media (min-width: 760px) {
	.admin-users { display: grid; grid-template-columns: repeat(auto-fill, minmax(420px, 1fr)); gap: 12px; align-items: start; }
}
