/* ----- Tokens (Default-Theme wird per CSS-Var in base.html ueberschrieben) ----- */
:root {
	--bg: #4A1C75;
	--fg: #FFFFFF;
	--muted: #C7B5E0;
	--accent-1: #5BB1E0;
	--accent-2: #4CB374;
	--accent-3: #F4CC50;
	--accent-4: #E27C56;
	--font: Ubuntu, "Ubuntu Sans", -apple-system, "Segoe UI", system-ui, sans-serif;
	--font-display: Ubuntu, "Ubuntu Sans", -apple-system, "Segoe UI", system-ui, sans-serif;
	--radius: 10px;
}

@font-face {
	font-family: 'Ubuntu';
	font-style: normal;
	font-weight: 400;
	font-display: swap;
	src: url('/static/fonts/Ubuntu-Regular.woff2') format('woff2');
}
@font-face {
	font-family: 'Ubuntu';
	font-style: normal;
	font-weight: 700;
	font-display: swap;
	src: url('/static/fonts/Ubuntu-Bold.woff2') format('woff2');
}
@font-face {
	font-family: 'Ubuntu';
	font-style: italic;
	font-weight: 400;
	font-display: swap;
	src: url('/static/fonts/Ubuntu-Italic.woff2') format('woff2');
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
	font-family: var(--font);
	background: var(--bg);
	color: var(--fg);
	line-height: 1.4;
	-webkit-font-smoothing: antialiased;
	text-rendering: optimizeLegibility;
}

a { color: inherit; }

/* ====================== SIGNAGE (public page) ====================== */

body.signage {
	min-height: 100vh;
	overflow: hidden;
}

.signage-shell {
	position: relative;
	width: 100vw;
	min-height: 100vh;
	padding: clamp(2rem, 4vw, 4rem) clamp(2rem, 5vw, 6rem);
}

.signage-logo {
	position: absolute;
	top: clamp(2rem, 4vw, 4rem);
	right: clamp(2rem, 5vw, 6rem);
	max-width: clamp(120px, 14vw, 220px);
	max-height: clamp(80px, 10vw, 130px);
	object-fit: contain;
	z-index: 5;
}
.signage-logo-text {
	color: var(--fg);
	font-weight: 700;
	font-size: clamp(1rem, 1.3vw, 1.4rem);
	opacity: 0.85;
	text-align: right;
	white-space: nowrap;
}

.slides {
	position: relative;
	width: 100%;
	min-height: calc(100vh - clamp(2rem, 4vw, 4rem) * 2);
}
.slide {
	position: absolute;
	inset: 0;
	opacity: 0;
	transition: opacity 0.7s ease;
	pointer-events: none;
	overflow: hidden;
}
.slide.active { opacity: 1; pointer-events: auto; }

.signage-dots {
	position: absolute;
	bottom: 1.2rem;
	left: 50%;
	transform: translateX(-50%);
	display: flex;
	gap: 0.6rem;
	z-index: 5;
}
.signage-dots span {
	width: 0.55rem;
	height: 0.55rem;
	border-radius: 50%;
	background: var(--fg);
	opacity: 0.35;
	transition: opacity 0.3s, transform 0.3s;
}
.signage-dots span.active {
	opacity: 1;
	transform: scale(1.4);
}

/* ============= shared display typography ============= */

.big-title {
	font-family: var(--font-display);
	font-weight: 700;
	font-size: clamp(2.8rem, 6vw, 6rem);
	line-height: 1.0;
	letter-spacing: -0.02em;
	margin: 0 0 clamp(1.5rem, 3vw, 3rem);
	text-transform: uppercase;
}

/* ============= AGENDA slide ============= */

.slide-agenda {
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto;
	gap: clamp(1rem, 3vw, 3rem);
	height: 100%;
	align-items: start;
	padding-top: 1vh;
}
.agenda-main { min-width: 0; }
.agenda-list {
	list-style: none;
	padding: 0;
	margin: 0;
	display: flex;
	flex-direction: column;
	gap: clamp(0.6rem, 1.4vw, 1.4rem);
}
.agenda-row {
	display: flex;
	align-items: baseline;
	gap: clamp(0.5rem, 1vw, 1rem);
	font-size: clamp(1.4rem, 2.6vw, 2.6rem);
	font-weight: 700;
	line-height: 1.1;
}
.agenda-time { color: var(--fg); white-space: nowrap; }
.agenda-sep { color: var(--fg); opacity: 0.5; }
.agenda-label { color: var(--fg); }
.agenda-row.accent-1 .agenda-label { color: var(--accent-1); }
.agenda-row.accent-2 .agenda-label { color: var(--accent-2); }
.agenda-row.accent-3 .agenda-label { color: var(--accent-3); }
.agenda-row.accent-4 .agenda-label { color: var(--accent-4); }

