:root,
[data-theme="dark"] {
	--bg: #0f172a;
	--fg: #e2e8f0;
	--fg-subtle: #e2e8f055;
	--muted: #64748b;
	--surface: #1e293b;
	--surface: #16233b;
	--border: #334155;
	--border-subtle: #1e293b;
	--ring: #60a5fa;
	--primary: #3b82f6;
	--primary-fg: #ffffff;
	--primary-subtle: #1e3a8a;
	--primary-subtle-fg: #93c5fd;
	--secondary: #475569;
	--secondary-fg: #f1f5f9;
	--secondary-subtle: #1e293b;
	--secondary-subtle-fg: #94a3b8;
	--success: #10b981;
	--success-fg: #ffffff;
	--success-subtle: #064e3b;
	--success-subtle-fg: #6ee7b7;
	--danger: #ef4444;
	--danger-fg: #ffffff;
	--danger-subtle: #450a0a;
	--danger-subtle-fg: #fca5a5;
	--warning: #f59e0b;
	--warning-fg: #ffffff;
	--warning-subtle: #451a03;
	--warning-subtle-fg: #fcd34d;
	--radius: 0.375rem;
	--shadow: 0 10px 15px -3px rgb(0 0 0 / 0.4), 0 4px 6px -4px rgb(0 0 0 / 0.3);
	color: var(--fg);
}

[data-theme="light"] {
	--bg: #ffffff;
	--fg: #0f172a;
	--muted: #64748b;
	--surface: #f8fafc;
	--border: #cbd5e1;
	--border-subtle: #e2e8f0;
	--ring: #3b82f6;
	--primary: #2563eb;
	--primary-fg: #ffffff;
	--primary-subtle: #dbeafe;
	--primary-subtle-fg: #1e3a8a;
	--secondary: #475569;
	--secondary-fg: #ffffff;
	--secondary-subtle: #e2e8f0;
	--secondary-subtle-fg: #334155;
	--success: #059669;
	--success-fg: #ffffff;
	--success-subtle: #d1fae5;
	--success-subtle-fg: #065f46;
	--danger: #dc2626;
	--danger-fg: #ffffff;
	--danger-subtle: #fee2e2;
	--danger-subtle-fg: #991b1b;
	--warning: #d97706;
	--warning-fg: #111827;
	--warning-subtle: #fef3c7;
	--warning-subtle-fg: #92400e;
	--radius: 0.375rem;
	--shadow: 0 10px 15px -3px rgb(15 23 42 / 0.1), 0 4px 6px -4px rgb(15 23 42 / 0.1);
}

:root {
	--background: var(--bg);
	--foreground: var(--fg);
}

body {
	background-color: var(--bg);
	color: var(--fg);
}

h3 {
	font-size: var(--text-2xl);
}


[v-cloak] {
	display: none;
}

@keyframes sweep {
	0% {
		opacity: 0;
		margin-left: -10px
	}

	100% {
		opacity: 1;
		margin-left: 0px
	}
}

.vstack {
	display: flex;
	flex-direction: column;
}

.hstack {
	display: flex;
	flex-direction: row;
}

.io-theme-toggle {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	border: 1px solid var(--border);
	border-radius: 9999px;
	background-color: var(--surface);
	padding: 0.25rem 0.75rem;
	font-size: 0.875rem;
	color: var(--fg);
	cursor: pointer;
	transition: background-color 150ms ease, border-color 150ms ease;
}

.io-theme-toggle:hover {
	background-color: var(--border);
}

.btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.5rem;
	border: 1px solid transparent;
	border-radius: var(--radius);
	padding: 0.5rem 0.75rem;
	font-size: 0.875rem;
	font-weight: 500;
	line-height: 1.25rem;
	text-decoration: none;
	cursor: pointer;
	transition: color 150ms ease, background-color 150ms ease, border-color 150ms ease, box-shadow 150ms ease;
}

.surface {
	background-color: var(--surface);
}

.btn:focus-visible,
.form-control:focus,
.form-select:focus,
.form-check-input:focus {
	outline: 2px solid transparent;
	outline-offset: 2px;
	box-shadow: 0 0 0 2px var(--ring);
}

