html {
	color-scheme: light;
}

html[data-admin-theme='dark'] {
	color-scheme: dark;
}

html[data-admin-theme='dark'] body {
	background: #171a1f !important;
	color: #e5e7eb !important;
}

/* Decap renders most of its interface with generated Emotion classes. Reset
   those fixed light-theme colors to a neutral surface so hover/focus states
   cannot leave isolated white cards or tint the workspace blue. */
html[data-admin-theme='dark'] #nc-root,
html[data-admin-theme='dark'] #nc-root * {
	color: #e5e7eb !important;
	background-color: transparent !important;
	border-color: #353b45 !important;
	box-shadow: none !important;
}

html[data-admin-theme='dark'] #nc-root {
	background-color: #171a1f !important;
}

html[data-admin-theme='dark'] #nc-root a {
	color: #9db8ff !important;
}

html[data-admin-theme='dark'] #nc-root button,
html[data-admin-theme='dark'] #nc-root [role='button'] {
	background-color: #252a32 !important;
	border-color: #414956 !important;
	color: #edf0f4 !important;
}

html[data-admin-theme='dark'] #nc-root button:hover,
html[data-admin-theme='dark'] #nc-root [role='button']:hover,
html[data-admin-theme='dark'] #nc-root [aria-selected='true'],
html[data-admin-theme='dark'] #nc-root [aria-current='page'] {
	background-color: #303947 !important;
}

html[data-admin-theme='dark'] #nc-root input,
html[data-admin-theme='dark'] #nc-root textarea,
html[data-admin-theme='dark'] #nc-root select,
html[data-admin-theme='dark'] #nc-root [role='combobox'] {
	background-color: #20242b !important;
	border-color: #454d59 !important;
	color: #edf0f4 !important;
}

html[data-admin-theme='dark'] #nc-root input::placeholder,
html[data-admin-theme='dark'] #nc-root textarea::placeholder {
	color: #929aa7 !important;
}

html[data-admin-theme='dark'] #nc-root label,
html[data-admin-theme='dark'] #nc-root [class*='FieldLabel'] {
	color: #c2c9d3 !important;
}

html[data-admin-theme='dark'] #nc-root small,
html[data-admin-theme='dark'] #nc-root [class*='hint'],
html[data-admin-theme='dark'] #nc-root [class*='Hint'] {
	color: #a0a9b6 !important;
}

html[data-admin-theme='dark'] #nc-root input:focus,
html[data-admin-theme='dark'] #nc-root textarea:focus,
html[data-admin-theme='dark'] #nc-root select:focus,
html[data-admin-theme='dark'] #nc-root [role='combobox']:focus-within {
	border-color: #7d9bfa !important;
	box-shadow: 0 0 0 2px rgb(125 155 250 / 22%) !important;
}

html[data-admin-theme='dark'] #nc-root input[type='checkbox'],
html[data-admin-theme='dark'] #nc-root input[type='radio'] {
	accent-color: #829cff;
}

html[data-admin-theme='dark'] #nc-root iframe {
	border: 1px solid #353b45 !important;
	border-radius: 4px;
}

html[data-admin-theme='dark'] #nc-root ::selection {
	background: #465b8a !important;
	color: #fff !important;
}

html[data-admin-theme='dark'] #nc-root,
html[data-admin-theme='dark'] body {
	scrollbar-color: #49515e #1c2026;
}

html[data-admin-theme='dark'] #nc-root::-webkit-scrollbar,
html[data-admin-theme='dark'] body::-webkit-scrollbar {
	width: 10px;
	height: 10px;
}

html[data-admin-theme='dark'] #nc-root::-webkit-scrollbar-thumb,
html[data-admin-theme='dark'] body::-webkit-scrollbar-thumb {
	border: 2px solid #1c2026;
	border-radius: 999px;
	background: #49515e;
}

#admin-theme-toggle {
	position: fixed;
	right: 20px;
	bottom: 20px;
	z-index: 2147483647;
	min-height: 42px;
	padding: 0 14px;
	border: 1px solid #c7cbd1;
	border-radius: 999px;
	background: #fff;
	color: #20242a;
	box-shadow: 0 3px 12px rgb(0 0 0 / 18%);
	font: 600 14px/1.2 system-ui, sans-serif;
	cursor: pointer;
}

#admin-theme-toggle:hover {
	box-shadow: 0 4px 16px rgb(0 0 0 / 24%);
}

#admin-theme-toggle:focus-visible {
	outline: 3px solid #4d7cfe;
	outline-offset: 3px;
}

html[data-admin-theme='dark'] #admin-theme-toggle {
	border-color: #3a4553;
	background: #222a35;
	color: #e5eaf1;
}
