:root[data-theme='dark'] {
	color-scheme: dark;
	--ground: #0d111c;
	--paper: #141b2b;
	--ink: #edf1fe;
	--muted: #a6b2cc;
	--accent: #afbbff;
	--line: #2a3650;
	--raised: #1d2740;
	--inset: #101626;
	--teal: #9be5d4;
	--warning: #f2c589;
}
[data-theme='dark'] ::selection {
	background: #bac3ff;
	color: #171d36;
}
[data-theme='dark'] .sidebar {
	background: #101624;
}
[data-theme='dark'] :is(.skip, .login-form, .secondary, .suggestions button, .chat-peak, .kpi-strip) {
	background: var(--paper);
	color: var(--ink);
}
[data-theme='dark'] :is(.panel, .kpi-strip, .login-form) {
	box-shadow: inset 0 0 0 1px var(--line);
}
[data-theme='dark'] :is(.sidebar nav a[aria-current], .admin-app-tag, .user-message-text, .progress, .chat-progress) {
	background: var(--raised);
	color: var(--ink);
}
[data-theme='dark'] :is(.sidebar nav a[aria-current], .admin-app-tag, .progress, .analytics-unit-link) {
	color: var(--accent);
}
[data-theme='dark'] .primary {
	background: #b1baff;
	color: #141a31;
}
[data-theme='dark'] :is(.field input, .field select, .field textarea, .chart-tools input, .chart-tools select) {
	background: var(--inset);
	color: var(--ink);
}
[data-theme='dark'] :is(input, textarea)::placeholder,
[data-theme='dark'] .message-label {
	color: var(--muted);
}
[data-theme='dark'] .chat-chart {
	background: linear-gradient(150deg, #222a46, var(--paper) 53%);
	box-shadow: 0 12px 28px #05081152;
}
[data-theme='dark'] .composer {
	background: linear-gradient(155deg, #1b2540, var(--paper) 52%);
	border-color: #3a4868;
	box-shadow: 0 10px 32px #0508117d;
}
[data-theme='dark'] .composer:focus-within {
	border-color: #8d9cde;
	box-shadow: 0 10px 32px #05081180, 0 0 0 2px #8d9cde32;
}
[data-theme='dark'] .composer-bottom {
	border-color: var(--line);
}
[data-theme='dark'] .composer button span {
	background: #141a3124;
}
[data-theme='dark'] .group-picker {
	background: linear-gradient(150deg, var(--paper) 58%, #13242e);
}
[data-theme='dark'] :is(.group-controls, .group-option, .avatar-option, .theme-option) {
	background: var(--inset);
}
[data-theme='dark'] :is(.group-option, .avatar-option, .theme-option):has(:checked) {
	background: #173035;
	border-color: #4f8e85;
}
[data-theme='dark'] :is(.group-option, .avatar-option, .theme-option):hover {
	border-color: #6aa498;
}
[data-theme='dark'] :is(.group-units, .state-badge.moving, .avatar-tip),
[data-theme='dark'] .avatar-tip::before {
	background: #1a383c;
	color: var(--teal);
}
[data-theme='dark'] .avatar-tip,
[data-theme='dark'] .avatar-tip::before {
	border-color: #4f8e85;
}
[data-theme='dark'] :is(.chat-chart-track, .bar-track, .series-track) {
	background: #252f49;
}
[data-theme='dark'] :is(.bar-row, .comparison-row) {
	border-color: var(--line);
}
[data-theme='dark'] .chat-chart-bar {
	background: linear-gradient(90deg, #aa92ff, #77c6ec);
}
[data-theme='dark'] .chat-chart-bar-leading {
	background: linear-gradient(90deg, #ffad92, #d9a1f5 47%, #80b7f8);
}
[data-theme='dark'] .bar.residual,
[data-theme='dark'] .legend span:last-child::before {
	background: #607398;
}
[data-theme='dark'] .daily-column .column span {
	background: linear-gradient(#a8b6ff, #5e75cc);
}
[data-theme='dark'] table.data th,
[data-theme='dark'] table.data tbody tr:hover {
	background: var(--raised);
}
[data-theme='dark'] .state-badge:not(.moving, .idle) {
	background: var(--raised);
	color: var(--muted);
}
[data-theme='dark'] .state-badge.idle {
	background: #3d2d20;
	color: var(--warning);
}
[data-theme='dark'] :is(.quality, .quality-notices, .log-level.warning) {
	color: var(--warning);
}
[data-theme='dark'] .log-level.error {
	color: #ffadb8;
}
[data-theme='dark'] .log-level.info {
	color: var(--teal);
}
[data-theme='dark'] .notice {
	background: #38222c;
	color: #ffc0c9;
}
[data-theme='dark'] .demo-banner {
	background: #252144;
	color: #ded7ff;
}
[data-theme='dark'] .spinner {
	border-color: #4b587a;
	border-top-color: var(--accent);
}
[data-theme='dark'] ::-webkit-scrollbar-thumb {
	background: #425474;
}
[data-theme='dark'] :is(.powered, .footer-powered) img {
	background: #edf4f3;
	border-radius: 5px;
	padding: 2px 4px;
}
@media (hover: hover) and (pointer: fine) {
	[data-theme='dark'] :is(.secondary:hover, .suggestions button:hover, .sidebar nav a:hover) {
		background: #27334e;
		color: var(--ink);
	}
	[data-theme='dark'] .primary:hover {
		background: #ccd3ff;
	}
}

[data-theme='dark'] .avatar-button {
	box-shadow: 0 0 0 2px #6378a688, 0 8px 28px #759cdb30;
}
[data-theme='dark'] .appearance-panel {
	background: linear-gradient(150deg, #1b2540, var(--paper) 60%);
}