.container {
	margin: auto;
	padding: 0 1rem;
}

.btn-primary,
.text-bg-primary {
	background-color: var(--primary);
	border-color: var(--primary);
	color: var(--primary-fg);
}

.btn-secondary,
.badge-secondary {
	background-color: var(--secondary);
	border-color: var(--secondary);
	color: var(--secondary-fg);
}

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

.btn-danger {
	background-color: var(--danger);
	border-color: var(--danger);
	color: var(--danger-fg);
}

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


.btn-info {
	background-color: var(--info);
	border-color: var(--info);
	color: var(--info-fg);
}

.btn-outline-primary {
	background-color: transparent;
	border-color: var(--primary);
	color: var(--primary);
}

.btn-outline-primary:hover {
	background-color: var(--primary-subtle);
}

.btn-lg {
	padding: 0.625rem 1rem;
	font-size: 1rem;
}

.btn-group {
	display: inline-flex;
	border-radius: var(--radius);
	box-shadow: 0 1px 2px 0 rgb(15 23 42 / 0.05);
}

.btn-group>.btn:not(:first-child) {
	margin-left: -1px;
	border-top-left-radius: 0;
	border-bottom-left-radius: 0;
}

.btn-group>.btn:not(:last-child) {
	border-top-right-radius: 0;
	border-bottom-right-radius: 0;
}

.btn.active {
	box-shadow: 0 0 0 2px var(--ring);
}

.btn-close {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 2rem;
	height: 2rem;
	border: 0;
	border-radius: var(--radius);
	background: transparent;
	color: var(--muted);
	cursor: pointer;
}

.btn-close::before {
	content: "\00d7";
	font-size: 1.25rem;
	line-height: 1;
}

.btn-close:hover {
	background-color: var(--secondary-subtle);
	color: var(--fg);
}

.alert {
	border: 1px solid var(--border-subtle);
	border-radius: var(--radius);
	padding: 1rem;
}

.alert-primary {
	background-color: var(--primary-subtle);
	border-color: var(--primary);
	color: var(--fg);
}

.alert-secondary {
	background-color: var(--secondary-subtle);
	border-color: var(--secondary);
	color: var(--fg);
}

.alert-success {
	background-color: var(--success-subtle);
	border-color: var(--success);
	color: var(--fg);
}

.alert-danger .alert-heading {
	--fg: var(var(--danger-subtle-fg));
}

.alert-danger {
	background-color: var(--danger-subtle);
	border-color: var(--danger);
	color: var(--fg);
}

.alert-warning {
	background-color: var(--warning-subtle);
	border-color: var(--fg-subtle);
	color: var(--fg);
}

.alert-warning .alert-heading {
	--fg: var(--danger-subtle-fg);
}

.alert-heading {
	font-weight: 600;
	color: var(--fg);
}

.io-notify {
	box-shadow: var(--shadow);
}

*:focus {
	outline: none;
}

.form-control,
.form-select {
	display: block;
	width: 100%;
	border: 1px solid var(--border);
	border-radius: var(--radius);
	background-color: var(--bg);
	padding: 0.5rem 0.75rem;
	font-size: 0.875rem;
	line-height: 1.25rem;
	color: var(--fg);
	box-shadow: 0 1px 2px 0 rgb(15 23 42 / 0.05);
}

.form-range {
	width: 100%;
	accent-color: var(--primary);
}

.form-check,
.form-check-label {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
}

.form-check-input {
	width: 1rem;
	height: 1rem;
	border: 1px solid var(--border);
	border-radius: 0.25rem;
	accent-color: var(--primary);
}

.form-switch .form-check-input {
	width: 2.25rem;
	border-radius: 9999px;
}

.input-group {
	display: flex;
	align-items: stretch;
}

.input-group-text {
	display: inline-flex;
	align-items: center;
	border: 1px solid var(--border);
	background-color: var(--surface);
	padding: 0.5rem 0.75rem;
	color: var(--muted);
}

.input-group>.input-group-text:first-child {
	border-right: 0;
	border-top-left-radius: var(--radius);
	border-bottom-left-radius: var(--radius);
}