.agenda-qr {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 0.75rem;
	padding: 1rem 0;
	min-width: clamp(140px, 18vw, 280px);
}
.qr-label {
	font-size: clamp(1.1rem, 1.8vw, 1.8rem);
	font-weight: 700;
}
.qr-svg {
	width: clamp(140px, 18vw, 280px);
	height: clamp(140px, 18vw, 280px);
	color: var(--fg);
}
.qr-svg svg {
	width: 100%;
	height: 100%;
	display: block;
}
.qr-svg svg path { stroke: currentColor; fill: none; }
.qr-caption {
	font-size: clamp(0.85rem, 1.1vw, 1.1rem);
	opacity: 0.85;
}

/* ============= WAYFINDER slide ============= */

.slide-wayfinder { height: 100%; display: flex; flex-direction: column; }
.wf-grid {
	flex: 1 1 auto;
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	grid-template-rows: repeat(3, 1fr);
	gap: clamp(1rem, 2vw, 2.5rem);
	padding-bottom: 2rem;
}
.wf-slot {
	display: flex;
	align-items: center;
	justify-content: center;
}
.wf-cell {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 0.5rem;
	color: var(--fg);
}
.wf-arrow {
	width: clamp(80px, 11vw, 200px);
	height: clamp(80px, 11vw, 200px);
	display: block;
	transition: transform 0.3s ease;
	transform-origin: 50% 50%;
}
.wf-icon {
	width: clamp(60px, 8vw, 140px);
	height: auto;
	object-fit: contain;
}
.wf-label {
	font-size: clamp(1.3rem, 2.4vw, 2.6rem);
	font-weight: 700;
	margin-top: 0.5rem;
	color: var(--fg);
}
.wf-label.wf-highlight { color: var(--accent-3); }

/* ============= MARKDOWN / HTML slides ============= */

.slide-md, .slide-html {
	height: 100%;
	overflow-y: auto;
	padding-right: 1rem;
}
.slide-md h1, .slide-html h1 {
	font-size: clamp(2.8rem, 5vw, 5rem);
	margin: 0 0 1rem;
	letter-spacing: -0.02em;
	font-weight: 700;
}
.slide-md h2, .slide-html h2 {
	font-size: clamp(2rem, 3.4vw, 3.4rem);
	margin: 1.5rem 0 0.8rem;
	font-weight: 700;
}
.slide-md h3, .slide-html h3 { font-size: clamp(1.4rem, 2.4vw, 2.4rem); margin: 1rem 0 0.5rem; }
.slide-md p, .slide-html p {
	font-size: clamp(1.1rem, 1.7vw, 1.9rem);
	line-height: 1.5;
	margin: 0.4rem 0 1rem;
}
.slide-md ul, .slide-md ol, .slide-html ul, .slide-html ol {
	font-size: clamp(1.1rem, 1.7vw, 1.9rem);
	padding-left: 1.5em;
}
.slide-md li, .slide-html li { padding: 0.2rem 0; }
.slide-md em, .slide-html em { color: var(--muted); font-style: italic; }
.slide-md strong, .slide-html strong { font-weight: 700; }
.slide-md code, .slide-html code {
	background: rgba(255,255,255,0.12);
	border-radius: 4px;
	padding: 0.05em 0.4em;
	font-size: 0.92em;
}

/* ============= CARD slide ============= */

.slide-card {
	display: grid;
	grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
	gap: clamp(2rem, 4vw, 4rem);
	height: 100%;
	align-items: center;
}
@media (max-width: 800px) { .slide-card { grid-template-columns: 1fr; } }
.card-media {
	display: flex;
	justify-content: center;
	align-items: center;
	max-height: 80vh;
}
.card-media img {
	max-width: 100%;
	max-height: 70vh;
	border-radius: var(--radius);
	object-fit: cover;
}
.card-placeholder {
	width: 100%;
	aspect-ratio: 4/3;
	background: rgba(255,255,255,0.06);
	border-radius: var(--radius);
}
.card-body h1 {
	font-size: clamp(2rem, 4vw, 4rem);
	margin: 0 0 1rem;
	font-weight: 700;
	letter-spacing: -0.02em;
}
.card-body p { font-size: clamp(1rem, 1.4vw, 1.5rem); line-height: 1.55; margin: 0.5rem 0; }
.card-byline { color: var(--muted); font-style: italic; margin-top: 1.5rem; }

/* ============= EMPTY-state ============= */
.slide-empty { display: grid; place-items: center; text-align: center; }

/* ====================== ADMIN ====================== */

body.admin {
	background: #0c0f14;
	color: #e6edf3;
	font-family: -apple-system, "Segoe UI", system-ui, sans-serif;
	line-height: 1.5;
	overflow: visible;
}
.admin-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 1rem;
	padding: 1.4rem 2rem;
	border-bottom: 1px solid #232a35;
	background: linear-gradient(135deg, var(--bg) 0%, #1a0e2c 100%);
	color: #fff;
}
.admin-header h1 { margin: 0; font-size: 1.4rem; font-weight: 700; }
.admin-header .muted { color: rgba(255,255,255,0.7); margin: 0.25rem 0 0; }
.admin-main { max-width: 76rem; margin: 0 auto; padding: 1.5rem 1.5rem 6rem; }
.section-h { margin: 2rem 0 0.5rem; font-size: 1.2rem; font-weight: 700; letter-spacing: -0.01em; }

