* {
	box-sizing: border-box;
	margin: 0;
	padding: 0;
}

:root {
	--brand-accent: #159b72;
	--brand-accent-dark: #0b684d;
	--brand-ink: #17231f;
	--brand-muted: #63716c;
	--brand-bg: #f4f8f6;
	--brand-panel: #ffffff;
	--brand-border: #d9e4df;
	--brand-soft: #e9f3ef;
	--brand-warn: #b75a00;
	--brand-danger: #b3261e;
	--shadow-sm: 0 10px 24px rgba(26, 46, 39, .08);
	--shadow-md: 0 18px 44px rgba(26, 46, 39, .12);
}

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

body {
	background: var(--brand-bg);
	color: var(--brand-ink);
	font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
	font-size: 16px;
	line-height: 1.5;
}

a {
	color: var(--brand-accent-dark);
	text-decoration: none;
}

a:hover {
	text-decoration: underline;
}

#all {
	display: grid;
	grid-template-columns: 16rem minmax(0, 1fr);
	min-height: 100vh;
}

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

#skip a {
	position: fixed;
	left: -99999rem;
	z-index: 10000;
	padding: .7rem 1rem;
	background: #fff;
	color: var(--brand-accent-dark);
	border: 2px solid var(--brand-accent);
	border-radius: .5rem;
}

#skip a:hover,
#skip a:focus,
#skip a:active {
	left: 1rem;
	top: 1rem;
}

#nav {
	position: sticky;
	top: 0;
	height: 100vh;
	display: flex;
	flex-direction: column;
	gap: 1.5rem;
	padding: 1.2rem;
	background: #ffffff;
	border-right: 1px solid var(--brand-border);
	box-shadow: 8px 0 30px rgba(23, 35, 31, .04);
}

#nav h1 {
	font-size: 1.15rem;
	line-height: 1.2;
}

#nav h1 a {
	display: flex;
	align-items: center;
	gap: .75rem;
	color: var(--brand-ink);
	text-decoration: none;
}

#nav h1 img {
	width: 2.8rem;
	height: 2.8rem;
	border-radius: .8rem;
	box-shadow: var(--shadow-sm);
}

#nav ul {
	display: flex;
	flex-direction: column;
	gap: .35rem;
	list-style: none;
}

#nav ul a {
	display: flex;
	align-items: center;
	gap: .7rem;
	min-height: 2.8rem;
	padding: .65rem .8rem;
	color: var(--brand-muted);
	border-radius: .7rem;
	font-weight: 650;
	text-decoration: none;
	transition: background .16s ease, color .16s ease, transform .16s ease;
}

#nav ul a svg,
#nav ul a img {
	width: 1.45rem;
	height: 1.45rem;
	flex: 0 0 auto;
	border-radius: 50%;
}

#nav ul .current a,
#nav ul a:hover {
	background: var(--brand-soft);
	color: var(--brand-accent-dark);
	transform: translateX(.1rem);
}

#nav ul .current a {
	box-shadow: inset 3px 0 0 var(--brand-accent);
}

#nav footer {
	margin-top: auto;
	padding-top: 1rem;
	color: var(--brand-muted);
	font-size: .85rem;
	border-top: 1px solid var(--brand-border);
}

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

main {
	width: min(100%, 72rem);
	margin: 0 auto;
	padding: 2rem;
}

main:has(iframe) {
	width: 100%;
	max-width: none;
	height: 100vh;
	padding: 0;
}

main iframe {
	display: block;
	width: 100%;
	height: 100%;
	background: #fff;
	border: none;
}

.page-title,
.login-intro {
	margin-bottom: 1.25rem;
}

.page-title {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
}

.page-title h2,
.login-intro h2 {
	font-size: clamp(1.7rem, 3vw, 2.35rem);
	line-height: 1.12;
	letter-spacing: 0;
}

.page-title p,
.login-intro p,
.help {
	color: var(--brand-muted);
}

.account-title img,
.login-intro img {
	width: 4rem;
	height: 4rem;
	border-radius: 1rem;
	box-shadow: var(--shadow-sm);
}

.login-intro {
	text-align: center;
}

.login-intro img {
	margin-bottom: .8rem;
}

.panel,
fieldset {
	margin: 0 0 1.25rem;
	padding: 1.25rem;
	background: var(--brand-panel);
	border: 1px solid var(--brand-border);
	border-radius: .9rem;
	box-shadow: var(--shadow-sm);
}

.panel h3,
fieldset legend {
	margin-bottom: .8rem;
	font-size: 1.2rem;
	font-weight: 750;
}

.panel h4 {
	margin: 1.25rem 0 .65rem;
	font-size: 1rem;
}

fieldset {
	border: 1px solid var(--brand-border);
}

legend {
	padding: 0 .5rem;
}

.admin-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 1rem;
}

dl dt {
	margin: .9rem 0 .25rem;
	font-weight: 750;
}

dl dd {
	margin: .3rem 0;
}

.details-list dd + dt {
	margin-top: 1rem;
}

tt,
code {
	display: inline-block;
	max-width: 100%;
	padding: .1rem .35rem;
	overflow-wrap: anywhere;
	background: #edf4f1;
	border-radius: .35rem;
	color: #18382e;
	font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
	font-size: .92em;
}

