/* Store-Admin: gleiche Farben wie der Jukebox-Admin (frontend/src/routes/layout.css), ohne Build-Schritt */
:root {
	--paper: #f5f2e6;
	--surface: #fffdf6;
	--sunken: #ece7d5;
	--line: #ddd6bf;
	--ink: #1b2a2b;
	--muted: #5d706d;
	--primary: #264549;
	--on-primary: #efecda;
	--danger: #c94a3b;
	--music: #f6c445;
	--audiobook: #f39a4c;
	--video: #5ab4ec;
	--shadow: 0 1px 2px rgb(38 69 73 / 0.06), 0 6px 20px -8px rgb(38 69 73 / 0.18);
	color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
	:root {
		--paper: #0e1514;
		--surface: #16211f;
		--sunken: #0b100f;
		--line: #283a37;
		--ink: #efecda;
		--muted: #98b2ab;
		--primary: #8cbeb2;
		--on-primary: #0a0906;
		--danger: #ef6a5a;
		--shadow: 0 1px 2px rgb(0 0 0 / 0.3), 0 8px 24px -10px rgb(0 0 0 / 0.6);
	}
}

* {
	box-sizing: border-box;
}
body {
	margin: 0;
	background: var(--paper);
	color: var(--ink);
	font: 15px/1.5 ui-rounded, 'Nunito', system-ui, sans-serif;
}
a {
	color: inherit;
}
.shell {
	display: grid;
	grid-template-columns: 14rem 1fr;
	min-height: 100vh;
}
nav.side {
	padding: 1.25rem 0.75rem;
	border-right: 1px solid var(--line);
}
nav.side .brand {
	font-weight: 800;
	font-size: 1.15rem;
	padding: 0 0.75rem 1rem;
}
nav.side a {
	display: block;
	padding: 0.55rem 0.75rem;
	border-radius: 0.75rem;
	text-decoration: none;
	font-weight: 700;
	color: var(--muted);
}
nav.side a.active,
nav.side a:hover {
	background: var(--sunken);
	color: var(--ink);
}
nav.side form {
	margin-top: 1.5rem;
	padding: 0 0.75rem;
}
main {
	padding: 1.75rem 2rem 4rem;
	max-width: 72rem;
	min-width: 0;
}
h1 {
	font-size: 1.9rem;
	font-weight: 800;
	margin: 0 0 1.25rem;
}
h2 {
	font-size: 1.1rem;
	font-weight: 800;
	margin: 0 0 0.75rem;
}
.panel {
	background: var(--surface);
	box-shadow: var(--shadow);
	outline: 1px solid var(--line);
	border-radius: 1.25rem;
	padding: 1.25rem;
	margin-bottom: 1.25rem;
}
.row {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	align-items: end;
}
.grow {
	flex: 1;
	min-width: 10rem;
}
label.label {
	display: block;
	font-size: 0.8rem;
	font-weight: 700;
	color: var(--muted);
	margin-bottom: 0.25rem;
}
input[type='text'],
input[type='password'],
input[type='email'],
input[type='number'],
input[type='date'],
input[type='search'],
select,
textarea {
	width: 100%;
	font: inherit;
	color: var(--ink);
	background: var(--sunken);
	border: 0;
	border-radius: 0.75rem;
	padding: 0.55rem 0.8rem;
}
input:focus,
select:focus,
textarea:focus {
	outline: 2px solid var(--primary);
}
.btn {
	display: inline-flex;
	align-items: center;
	gap: 0.4rem;
	font: inherit;
	font-weight: 700;
	border: 0;
	border-radius: 999px;
	padding: 0.5rem 1rem;
	background: var(--sunken);
	color: var(--ink);
	cursor: pointer;
	text-decoration: none;
	white-space: nowrap;
}
.btn:hover {
	filter: brightness(0.96);
}
.btn-primary {
	background: var(--primary);
	color: var(--on-primary);
}
.btn-danger {
	background: color-mix(in srgb, var(--danger) 14%, transparent);
	color: var(--danger);
}
.btn-small {
	padding: 0.3rem 0.7rem;
	font-size: 0.85rem;
}
.muted {
	color: var(--muted);
}
.small {
	font-size: 0.85rem;
}
.notice {
	border-radius: 0.9rem;
	padding: 0.6rem 0.9rem;
	margin-bottom: 1rem;
	background: var(--sunken);
	font-weight: 600;
}
.notice.error {
	background: color-mix(in srgb, var(--danger) 14%, transparent);
	color: var(--danger);
}
.code {
	font: 800 2rem/1.2 ui-monospace, monospace;
	letter-spacing: 0.08em;
}
table {
	width: 100%;
	border-collapse: collapse;
	font-size: 0.9rem;
}
th {
	text-align: left;
	font-size: 0.78rem;
	color: var(--muted);
	font-weight: 700;
	padding: 0.4rem 0.5rem;
	border-bottom: 1px solid var(--line);
}
td {
	padding: 0.45rem 0.5rem;
	border-bottom: 1px solid var(--line);
	vertical-align: middle;
}
tr:last-child td {
	border-bottom: 0;
}
.table-wrap {
	overflow-x: auto;
}
.grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(10rem, 1fr));
	gap: 1rem;
}
.tile {
	position: relative;
	text-decoration: none;
	display: block;
}
.tile img,
.tile .nocover {
	width: 100%;
	aspect-ratio: 1;
	border-radius: 1rem;
	object-fit: cover;
	background: var(--sunken);
	display: block;
}
.tile .title {
	font-weight: 800;
	margin-top: 0.4rem;
	line-height: 1.25;
}
.tile input[type='checkbox'] {
	position: absolute;
	top: 0.5rem;
	left: 0.5rem;
	width: 1.2rem;
	height: 1.2rem;
}
.chip {
	display: inline-block;
	border-radius: 999px;
	padding: 0.05rem 0.55rem;
	font-size: 0.75rem;
	font-weight: 800;
	background: var(--sunken);
	color: var(--ink);
}
.chip.music {
	background: var(--music);
	color: #1b1b1b;
}
.chip.audiobook {
	background: var(--audiobook);
	color: #1b1b1b;
}
.chip.video {
	background: var(--video);
	color: #1b1b1b;
}
.chip.off {
	background: color-mix(in srgb, var(--danger) 18%, transparent);
	color: var(--danger);
}
.stats {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
	gap: 1.25rem;
}
.login {
	max-width: 24rem;
	margin: 12vh auto;
}
.pager {
	display: flex;
	gap: 0.5rem;
	justify-content: end;
	margin-top: 0.75rem;
}
dl.facts {
	display: grid;
	grid-template-columns: auto 1fr;
	gap: 0.3rem 1.5rem;
	margin: 0;
}
dl.facts dt {
	color: var(--muted);
}
dl.facts dd {
	margin: 0;
}
@media (max-width: 760px) {
	.shell {
		grid-template-columns: 1fr;
	}
	nav.side {
		border-right: 0;
		border-bottom: 1px solid var(--line);
		display: flex;
		flex-wrap: wrap;
		gap: 0.25rem;
		padding: 0.75rem;
	}
	nav.side .brand {
		width: 100%;
		padding-bottom: 0.25rem;
	}
	nav.side form {
		margin: 0;
	}
	main {
		padding: 1.25rem 1rem 3rem;
	}
}