.input-group>.form-control {
	border-top-left-radius: 0;
	border-bottom-left-radius: 0;
}

.row {
	display: flex;
	flex-wrap: wrap;
}

.col {
	flex: 1 1 0%;
	min-width: 0;
}

.d-flex,
.hstack {
	display: flex;
}

.flex {
	display: flex;
}

.d-inline-flex {
	display: inline-flex;
}

.inline-flex {
	display: inline-flex;
}

.vstack {
	display: flex;
	flex-direction: column;
}

.flex-col {
	flex-direction: column;
}

.flex-wrap {
	flex-wrap: wrap;
}

.flex-nowrap {
	flex-wrap: nowrap;
}

.flex-1 {
	flex: 1 1 0%;
}

.min-w-0 {
	min-width: 0;
}

.w-full {
	width: 100%;
}

.overflow-x-auto {
	overflow-x: auto;
}

.justify-content-between {
	justify-content: space-between;
}

.justify-between {
	justify-content: space-between;
}

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

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

.justify-content-around {
	justify-content: space-around;
}

.justify-around {
	justify-content: space-around;
}

.gap-1 {
	gap: 0.25rem;
}

.gap-4 {
	gap: 1rem;
}

.w-auto {
	width: auto;
}

.m-1 {
	margin: 0.25rem;
}

.m-2 {
	margin: 0.5rem;
}

.mt-2 {
	margin-top: 0.5rem;
}

.ms-4 {
	margin-left: 1rem;
}

.me-2 {
	margin-right: 0.5rem;
}

.p-2 {
	padding: 0.5rem;
}

.p-4 {
	padding: 1rem;
}

.px-4 {
	padding-left: 1rem;
	padding-right: 1rem;
}

.py-2 {
	padding-top: 0.5rem;
	padding-bottom: 0.5rem;
}

.ps-3 {
	padding-left: 0.75rem;
}

.pe-2 {
	padding-right: 0.5rem;
}

.border {
	border: 1px solid var(--border);
	border-radius: var(--radius);
}

.border-1 {
	border-width: 1px;
}

.rounded-pill {
	border-radius: 9999px;
}

.badge {
	display: inline-flex;
	align-items: center;
	gap: 0.25rem;
	border-radius: var(--radius);
	padding: 0.25rem 0.5rem;
	font-size: 0.75rem;
	font-weight: 600;
	line-height: 1rem;
}

.bg-primary {
	background-color: var(--primary-subtle);
}

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

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

.bg-surface-subtle {
	--bg: color-mix(in srgb, var(--surface), transparent 50%);
	background-color: var(--bg);
}




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

.text-bg-light {
	color: var(--fg);
}

.floating {
	position: relative;
	margin-top: 1em;
}

.floating input,
.floating textarea {
	width: 100%;
	padding: 1rem 0.75rem 0.25rem;
	/* top padding makes room for the floated label */
	font-size: 15px;
	border: 1px solid var(--border);
	border-radius: 6px;
	background: var(--bg);
}

.floating input::placeholder,
.floating textarea::placeholder {
	color: transparent;
	/* hides placeholder; :not(:placeholder-shown) still fires */
}

.floating label {
	position: absolute;
	top: 50%;
	left: 0.75rem;
	transform: translateY(-50%);
	font-size: 15px;
	color: var(--fg);
	pointer-events: none;
	transition: all 0.15s ease;
	margin-left: 1em;
}

/* .fieldset.floating textarea:focus~label, */
/* .fieldset.floating textarea:not(:placeholder-shown)~label { */


.floating input:focus~label,
.floating input:not(:placeholder-shown)~label {
	top: 1rem;
	transform: none;
	font-size: 11px;
	color: var(--primary-subtle-fg);
}

.form-card {
	margin: 1em 0;
	padding: 1em;
}

.fieldset,
fieldset {
	display: flex;
	flex-direction: column;
}

.fieldset.border,
fieldset.border {
	border: .5px solid var(--border);
	border-radius: 12px;
}

.fieldset label,
fieldset label {
	margin-bottom: .5em;
}

