/* Minimalist black & white theme, follows the system light/dark setting */
:root {
	color-scheme: light dark;
	--bg: #fff;
	--fg: #111;
	--muted: #6b6b6b;
	--line: #e0e0e0;
	--soft: #f6f6f6;
	--danger: #b00020;
	--logo-filter: grayscale(1);
}

@media (prefers-color-scheme: dark) {
	:root {
		--bg: #0b0b0b;
		--fg: #f0f0f0;
		--muted: #9a9a9a;
		--line: #2c2c2c;
		--soft: #151515;
		--danger: #ff7b7b;
		--logo-filter: grayscale(1) brightness(1.4);
	}
}

* {
	margin: 0;
	padding: 0;
}

html, body, #all {
	height: 100%;
}

body {
	background: var(--bg);
	color: var(--fg);
	font-size: 13px;
	font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}

#all {
	display: flex;
	flex-direction: row;
	align-items: stretch;
	justify-content: stretch;
}

#skip {
	width: 0;
	height: 0;
	margin: 0;
	padding: 0;
}

#skip a {
	position: fixed;
	left: -99999rem;
	z-index: 10000;
	padding: .5em;
	background: var(--bg);
	color: var(--fg);
}

#skip a:hover, #skip a:focus, #skip a:active {
	left: 0;
}

#nav {
	width: 12rem;
	display: flex;
	flex-direction: column;
	justify-content: flex-start;
	background: var(--soft);
	border-right: 1px solid var(--line);
}

#nav h1 {
	display: none;
}

#nav nav {
	padding-top: .8em;
}

#nav h1 img {
	width: 70%;
	filter: var(--logo-filter);
}

#nav ul {
	list-style-type: none;
}

#nav ul li {
	position: relative;
	margin: .2em 0;
}

#nav ul a {
	display: block;
	padding: .5em;
	padding-left: .2em;
	text-decoration: none;
	color: var(--fg);
	font-size: 1em;
	padding-left: .8em;
	background: no-repeat .3em center;
	transition: all .2s;
}

#nav ul a svg, #nav ul a img {
	display: none;
}

#nav ul .current a, #nav ul a:hover {
	background-color: var(--fg);
	color: var(--bg);
	border-radius: 0 .5em .5em 0;
	margin-right: .8em;
}

#nav footer {
	color: var(--muted);
	text-align: center;
	padding: 1em;
	font-size: .9em;
	margin-top: auto;
}

#nav footer a {
	color: var(--muted);
	display: block;
}

#nav footer a::before {
	content: "";
	background: url("logo.svg") no-repeat center center;
	filter: var(--logo-filter);
	background-size: contain;
	width: 28px;
	height: 28px;
	display: none;
}


a {
	color: var(--fg);
	text-decoration-color: var(--muted);
	text-underline-offset: .15em;
}

input[type=text], input[type=password], input[type=number] {
	border: 1px solid var(--muted);
	background: var(--bg);
	color: var(--fg);
	padding: .5em;
	border-radius: .5em;
	font-size: 1em;
	max-width: 50vw;
}

input[size] {
	min-width: 0;
}

input[type=submit], .btn {
	border: none;
	cursor: pointer;
	padding: .5em;
	border-radius: .5em;
	background: var(--fg);
	color: var(--bg);
	font-size: 1em;
	text-decoration: none;
	display: inline-block;
	margin: .5em 0;
}

input:focus {
	border-color: var(--fg);
	outline: 2px solid var(--fg);
	outline-offset: 1px;
}

input[type=submit]:hover, .btn:hover {
	opacity: .8;
}

input[type=submit]:focus-visible, .btn:focus-visible {
	outline: 2px solid var(--fg);
	outline-offset: 2px;
}

h2.myfiles {
	float: right;
}

h2 .btn {
	margin: 0;
	font-size: 1em;
}

main {
	background: var(--bg);
	border-radius: 0;
	padding: 2rem;
	margin: 1rem;
	margin-left: 2rem;
	width: auto;
	flex-grow: 1;
	max-width: 50em;
}