.card {
	background: #151b23;
	border: 1px solid #232a35;
	border-radius: 12px;
	padding: 1.25rem 1.5rem;
	margin: 1rem 0;
}
.card summary { cursor: pointer; padding: 0.25rem 0; font-size: 1rem; user-select: none; }
.card[open] summary { margin-bottom: 1rem; }
.card hr { border: 0; border-top: 1px solid #232a35; margin: 1.5rem 0; }
.card label { display: block; margin: 0.5rem 0; font-size: 0.92rem; }
.card label > input, .card label > select, .card label > textarea {
	margin-top: 0.3rem;
}

input, select, textarea, button {
	font: inherit;
}
input[type=text], input[type=number], input[type=color], select, textarea {
	width: 100%;
	background: #0b0f14;
	color: #e6edf3;
	border: 1px solid #2a313a;
	border-radius: 6px;
	padding: 0.55rem 0.75rem;
}
input:not([type=color]) { line-height: 1.4; }
input[type=color] {
	height: 2.5rem;
	padding: 0.2rem;
	cursor: pointer;
}
textarea {
	font-family: ui-monospace, "JetBrains Mono", "Cascadia Mono", monospace;
	font-size: 0.88rem;
	line-height: 1.45;
	min-height: 4rem;
	resize: vertical;
}
textarea.mono { white-space: pre; overflow-x: auto; }
input[type=file] {
	background: transparent;
	padding: 0.25rem;
	border: 0;
}
input[type=checkbox] { width: auto; }

.btn {
	display: inline-flex;
	align-items: center;
	gap: 0.35rem;
	padding: 0.55rem 1rem;
	border-radius: 6px;
	border: 1px solid #2a313a;
	background: #1f2630;
	color: #e6edf3;
	font-weight: 600;
	cursor: pointer;
	font-size: 0.88rem;
}
.btn:hover { background: #2a313a; }
.btn-primary {
	background: var(--bg);
	border-color: var(--bg);
	color: #fff;
}
.btn-primary:hover { filter: brightness(1.15); }
.btn-ghost { background: transparent; }
.btn-danger { background: #b03a3a; border-color: #b03a3a; color: #fff; }
.btn-danger:hover { background: #c34646; }
.btn-xs { padding: 0.1rem 0.45rem; font-size: 0.7rem; }

.muted { color: #9aa6b2; }
.muted.small { font-size: 0.78rem; }
.muted.block { display: block; margin-top: 0.25rem; }
.micro { display: inline-flex; align-items: center; gap: 0.3rem; font-size: 0.82rem; }
.micro input[type=number] { width: 4.5rem; }
.inline { display: inline-block; }

.form-grid { display: grid; gap: 0.75rem 1.25rem; }
.form-grid.two-col { grid-template-columns: 1fr 1fr; }
.form-grid .span-2 { grid-column: 1 / -1; }
@media (max-width: 720px) { .form-grid.two-col { grid-template-columns: 1fr; } }

.row { display: flex; gap: 0.5rem; flex-wrap: wrap; align-items: center; }
.upload-row { display: flex; gap: 0.75rem; align-items: center; flex-wrap: wrap; }

.logo-row { display: flex; gap: 1rem; align-items: center; flex-wrap: wrap; }
.logo-preview {
	max-width: 200px;
	max-height: 70px;
	object-fit: contain;
	background: var(--bg);
	border-radius: 6px;
	padding: 0.5rem 0.75rem;
}
.logo-preview.empty {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	color: rgba(255,255,255,0.6);
	font-size: 0.8rem;
	width: 200px;
	height: 70px;
}

.media-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
	gap: 0.75rem;
	margin-top: 1rem;
}
.media-tile { margin: 0; }
.media-tile img {
	width: 100%;
	aspect-ratio: 1;
	object-fit: cover;
	border-radius: 6px;
	border: 1px solid #232a35;
	background: #0b0f14;
}
.media-tile figcaption {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 0.3rem;
	margin-top: 0.3rem;
	font-size: 0.7rem;
	color: #9aa6b2;
}
.media-tile figcaption code {
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.slide-list {
	list-style: none;
	padding: 0;
	margin: 0;
	display: flex;
	flex-direction: column;
	gap: 0.75rem;
}
.slide-card.is-disabled { opacity: 0.55; }
.slide-card-head {
	display: grid;
	grid-template-columns: auto 1fr auto auto;
	gap: 0.6rem;
	align-items: center;
	margin-bottom: 0.75rem;
}
@media (max-width: 720px) {
	.slide-card-head { grid-template-columns: 1fr; }
}
.slide-title { font-weight: 600; }
.kind-badge {
	display: inline-block;
	padding: 0.2rem 0.6rem;
	font-size: 0.72rem;
	border-radius: 5px;
	background: #2a313a;
	color: #e6edf3;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	font-weight: 700;
}
.kind-agenda    { background: #3b2870; color: #d8c8ff; }
.kind-wayfinder { background: #1d4a3f; color: #b7e9d2; }
.kind-card      { background: #4a2d1f; color: #fdcfa9; }
.kind-markdown  { background: #1f3a4a; color: #b6ddf2; }
.kind-html      { background: #3a3030; color: #ffd5d5; }