legend {
	font-size: .75rem;
	font-weight: 500;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--fg);
	padding: 0 8px;
	display: flex;
	align-items: center;
	gap: 6px;
}


legend i {
	font-size: 14px;
	color: var(--primary-subtle-fg);
}


.fieldset input {
	padding: .8em;
	color: var(--fg);
	background-color: var(--bg);
	border: 1px solid var(--border);
	border-radius: 3px;
}

.card,
.form-card {
	border: 1px solid var(--border);
	border-radius: var(--radius);
	background-color: var(--bg);
	box-shadow: 0 1px 2px 0 rgb(15 23 42 / 0.05);
	background-color: var(--surface);
	color: var(--fg);
}

.card-body {
	padding: 1rem;
}

.collapse:not(.show) {
	display: none;
}


.io-drawer-backdrop {
	position: fixed;
	inset: 0;
	background: rgba(0, 0, 0, 0.5);
	z-index: 1049;
}

.io-drawer-panel {
	position: fixed;
	z-index: 1050;
	display: flex;
	flex-direction: column;
	overflow: hidden;
	background-color: var(--surface);
	color: var(--fg);
	box-shadow: 0 0 20px rgba(0, 0, 0, 0.3);
}

.io-drawer-panel[data-from="right"] {
	top: 0;
	right: 0;
	bottom: 0;
	width: var(--drawer-size, 320px);
}

.io-drawer-panel[data-from="left"] {
	top: 0;
	left: 0;
	bottom: 0;
	width: var(--drawer-size, 320px);
}

.io-drawer-panel[data-from="top"] {
	top: 0;
	left: 0;
	right: 0;
	height: var(--drawer-size, 320px);
}

.io-drawer-panel[data-from="bottom"] {
	bottom: 0;
	left: 0;
	right: 0;
	height: var(--drawer-size, 320px);
}

.io-drawer-panel .modal-body {
	flex: 1;
	overflow: auto;
}

.io-drawer-enter-from,
.io-drawer-leave-to {
	opacity: 0;
}

.io-drawer-enter-active,
.io-drawer-leave-active {
	transition: opacity .3s ease;
}

.io-drawer-enter-from .io-drawer-panel[data-from="right"],
.io-drawer-leave-to .io-drawer-panel[data-from="right"] {
	transform: translateX(100%);
}

.io-drawer-enter-from .io-drawer-panel[data-from="left"],
.io-drawer-leave-to .io-drawer-panel[data-from="left"] {
	transform: translateX(-100%);
}

.io-drawer-enter-from .io-drawer-panel[data-from="top"],
.io-drawer-leave-to .io-drawer-panel[data-from="top"] {
	transform: translateY(-100%);
}

.io-drawer-enter-from .io-drawer-panel[data-from="bottom"],
.io-drawer-leave-to .io-drawer-panel[data-from="bottom"] {
	transform: translateY(100%);
}

.io-drawer-enter-active .io-drawer-panel,
.io-drawer-leave-active .io-drawer-panel {
	transition: transform .3s ease;
}

.accordion {

	.accordion-item {
		border: 1px solid var(--border);
	}

	.accordion-item:first-child {
		border-radius: var(--radius) var(--radius) 0 0;
	}

	.accordion-collapse {
		display: grid;
		grid-template-rows: 0fr;
		transition: grid-template-rows .3s ease;
	}

	.accordion-collapse.show {
		grid-template-rows: 1fr;
	}

	.accordion-collapse>div {
		overflow: hidden;
	}

	.accordion-header {
		padding: 1em;
		background: var(--ctheme);
		color: var(--fg);

	}

	.accordion-body {
		padding: 1em;
		background-color: var(--surface);
		color: var(--fg);
	}
}

.modal {
	position: fixed;
	inset: 0;
	z-index: 50;
	display: none;
	overflow-y: auto;
	background-color: rgb(15 23 42 / 0.5);
	padding: 1rem;
}

.modal.show {
	display: block;
}

.modal-dialog {
	position: relative;
	width: 100%;
	margin: 2rem auto;
}

