:root {
	--bg: #f6f7fb;
	--surface: #ffffff;
	--surface-muted: #f9fafb;
	--border: #e5e7eb;
	--text: #111827;
	--text-muted: #6b7280;
	--primary: #2563eb;
	--primary-contrast: #ffffff;
	--danger: #b91c1c;
	--danger-bg: #fee2e2;
	--shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
	--shadow-soft: 0 8px 18px rgba(15, 23, 42, 0.06);
}

body {
	background: var(--bg);
	color: var(--text);
	transition: background 0.25s ease, color 0.25s ease;
}

body.dark {
	--bg: #0f172a;
	--surface: #111827;
	--surface-muted: #1f2937;
	--border: #273244;
	--text: #e5e7eb;
	--text-muted: #9ca3af;
	--primary: #60a5fa;
	--primary-contrast: #0b1120;
	--danger: #f87171;
	--danger-bg: #3f1d1d;
	--shadow: 0 10px 24px rgba(0, 0, 0, 0.35);
	--shadow-soft: 0 8px 18px rgba(0, 0, 0, 0.25);
}

header {
	background: var(--surface);
	border-bottom: 1px solid var(--border);
	transition: background 0.25s ease, border-color 0.25s ease;
}

.theme-toggle {
	border: 1px solid var(--primary);
	background: var(--surface);
	color: var(--primary);
	padding: 8px 12px;
	border-radius: 10px;
	font-weight: 600;
	cursor: pointer;
	transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.theme-toggle:hover {
	transform: translateY(-1px);
	box-shadow: var(--shadow-soft);
}

.action-row {
	display: flex;
	gap: 10px;
	margin-top: 12px;
	flex-wrap: wrap;
}

.action-link {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 8px 14px;
	border-radius: 999px;
	border: 1px solid var(--border);
	color: var(--text);
	text-decoration: none;
	background: var(--surface);
	font-weight: 600;
	font-size: 13px;
	box-shadow: var(--shadow-soft);
	transition: transform 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.action-link:hover {
	transform: translateY(-1px);
	border-color: var(--primary);
	color: var(--primary);
}

.catalog-modal {
	position: fixed;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	z-index: 1200;
}

.catalog-modal.hidden {
	display: none;
}

.catalog-modal-backdrop {
	position: absolute;
	inset: 0;
	background: rgba(15, 23, 42, 0.55);
	backdrop-filter: blur(3px);
}

.catalog-modal-card {
	position: relative;
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: 14px;
	box-shadow: var(--shadow);
	padding: 18px;
	width: min(420px, 90vw);
	display: flex;
	flex-direction: column;
	gap: 10px;
	animation: modalPop 0.25s ease;
}

.catalog-modal-card h3 {
	margin: 0;
	font-size: 18px;
}

.catalog-modal-help {
	margin: 0;
	color: var(--text-muted);
	font-size: 13px;
}

.catalog-modal-actions {
	display: flex;
	gap: 10px;
	justify-content: flex-end;
	flex-wrap: wrap;
}

@keyframes modalPop {
	from { opacity: 0; transform: translateY(6px) scale(0.98); }
	to { opacity: 1; transform: translateY(0) scale(1); }
}