input[type=text],
input[type=password],
input[type=number],
select,
textarea {
	width: min(100%, 34rem);
	min-height: 2.5rem;
	padding: .55rem .7rem;
	color: var(--brand-ink);
	background: #fff;
	border: 1px solid #b8c9c2;
	border-radius: .55rem;
	font: inherit;
}

select {
	width: auto;
}

input[type=checkbox] {
	width: 1.05rem;
	height: 1.05rem;
	vertical-align: middle;
	accent-color: var(--brand-accent);
}

input[type=submit],
.btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 2.5rem;
	padding: .55rem .9rem;
	color: #fff;
	background: var(--brand-accent);
	border: none;
	border-radius: .55rem;
	cursor: pointer;
	font: inherit;
	font-weight: 750;
	text-decoration: none;
	box-shadow: 0 8px 18px rgba(21, 155, 114, .22);
}

input[type=submit]:hover,
.btn:hover {
	background: var(--brand-accent-dark);
	text-decoration: none;
}

.btn.sm {
	min-height: 2rem;
	padding: .35rem .6rem;
	font-size: .9rem;
}

.btn.danger,
input.danger {
	background: var(--brand-danger);
	box-shadow: none;
}

input:focus,
select:focus,
textarea:focus,
a:focus-visible,
button:focus-visible {
	outline: 3px solid rgba(183, 90, 0, .35);
	outline-offset: 2px;
}

table {
	width: 100%;
	margin: 1rem 0;
	overflow: hidden;
	border-collapse: separate;
	border-spacing: 0;
	background: #fff;
	border: 1px solid var(--brand-border);
	border-radius: .75rem;
}

table th,
table td {
	padding: .75rem;
	text-align: left;
	border-bottom: 1px solid var(--brand-border);
}

table tr:last-child th,
table tr:last-child td {
	border-bottom: none;
}

table thead {
	background: #f0f6f3;
	color: #33443e;
	font-size: .9rem;
}

table tbody tr:nth-child(even) {
	background: #fbfdfc;
}

.selected-row {
	background: #e8f5ef !important;
}

table img {
	width: 2rem;
	height: 2rem;
	border-radius: 50%;
	vertical-align: middle;
}

progress[value] {
	appearance: none;
	width: min(100%, 24rem);
	height: .8rem;
	overflow: hidden;
	background: #dfe8e4;
	border: none;
	border-radius: 999px;
}

progress[value]::-webkit-progress-bar {
	background: #dfe8e4;
	border-radius: 999px;
}

progress[value]::-webkit-progress-value {
	background: linear-gradient(90deg, var(--brand-accent), #2e8ad1);
	border-radius: 999px;
}

p.info,
p.error {
	margin: 1rem 0;
	padding: .8rem 1rem;
	border-radius: .65rem;
}

p.info {
	background: #e8f5ef;
	color: #153b2f;
}

p.error {
	background: #fde7e4;
	color: #7c1d16;
	border: 1px solid #f2b8b5;
}

p.actions,
.form-row,
.inline-form,
.member-form .form-row {
	display: flex;
	align-items: end;
	gap: .7rem;
	flex-wrap: wrap;
}

.form-row label {
	display: flex;
	flex-direction: column;
	gap: .25rem;
	font-weight: 700;
}

.inline-form {
	display: inline-flex;
	align-items: center;
}

.member-form {
	margin-top: 1rem;
	padding-top: 1rem;
	border-top: 1px solid var(--brand-border);
}

.submit {
	margin-top: .9rem;
}

@media screen and (max-width: 900px) {
	#all {
		display: flex;
		min-height: 100vh;
		flex-direction: column-reverse;
	}

	#nav {
		position: sticky;
		bottom: 0;
		z-index: 20;
		width: 100%;
		height: auto;
		padding: .45rem;
		border-top: 1px solid var(--brand-border);
		border-right: none;
		box-shadow: 0 -8px 24px rgba(23, 35, 31, .08);
	}

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

	#nav nav,
	#nav ul {
		width: 100%;
	}

	#nav ul {
		flex-direction: row;
		justify-content: space-around;
		gap: .15rem;
	}

	#nav ul li {
		flex: 1 1 0;
	}

	#nav ul a {
		min-height: 3rem;
		flex-direction: column;
		gap: .15rem;
		padding: .35rem .2rem;
		font-size: .72rem;
		border-radius: .65rem;
	}

	#nav ul .current a,
	#nav ul a:hover {
		transform: none;
		box-shadow: inset 0 3px 0 var(--brand-accent);
	}

	main {
		width: 100%;
		padding: 1rem;
	}

	main:has(iframe) {
		height: calc(100vh - 4rem);
	}

	.admin-grid {
		grid-template-columns: 1fr;
	}

	.page-title {
		align-items: flex-start;
	}

	table {
		display: block;
		overflow-x: auto;
		white-space: nowrap;
	}
}

@media (prefers-reduced-motion: reduce) {
	* {
		scroll-behavior: auto !important;
		transition: none !important;
	}
}

@view-transition {
	navigation: auto;
}