.modal-sm {
	max-width: 24rem;
}

.modal-md,
.modal-dialog:not(.modal-sm, .modal-lg, .modal-xl) {
	max-width: 32rem;
}

.modal-lg {
	max-width: 48rem;
}

.modal-xl {
	max-width: 64rem;
}

.modal-content {
	border: 1px solid var(--border-subtle);
	border-radius: 0.5rem;
	background-color: var(--bg);
	box-shadow: var(--shadow);
}

.modal-header,
.modal-footer {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 0.75rem;
	padding: 1rem 1.25rem;
}

.modal-header {
	border-bottom: 1px solid var(--border-subtle);
}

.modal-footer {
	justify-content: flex-end;
	border-top: 1px solid var(--border-subtle);
}

.modal-title {
	font-size: 1.125rem;
	font-weight: 600;
	color: var(--fg);
}

.modal-body {
	padding: 1rem 1.25rem;
}

.popover {
	border: 1px solid var(--border-subtle);
	border-radius: var(--radius);
	background-color: var(--bg);
	color: var(--fg);
	box-shadow: var(--shadow);
}

.popover-header {
	border-bottom: 1px solid var(--border-subtle);
	font-weight: 600;
}

.popover-body {
	padding: 1rem;
}

.typeahead .list-group {
	position: absolute;
	top: 3em;
	border: 1px solid var(--border);
	background-color: var(--bg);
}

.list-group {
	overflow: hidden;
	border: 1px solid var(--border-subtle);
	border-radius: var(--radius);
	background-color: var(--bg);
	box-shadow: 0 1px 2px 0 rgb(15 23 42 / 0.05);
}

.list-group-item {
	display: block;
	border-bottom: 1px solid var(--border-subtle);
	padding: 0.5rem 0.75rem;
	cursor: pointer;
}

.list-group-item:last-child {
	border-bottom: 0;
}

.list-group-item:hover {
	background-color: var(--surface);
}

.table-responsive {
	width: 100%;
	overflow-x: auto;
}

.table {
	width: 100%;
	border-collapse: collapse;
	text-align: left;
	font-size: 0.875rem;
}

.table th,
.table td {
	border-bottom: 1px solid var(--border-subtle);
	padding: 0.5rem 0.75rem;
}

.table th {
	font-weight: 600;
	color: var(--muted);
}

.loading {
	position: relative;
}

.io-popover {
	position: relative;
}

.io-popover-container {
	position: absolute;
	z-index: 10;
	top: 3em;
	width: 300px;
	border: 1px solid var(--border-subtle);
	border-radius: var(--radius);
	background-color: var(--bg);
	padding: 0.5rem 1rem;
	box-shadow: var(--shadow);
}

.io-popover[data-placement="left"] .io-popover-container {
	right: 4em;
	top: 0;
}

.ioselect {
	position: relative;
	font-size: 1.25em;
}

.ioselect img {
	max-width: 64px;
}

.ioselect .selector {
	display: flex;
	min-height: 2em;
	min-width: 10em;
	flex-direction: column;
	justify-content: space-between;
	border: 1px solid var(--border);
	border-radius: var(--radius);
	background-color: var(--bg);
	padding: 0.5rem;
	cursor: pointer;
}

.ioselect .selector:after {
	display: inline-block;
	content: "▼";
	opacity: .5;
}

.ioselect .selector i {
	position: relative;
	top: 4px;
}

.ioselect .list-group span {
	font-weight: bold;
	font-size: 1.1em;
}

.ioselect .list-group p {
	padding-top: 0.5rem;
}

.ioselect .list-group {
	position: absolute;
	top: 2em;
	z-index: 10;
	max-height: 15em;
	overflow-y: auto;
}

.ioselect .list-group .list-group-item:hover,
.ioselect .list-group-item[data-selected="true"] {
	background-color: var(--primary-subtle);
}

.ioselect p {
	color: var(--muted);
}

.ioselect .list-group-item[data-selected="true"]:after {
	display: inline-block;
	content: "\2714";
	padding-left: 1em;
}

.iotable tbody td img {
	max-height: 32px;
}