main iframe {
	width: 100%;
	height: 100%;
	background: transparent;
	border: none;
	overflow: hidden;
}

main:has(iframe) {
	padding: 0;
	margin-left: .2rem;
	overflow: hidden;
	background: none;
	max-width: unset;
}

fieldset {
	text-align: center;
	border: 1px solid var(--line);
	border-radius: .6em;
	padding: 2em;
}

legend {
	font-size: 1.1em;
	padding: 0 1em;
}

dl dt {
	font-weight: bold;
	margin: .8em 0;
	margin-top: 2em;
}

dl dd {
	margin: .8em 0;
}

dd.help {
	color: var(--muted);
	font-size: .9em;
}

progress[value] {
	appearance: none;
	border: none;
	width: 70%;
	height: 10px;
	background-color: var(--line);
	border-radius: 5px;
	position: relative;
	max-width: 20em;
	overflow: hidden;
}

progress[value]::-webkit-progress-bar {
	background-color: var(--line);
	border-radius: 5px;
}

progress[value]::-webkit-progress-value {
	background: var(--fg);
	border-radius: 5px;
}

progress[value]::-moz-progress-bar {
	background: var(--fg);
}

.btn.sm {
	padding: .3em .5em;
	font-size: 1em;
}

table {
	width: 100%;
	border-collapse: collapse;
	margin: 1em 0;
	border: 1px solid var(--line);
	border-radius: .5em;
	overflow: hidden;
	background: var(--bg);
}

table tbody tr:nth-child(even) {
	background: var(--soft);
}

table th, table td {
	text-align: center;
	padding: .5em;
}

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

table progress[value] {
	height: 10px;
}

p.info {
	margin: 1em 0;
	padding: .5em;
	background: var(--soft);
	border: 1px solid var(--fg);
	border-radius: .5em;
	font-size: 1em;
}


p.error {
	margin: 1em 0;
	padding: .5em;
	background: var(--bg);
	border: 1px solid var(--danger);
	color: var(--danger);
	border-radius: .5em;
	font-size: 1em;
}

p.info tt {
	background: var(--fg);
	color: var(--bg);
	padding: .2em;
}

h3 img, main h2 img {
	display: none;
}

p.actions {
	display: flex;
	justify-content: space-between;
}

@media screen and (max-width: 900px) {
	#all {
		display: block;
		display: flex;
		flex-direction: column-reverse;
		justify-content: flex-end;
	}

	#nav {
		width: auto;
		display: flex;
		flex-direction: row;
		justify-content: flex-start;
		background: var(--soft);
		border-right: 0;
		border-top: 1px solid var(--line);
		margin-top: auto;
	}

	#nav footer, #nav h1 {
		display: none;
	}

	#nav nav {
		width: 100%;
		margin: 0 .3em;
	}

	#nav ul {
		display: flex;
		flex-direction: row-reverse;
		width: 100%;
		justify-content: stretch;
	}

	#nav ul li {
		margin: 0;
		flex-grow: 1;
	}

	#nav ul a {
		display: flex;
		flex-direction: column;
		justify-content: center;
		align-items: center;
		padding: .5em;
	}

	#nav ul a img, #nav ul a svg {
		margin: 0;
	}

	#nav ul a span {
		font-size: .85em;
	}

	#nav ul .current a, #nav ul a:hover {
		border-radius: .5em .5em 0 0;
		margin: 0;
		margin-top: -.3em;
		padding-top: .8em;
	}

	main {
		margin: 0;
		padding: .5em;
		border-radius: 0;
		background: none;
		overflow: auto;
	}
}


form.inline { display: inline; }
form.inline label { margin-right: .5em; }

select {
	border: 1px solid var(--muted);
	background: var(--bg);
	color: var(--fg);
	padding: .4em;
	border-radius: .5em;
	font-size: 1em;
	max-width: 50vw;
}

h2 { margin: 1.2em 0 .4em; font-size: 1.15em; }

/* View transitions between page loads */
@view-transition {
	navigation: auto;
}