.iorange .range_value {
	border: 1px solid var(--border-subtle);
	margin-left: 1em;
	padding: .8em;
	line-height: .5em;
	border-radius: var(--radius);
}

i.fa[data-active="true"] {
	color: var(--warning);
}

.icon-delta {
	font-size: 16px;
}

.icon-delta .label {
	font-size: 1.2em;
	font-weight: 100;
}

.icon-delta .detail {
	font-size: 2.5em;
	font-weight: 200;
	text-align: center;
}

.icon-delta hr {
	border: 4px solid var(--border-subtle);
}

.icon-delta[status='up'] i {
	color: var(--success);
}

.icon-delta[status='down'] i {
	color: var(--warning);
}

.slide-fade-enter-active {
	transition: all 0.3s ease-out;
}

.slide-fade-leave-active {
	transition: all 0.8s cubic-bezier(1, 0.5, 0.8, 1);
}

.slide-fade-enter-from,
.slide-fade-leave-to {
	transform: translateX(20px);
	opacity: 0;
}

.fade-enter-active,
.fade-leave-active {
	transition: opacity 0.3s ease;
}

.fade-enter-from,
.fade-leave-to {
	opacity: 0;
}

.slide-enter-active,
.slide-leave-active {
	transition: all 0.3s ease;
}

.slide-enter-from,
.slide-leave-to {
	transform: translateY(-20px);
	opacity: 0;
}

.scale-enter-active,
.scale-leave-active {
	transition: all 0.25s ease;
}

.scale-enter-from,
.scale-leave-to {
	transform: scale(0.9);
	opacity: 0;
}

.v-enter-active,
.v-leave-active {
	transition: opacity 0.5s ease;
}

.v-enter-from,
.v-leave-to {
	opacity: 0;
}

.io-modal {
	position: fixed;
	inset: 0;
	z-index: 50;
	display: block;
	overflow-y: auto;
	background-color: rgb(15 23 42 / 0.5);
	padding: 1rem;
}

.io-modal-dialog {
	position: relative;
	width: 100%;
	margin: 2rem auto;
}

.io-modal .modal-header {
	background-color: var(--primary-subtle);
	border-top-left-radius: var(--radius);
	border-top-right-radius: var(--radius);
}

.io-modal .modal-body {
	background-color: var(--surface);
}

.io-modal .modal-footer {

	border-bottom-left-radius: var(--radius);
	border-bottom-right-radius: var(--radius);
}

.io-modal-enter-active {
	transition: opacity 0.2s ease;
}

.io-modal-leave-active {
	transition: opacity 0.15s ease;
}

.io-modal-enter-from,
.io-modal-leave-to {
	opacity: 0;
}

.io-modal-enter-active .io-modal-dialog,
.io-modal-leave-active .io-modal-dialog {
	transition: transform 0.2s ease, opacity 0.2s ease;
}

.io-modal-enter-from .io-modal-dialog,
.io-modal-leave-to .io-modal-dialog {
	transform: translateY(-0.5rem) scale(0.98);
	opacity: 0;
}

.bookshelf details.bg {
	background-image:
		linear-gradient(rgba(0, 0, 0, .8), rgba(0, 0, 0, .8)),
		url('https://picsum.photos/1000/500');
	background-size: cover;
	background-position: center;
}

.bookshelf details[open] summary~* {
	animation: sweep .5s ease-in-out;
}

details summary {
	padding: 1em;
}

:root {
	interpolate-size: allow-keywords;
}

.bookshelf details::details-content {
	height: 0;
	opacity: 0;
	overflow: hidden;

	transition:
		height 0.3s ease-out allow-discrete,
		opacity 0.3s ease-out,
		content-visibility 0.3s ease-out allow-discrete;
}


.bookshelf details[open]::details-content {
	height: auto;
	opacity: 1;
}

@starting-style {
	.bookshelf details[open]::details-content {
		height: 0;
		opacity: 0;
	}
}


.bookshelf details.bg summary {
	padding: 1em;
	font-size: 1.2em;
}

.bookshelf details.bg .content {
	padding: 2em;
	min-height: 300px;
}
