/* ===============================================================================
   style.css — Responsive-Design fuer OKG Homepage
   Version: 5.1
   Datum: 2026-03-20
   Beschreibung: Stylesheet fuer OKG Homepage
   =============================================================================== */
@charset "utf-8";

/* -------------------------------------------------------------------------------
   Font Awesome (identisch zu default.css)
   ------------------------------------------------------------------------------- */
@font-face {
	font-family: 'FontAwesome';
	font-style: normal;
	font-weight: 900;
	font-display: block;
	src: url("/css/fonts/fa-solid-900.eot");
	src: url("/css/fonts/fa-solid-900.eot?#iefix") format("embedded-opentype"),
		url("/css/fonts/fa-solid-900.woff2") format("woff2"),
		url("/css/fonts/fa-solid-900.woff") format("woff"),
		url("/css/fonts/fa-solid-900.ttf") format("truetype"),
		url("/css/fonts/fa-solid-900.svg#fontawesome") format("svg");
}
@font-face {
	font-family: 'FontAwesomeBrands';
	font-style: normal;
	font-weight: 400;
	font-display: block;
	src: url("/css/fonts/fa-brands-400.woff2") format("woff2"),
		url("/css/fonts/fa-brands-400.woff") format("woff");
}
.fa,
.fas {
	font-family: 'FontAwesome';
	font-weight: 900;
}
.fab {
	font-family: 'FontAwesomeBrands';
	font-weight: 400;
}

/* -------------------------------------------------------------------------------
   CSS Custom Properties
   ------------------------------------------------------------------------------- */
:root {
	/* Border */
	--border-primary: #dddddd;
	--border-secondary: #cccccc;
	--border-accent: #ff8800;
	--border-hover: #ff8800;
	--border-focus: #003399;
	--border-active: #ff8800;
	--border-disabled: #cccccc;
	--border-heading: #ff8800;
	--border-inverse: #003399;
	--border-menu: #ffffff;
	--border-error: #880000;
	--border-success: #008800;

	/* Text */
	--text-primary: #111111;
	--text-secondary: #888888;
	--text-accent: #000088;
	--text-inverse: #ffffff;
	--text-heading: #003399;
	--text-link: #003399;
	--text-hover: #ff8800;
	--text-focus: #003399;
	--text-active: #ff8800;
	--text-disabled: #bbbbbb;
	--text-menu: #ffffff;
	--text-logo: #ff8800;
	--text-error: #880000;
	--text-success: #008800;

	/* Hintergrund */
	--bg-primary: #ffffff;
	--bg-secondary: #eeeeee;
	--bg-accent: #dddddd;
	--bg-header: #003399;
	--bg-inverse: #003399;
	--bg-hover: #dddddd;
	--bg-focus: #ffffff;
	--bg-active: #ffeedd;
	--bg-disabled: #dddddd;
	--bg-menu: #ff8800;
	--bg-success: #99dd99;
	--bg-error: #dd9999;
	--bg-highlight: #ffeedd;

	/* Schriftgroessen-Skala */
	--fs-2xs: 0.65rem;   /* Meta-Footer, kleinste Labels */
	--fs-xs: 0.7rem;     /* Ort, Bild-Labels, Kleingedrucktes */
	--fs-sm: 0.75rem;    /* kleine Meta-Texte */
	--fs-base: 0.8rem;   /* Sidebar-Inhalt, Formular-Elemente */
	--fs-md: 0.85rem;    /* Beschreibungen, Standard-Body */
	--fs-lg: 0.9rem;     /* UI-Text, Buttons, Formular-Labels */
	--fs-xl: 1rem;       /* Links, betonte Texte */
	--fs-nav: 1.05rem;   /* Navigation, Sidebar-Ueberschriften */
	--fs-h4: 1.05rem;    /* Ueberschrift h4 */
	--fs-h3: 1.2rem;     /* Ueberschrift h3 */
	--fs-h2: 1.4rem;     /* Ueberschrift h2 */
	--fs-h1: 1.8rem;     /* Ueberschrift h1 */
	--fs-logo: clamp(0.9rem, 3.5cqi, 3rem); /* Logo-Schriftgroesse */

	/* Layout */
	--content-max: 1280px;
	--nav-height: 42px;
	--radius: 8px;
	--shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
	--shadow-md: 0 4px 12px rgba(0,0,0,0.1);
	--shadow-lg: 0 8px 30px rgba(0,0,0,0.15);
	--bg-content: #ffffff;
}

/* -------------------------------------------------------------------------------
   Reset & Base
   ------------------------------------------------------------------------------- */
*, *::before, *::after {
	margin: 0;
	padding: 0;
	box-sizing: border-box;
}
html {
	scroll-behavior: smooth;
}
body {
	font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
	font-size: 16px;
	line-height: 1.6;
	color: var(--text-primary);
	background: url(/css/themes/default/images/hintergrund.jpg) no-repeat center center fixed;
	background-size: cover;
	min-height: 100vh;
	display: flex;
	flex-direction: column;
}
a {
	color: var(--text-link);
	text-decoration: none;
	transition: color 0.2s;
}
a:hover {
	color: var(--text-hover);
}
img {
	max-width: 100%;
	height: auto;
}

/* -------------------------------------------------------------------------------
   Content Wrapper
   ------------------------------------------------------------------------------- */
.content {
	width: 100%;
	min-height: 100vh;
	display: flex;
	flex-direction: column;
}

/* -------------------------------------------------------------------------------
   Header
   ------------------------------------------------------------------------------- */
header {
	background: var(--bg-header);
	color: var(--text-inverse);
	padding: 5px 1.5rem;
	position: relative;
}
.header-inner {
	max-width: var(--content-max);
	margin: 0 auto;
	display: flex;
	align-items: center;
	gap: 1rem;
	width: 100%;
	padding-left: 1rem;
	container-type: inline-size;
}
.header-logo {
	flex-shrink: 0;
	line-height: 0;
}
.header-logo img {
	height: 100px;
	width: auto;
	display: block;
}
.logo {
	flex: 1;
	min-width: 0;
	font-size: var(--fs-logo);
	font-weight: 800;
	color: var(--text-logo) !important;
	text-shadow: 0 2px 4px rgba(0,0,0,0.3);
	line-height: 1.2;
	white-space: nowrap;
	overflow: hidden;
}
.header-hamburger-spacer {
	display: none;
}
/* Icon-Menuepunkt */
.nav-icon {
	position: relative;
}
/* Letzter nav-icon Punkt: rechts ausrichten */
#main-nav > ul > .nav-icon:last-child {
	margin-left: auto;
}
/* Toast-Meldung (z.B. Auto-Logout) */
.toast-msg {
	position: fixed;
	bottom: 1.5rem;
	right: 1.5rem;
	background: var(--bg-warning, #fff3cd);
	color: var(--text-warning, #856404);
	padding: 0.6rem 1.2rem;
	border-radius: 6px;
	font-size: var(--fs-sm);
	box-shadow: 0 2px 8px rgba(0,0,0,0.15);
	z-index: 9999;
	opacity: 1;
	transition: opacity 0.5s ease;
}
.toast-msg.fade-out {
	opacity: 0;
	pointer-events: none;
}
.nav-icon > .nav-group {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
}
.nav-gear-ring {
	position: absolute;
	width: 34px;
	height: 34px;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	pointer-events: none;
}
.nav-gear-ring .ring-bg {
	fill: none;
	stroke: rgba(255,255,255,0.15);
	stroke-width: 2;
}
.nav-gear-ring .ring-fg {
	fill: none;
	stroke: var(--text-menu);
	stroke-width: 2.5;
	stroke-linecap: round;
	transform: rotate(-90deg);
	transform-origin: center;
	transition: stroke-dashoffset 1s linear, stroke 0.5s;
}
.nav-icon.timer-warn .ring-fg {
	stroke: #f0ad4e;
}
.nav-icon.timer-critical .ring-fg {
	stroke: #d9534f;
}
.nav-icon-label {
	display: none;
}
#main-nav .nav-icon > .dropdown {
	left: auto;
	right: 0;
}


/* -------------------------------------------------------------------------------
   Main Navigation (index.php)
   ------------------------------------------------------------------------------- */
/* Hamburger Button (nur auf Mobile sichtbar) */
#hamburger {
	display: none;
	position: fixed;
	top: 12px;
	right: 12px;
	z-index: 1100;
	background: var(--bg-menu);
	border: none;
	border-radius: var(--radius);
	padding: 8px 9px;
	cursor: pointer;
	box-shadow: var(--shadow-sm);
}
#hamburger span {
	display: block;
	width: 22px;
	height: 2px;
	background: var(--bg-primary);
	margin: 5px 0;
	border-radius: 2px;
	transition: transform 0.3s, opacity 0.3s;
}
#hamburger.open span:nth-child(1) {
	transform: translateY(7px) rotate(45deg);
}
#hamburger.open span:nth-child(2) {
	opacity: 0;
}
#hamburger.open span:nth-child(3) {
	transform: translateY(-7px) rotate(-45deg);
}

#main-nav {
	background: var(--bg-menu);
	border-bottom: none;
	position: sticky;
	top: 0;
	z-index: 1000;
	box-shadow: var(--shadow-sm);
}
#main-nav > ul {
	list-style: none;
	display: flex;
	flex-wrap: wrap;
	max-width: var(--content-max);
	margin: 0 auto;
	padding: 0 1rem;
}
#main-nav > ul > li {
	position: relative;
}
#main-nav > ul > li > a,
#main-nav .nav-group {
	display: block;
	padding: 0 1.2rem;
	line-height: var(--nav-height);
	color: var(--text-menu);
	font-size: var(--fs-nav);
	font-weight: 500;
	text-decoration: none;
	cursor: pointer;
	border-bottom: 2px solid transparent;
	transition: border-color 0.2s, background 0.2s;
}
#main-nav > ul > li:hover > a,
#main-nav > ul > li:hover > .nav-group {
	color: var(--text-menu);
	background: rgba(0,0,0,0.1);
	border-bottom-color: var(--border-menu);
}
/* Dropdown */
#main-nav .dropdown {
	display: none;
	position: absolute;
	top: 100%;
	left: 0;
	min-width: 220px;
	background: var(--bg-menu);
	border: 1px solid var(--border-menu);
	border-radius: 0 0 var(--radius) var(--radius);
	box-shadow: var(--shadow-sm);
	list-style: none;
	padding: 0.25rem 0;
	z-index: 1001;
}
#main-nav .has-dropdown:hover .dropdown {
	display: block;
}
#main-nav .dropdown li a {
	display: block;
	padding: 0.5rem 1.2rem;
	color: var(--text-menu);
	font-size: var(--fs-lg);
	font-weight: 400;
	text-decoration: none;
	line-height: 1.4;
	white-space: nowrap;
}
#main-nav .dropdown li a:hover {
	background: rgba(0,0,0,0.1);
	color: var(--text-menu);
}
#main-nav a .fa-external-link-alt {
	margin-left: 0.3rem;
	font-size: 0.65em;
	opacity: 0.6;
}

/* Sub-Dropdowns (verschachtelt) */
#main-nav .has-subdropdown {
	position: relative;
}
#main-nav .nav-subgroup {
	display: block;
	padding: 0.5rem 1.2rem;
	color: var(--text-menu);
	font-size: var(--fs-lg);
	font-weight: 600;
	cursor: default;
	white-space: nowrap;
}
#main-nav .nav-subgroup::after {
	content: '\25B6';
	float: right;
	margin-left: 0.5rem;
	font-size: var(--fs-2xs);
	line-height: 1.6;
}
#main-nav .has-subdropdown:hover > .nav-subgroup {
	background: rgba(0,0,0,0.1);
	color: var(--text-menu);
}
#main-nav .subdropdown {
	display: none;
	position: absolute;
	top: 0;
	left: 100%;
	min-width: 200px;
	background: var(--bg-menu);
	border: 1px solid var(--border-menu);
	border-radius: var(--radius);
	box-shadow: var(--shadow-sm);
	list-style: none;
	padding: 0.25rem 0;
	z-index: 1002;
}
#main-nav .has-subdropdown:hover > .subdropdown {
	display: block;
}
#main-nav .subdropdown li a {
	display: block;
	padding: 0.5rem 1.2rem;
	color: var(--text-menu);
	font-size: var(--fs-lg);
	font-weight: 400;
	text-decoration: none;
	line-height: 1.4;
	white-space: nowrap;
}
#main-nav .subdropdown li a:hover {
	background: rgba(0,0,0,0.1);
	color: var(--text-menu);
}

/* -------------------------------------------------------------------------------
   Site Content (index.php)
   ------------------------------------------------------------------------------- */
.site-content {
	max-width: var(--content-max);
	width: 100%;
	margin: 0 auto;
	padding: 1.5rem 1rem;
	display: grid;
	grid-template-columns: 1fr 240px;
	gap: 2rem;
	flex: 1;
}
.site-content.admin-content {
	grid-template-columns: 1fr;
}

/* Sidebar (index.php) */
.sidebar {
	display: flex;
	flex-direction: column;
	gap: 1rem;
}
.sidebar-card {
	background: color-mix(in srgb, var(--bg-content) 92%, transparent);
	border: 1px solid var(--border-primary);
	border-radius: var(--radius);
	padding: 1rem;
	box-shadow: var(--shadow-sm);
}
.sidebar-card h4 {
	font-size: var(--fs-h2);
	font-weight: 600;
	color: var(--text-heading);
	border-bottom: 1px solid var(--border-primary);
	padding: 0 0 0.5rem;
	margin-bottom: 0.5rem;
}
#schedules h4::before {
	font-family: 'FontAwesome';
	font-weight: 900;
	content: '\f073';
	margin-right: 0.4rem;
}
#pictures h4::before {
	font-family: 'FontAwesome';
	font-weight: 900;
	content: '\f03e';
	margin-right: 0.4rem;
}
#countdown h4::before {
	font-family: 'FontAwesome';
	font-weight: 900;
	content: '\f017';
	margin-right: 0.4rem;
}
.countdown-label {
	font-size: var(--fs-md);
	font-weight: 600;
	margin: 0.3rem 0 0;
	padding: 0.3rem 0 0;
	border-top: 1px solid var(--border-primary);
	text-align: left;
}
.countdown-label:first-of-type {
	border-top: none;
	padding-top: 0;
	margin-top: 0;
}
.countdown-date {
	font-size: var(--fs-base);
	font-weight: 600;
	color: var(--text-link);
	text-align: left;
	padding: 0;
	margin: 0;
}
#getting-started,
#getting-started2,
#getting-started3 {
	font-size: var(--fs-base);
	text-align: left;
	padding: 0 0 0.25rem;
}

/* Footer (index.php) */
.footer-inner {
	max-width: var(--content-max);
	margin: 0 auto;
}
.footer-links {
	margin-top: 0.2rem;
	font-size: var(--fs-xs);
}
.footer-links a {
	color: rgba(255,255,255,0.7);
	text-decoration: none;
}
.footer-links a:hover {
	color: var(--text-inverse);
}


/* -------------------------------------------------------------------------------
   Content Area (Hauptinhalt)
   ------------------------------------------------------------------------------- */
.content-area {
	min-width: 0;
	min-height: auto;
	background: color-mix(in srgb, var(--bg-content) 92%, transparent);
	border: 1px solid var(--border-primary);
	border-radius: var(--radius);
	padding: 1.5rem;
	text-align: left;
	overflow-x: auto;
	box-shadow: var(--shadow-sm);
}
.content-area h1 {
	font-size: var(--fs-h1);
	font-weight: 700;
	color: var(--text-heading);
	padding: 0 0 0.5rem;
	margin-bottom: 1rem;
	border-bottom: 2px solid var(--border-accent);
}
.content-area h2 {
	font-size: var(--fs-h2);
	font-weight: 600;
	color: var(--text-heading);
	border-bottom: 1px solid var(--border-primary);
	padding: 0 0 0.5rem;
	margin-bottom: 0.5rem;
}
.content-area h2.failed {
	color: var(--text-error);
}
.content-area h3 {
	font-size: var(--fs-h3);
	font-weight: 600;
	padding: 0.8rem 0 0.4rem;
}
.content-area h4 {
	font-size: var(--fs-h4);
	font-weight: 600;
	padding: 0.4rem 0;
}
.content-area p {
	margin: 0.3rem 0;
	padding-bottom: 0.5rem;
}
.content-area ol,
.content-area ul {
	padding-left: 2rem;
	padding-bottom: 0.3rem;
}
.content-area ul {
	list-style-type: disc;
}
.content-area li {
	padding-bottom: 0.15rem;
}
.content-area hr {
	border: none;
	border-top: 1px solid var(--border-primary);
	margin: 1rem 0;
}
.content-area table {
	border-collapse: collapse;
	margin: 0.5rem 0;
	max-width: 100%;
	width: 100%;
	word-wrap: break-word;
}
.content-area table td,
.content-area table th {
	padding: 6px 12px 6px 0;
	vertical-align: top;
	text-align: left;
}
.content-area table th {
	font-weight: 600;
}
.content-area img {
	max-width: 100%;
	border: none;
	border-radius: var(--radius);
	display: block;
	margin: 0.5rem auto;
}
.content-area img.leftside {
	width: 200px;
	float: left;
	margin: 0 1rem 0.5rem 0;
	border-radius: var(--radius);
}
.content-area img.rightside {
	width: 200px;
	float: right;
	margin: 0 0 0.5rem 1rem;
	border-radius: var(--radius);
}


/* -------------------------------------------------------------------------------
   Counter & Countdown
   ------------------------------------------------------------------------------- */
#counter {
	background: var(--bg-primary);
	border: 1px solid var(--border-primary);
	border-radius: var(--radius);
	padding: 1rem;
	margin-bottom: 1rem;
	text-align: center;
	box-shadow: var(--shadow-sm);
	height: auto;
}
#counter h4 {
	font-size: var(--fs-md);
	font-weight: 700;
	color: var(--text-heading);
	border-top: none;
	border-bottom: 1px solid var(--border-primary);
	padding: 0 0 0.4rem;
	margin-bottom: 0.5rem;
}
#counter h4:first-child {
	border-bottom: 1px solid var(--border-primary);
}
#counter ul {
	padding: 0;
	font-size: var(--fs-base);
	line-height: 1.5;
	list-style: none;
	display: grid;
	grid-template-columns: 1fr auto;
	gap: 2px 8px;
	text-align: left;
}
#counter li.text {
	float: none;
	width: auto;
	text-align: right;
	color: var(--text-primary);
}
#counter li.number {
	float: none;
	width: auto;
	text-align: left;
	font-weight: 600;
}
#countdown {
	text-align: left;
}
#countdown p {
	font-weight: 600;
	font-size: var(--fs-md);
}
#countdown div {
	font-size: var(--fs-base);
	padding: 0;
}

/* -------------------------------------------------------------------------------
   Schedules (Sidebar)
   ------------------------------------------------------------------------------- */
#schedules {
	width: auto;
}
.sidebar-card#schedules > p {
	display: none;
}
#schedules p {
	font-weight: 600;
	font-size: var(--fs-base);
	padding: 0;
	margin: 0;
}
div.schedule {
	width: auto;
	padding: 0.3rem 0 0.3rem 28px;
	border-top: 1px solid var(--border-primary);
	border-bottom: none;
	background-size: 20px 20px !important;
	background-position: 0 0.4rem !important;
	background-repeat: no-repeat !important;
}
div.schedule:first-of-type {
	border-top: none;
	padding-top: 0;
	background-position: 0 0.1rem !important;
}
div.schedule p {
	font-weight: 600;
	font-size: var(--fs-base);
	margin: 0;
	text-align: left;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}
div.schedule a {
	text-decoration: none;
	color: var(--text-primary);
}
div.schedule a:hover p {
	color: var(--text-hover);
}
div.schedule ul {
	margin: 0;
	list-style: none;
	width: auto;
}
div.schedule ul li {
	display: inline-block;
	font-size: var(--fs-md);
	width: auto;
}
div.schedule ul li.time {
	text-align: right;
	width: 45px;
	color: var(--text-primary);
}
div.schedule ul li.location {
	font-size: var(--fs-xs);
	width: 100%;
	color: var(--text-secondary);
	margin-top: -4px;
}
div.schedule ul li.groups {
	font-size: var(--fs-xs);
	width: 100%;
	color: var(--text-tertiary);
	margin-top: -2px;
}
div.schedule ul li.groups .group-tag {
	font-size: var(--fs-xs);
	padding: 1px 6px;
	margin: 0 2px 2px 0;
}

/* -------------------------------------------------------------------------------
   Pictures (Sidebar)
   ------------------------------------------------------------------------------- */
.sidebar-card#pictures {
	display: block;
}
#pictures p {
	font-weight: 600;
	font-size: var(--fs-lg);
	padding: 0;
	margin: 0 0 0.5rem;
}
.more-link {
	display: block;
	text-align: center;
	font-size: var(--fs-sm);
	color: var(--text-heading);
	margin-top: 0.5rem;
}
div.picture {
	width: 100%;
	border: 1px solid var(--border-primary);
	border-radius: var(--radius);
	overflow: hidden;
	margin-bottom: 0.5rem;
}
div.picture a {
	width: 100%;
	display: flex;
	align-items: center;
	justify-content: center;
	text-decoration: none;
	color: var(--text-inverse);
	font-size: var(--fs-xs);
	font-weight: 600;
	aspect-ratio: 4/3;
	position: relative;
	overflow: hidden;
}
div.picture a::before {
	content: '';
	position: absolute;
	inset: -8px;
	background: inherit;
	background-size: cover;
	background-position: center;
	filter: blur(8px) brightness(0.7);
}
div.picture a img {
	position: relative;
	z-index: 1;
	max-width: 100%;
	max-height: 100%;
	object-fit: contain;
}
div.picture span.name {
	display: block;
	font-size: var(--fs-xs);
	font-weight: 600;
	text-align: center;
	width: 100%;
	line-height: 1.3;
	padding: 4px 4px;
	background: var(--bg-secondary);
}
div.picture a > span {
	position: absolute;
	top: 4px;
	left: 4px;
	z-index: 2;
	background: rgba(0,0,0,0.5);
	color: var(--text-inverse);
	padding: 2px 6px;
	border-radius: 3px;
	font-size: var(--fs-xs);
}
div.picture a:hover {
	opacity: 0.85;
}

/* -------------------------------------------------------------------------------
   Buttons
   ------------------------------------------------------------------------------- */
button,
a.button {
	display: inline-block;
	padding: 0.4rem 0.8rem;
	border-radius: var(--radius);
	font-family: inherit;
	border: 1px solid var(--border-secondary);
	font-size: var(--fs-lg);
	color: var(--text-heading);
	background-color: var(--bg-primary);
	text-decoration: none;
	cursor: pointer;
	transition: all 0.2s;
	min-width: 14px;
}
/* -------------------------------------------------------------------------------
   Admin-Buttons (einheitlich)
   ------------------------------------------------------------------------------- */
.admin-btn {
	padding: 2px 5px;
	font-size: 14px;
	background: none;
	border: none;
	color: var(--text-disabled);
	cursor: pointer;
	line-height: 1;
	text-decoration: none;
	min-width: 0;
	border-radius: 0;
	transition: color 0.2s;
}
.admin-btn:hover {
	color: var(--text-hover);
	background: none;
	border-color: transparent;
}
.btn-delete:hover {
	color: var(--text-error);
}
.btn-hot.active {
	color: var(--text-error);
}
.btn-hide.active {
	color: var(--text-secondary);
}
select:hover,
button:not(.btn-save):not(.btn-clear):not(.admin-btn):hover,
button.ms-choice:hover,
a.button:hover {
	color: var(--text-hover);
	background-color: var(--bg-hover);
	border-color: var(--border-hover);
}
input:disabled,
select:disabled,
button:disabled,
a.button:disabled {
	color: var(--text-disabled) !important;
	background-color: var(--bg-disabled) !important;
	border-color: var(--border-disabled) !important;
	cursor: not-allowed;
}

/* -------------------------------------------------------------------------------
   News (Shortnews + Articles)
   ------------------------------------------------------------------------------- */
div.shortnews h2 {
	padding-top: 0;
	display: flex;
	align-items: center;
}
div.shortnews div p {
	font-size: var(--fs-md);
	font-weight: 600;
	border: none;
	padding: 0;
	margin: 0 0 -3px 0;
}
div.shortnews div p a {
	font-size: var(--fs-xl);
	text-decoration: none;
	color: var(--text-heading);
	transition: color 0.2s;
}
div.shortnews div p a:hover {
	color: var(--text-hover);
}
div.shortnews div p a i {
	font-size: var(--fs-xs);
	padding-left: 4px;
	vertical-align: middle;
}
div.shortnews div {
	margin: 0 0 0.3rem 0;
	padding: 0.5rem 0.5rem;
	border-bottom: 1px solid var(--border-primary);
}
div.shortnews div p.article_footer {
	border: none;
	font-size: var(--fs-2xs);
	font-weight: normal;
	color: var(--text-secondary);
}
div.article {
	margin-top: 1rem;
	padding: 1rem;
	background: var(--bg-primary);
	border: 1px solid var(--border-primary);
	border-radius: var(--radius);
	box-shadow: var(--shadow-sm);
}
p.article_footer {
	padding: 0.5rem 0 0;
	margin: 0;
	font-size: var(--fs-2xs);
	border-top: 1px solid var(--border-primary);
	width: 100%;
	line-height: 1.4;
	display: block;
	color: var(--text-secondary);
}
p.article_footer span.author {
	float: right;
}
figcaption {
	margin: 0 0 0.5rem 0;
	font-size: var(--fs-base);
	line-height: 1.3;
	font-style: italic;
	color: var(--text-secondary);
}

/* -------------------------------------------------------------------------------
   Filter
   ------------------------------------------------------------------------------- */
div.filter {
	position: relative;
	width: 100%;
	max-width: 100%;
	border-top: 1px solid var(--border-primary);
	border-bottom: none;
	padding: 0.5rem 0;
	margin-bottom: 0.5rem;
	display: flex;
	align-items: center;
	gap: 6px;
}
div.filter .btn-add {
	margin-left: auto;
}
div.filter h3 {
	margin: 0;
	flex-wrap: wrap;
}
div.filter p {
	padding: 0;
	margin: 0;
}
div.filter .filter-label {
	font-size: var(--fs-lg);
	color: var(--text-accent);
	white-space: nowrap;
}
.filter-reset {
	height: 36px;
	width: 36px;
	padding: 0;
	font-size: var(--fs-lg);
	border: 1px solid var(--border-secondary);
	border-radius: var(--radius);
	background: var(--bg-primary);
	color: var(--text-heading);
	cursor: pointer;
	box-sizing: border-box;
}
.filter-reset:disabled {
	opacity: 0.35;
	cursor: default;
}
.filter-reset:not(:disabled):hover {
	border-color: var(--border-hover);
	color: var(--text-hover);
}
.filter-btn {
	height: 36px;
	padding: 0 10px;
	font-size: var(--fs-lg);
	border: 1px solid var(--border-secondary);
	border-radius: var(--radius);
	background: var(--bg-primary);
	color: var(--text-heading);
	cursor: pointer;
	box-sizing: border-box;
	white-space: nowrap;
}
.filter-btn:hover {
	border-color: var(--border-hover);
	color: var(--text-hover);
}
/* MultiSelect-Plugin in editor-field: an normale Selects angleichen */
.editor-field .ms-parent {
	width: 100% !important;
}
.editor-field .ms-choice {
	height: 36px;
	line-height: 36px;
	padding: 0 2rem 0 0.5rem;
	border: 1px solid var(--border-secondary);
	border-radius: var(--radius);
	font-size: var(--fs-lg);
	color: var(--text-heading);
	background-color: var(--bg-primary);
}
.editor-field .ms-choice div.icon-caret {
	display: none;
}
.editor-field .ms-choice span {
	color: var(--text-heading);
}
.editor-field .ms-choice span.ms-placeholder {
	color: var(--text-secondary);
}


ul.status {
	display: grid;
	grid-template-columns: 50px 1fr 200px;
	padding-left: 0;
	width: 100%;
}

/* -------------------------------------------------------------------------------
   Schedule-Tabellen (Termine Detailansicht)
   ------------------------------------------------------------------------------- */
.schedule-table {
	border: 1px solid var(--border-primary);
	border-radius: var(--radius);
	margin: 0.75rem 0;
	overflow: hidden;
	position: relative;
	background: var(--bg-primary);
	box-shadow: var(--shadow-sm);
}
.schedule-table .row {
	display: grid;
	grid-template-columns: 48px 1fr 110px;
	align-items: center;
	gap: 6px;
	padding: 6px 8px;
}
.schedule-table .row.header {
	font-weight: 600;
	border-bottom: 1px solid var(--border-primary);
	background: var(--bg-secondary);
	color: var(--text-primary);
}
.schedule-table .row.main {
	display: block;
	padding: 4px 8px;
}
.schedule-table .row.main .cell.meta {
	display: block;
}
.schedule-table .row.main .cell.meta .label {
	font-weight: 600;
	margin-right: 4px;
}
.recurrence-icon {
	font-size: 0.7em;
	color: var(--text-secondary);
	vertical-align: middle;
}
.recurrence-hint {
	font-size: var(--fs-sm);
	color: var(--text-secondary);
	font-style: italic;
}
.recurrence-hint .fa-redo {
	font-size: 0.7em;
	margin-right: 2px;
}
.recurrence-wrap {
	display: flex;
	align-items: center;
	gap: 0.4rem;
}
.recurrence-wrap input[type="number"],
.recurrence-end input[type="number"] {
	width: 60px;
}
.recurrence-end {
	display: flex;
	flex-direction: column;
	gap: 0.3rem;
}
.recurrence-end label {
	display: flex;
	align-items: center;
	gap: 0.3rem;
	font-weight: normal;
}
.schedule-table .cell {
	padding: 2px 4px;
}
.schedule-table .cell.icon img {
	width: 24px;
	height: 24px;
	margin: 0;
	object-fit: contain;
	border: none;
	border-radius: 0;
}
.schedule-table .cell.title {
	word-break: break-word;
}
.schedule-table .cell.actions {
	text-align: right;
	white-space: nowrap;
}
.schedule-item.today {
	border-color: var(--border-accent);
}
.schedule-item[data-recurring="1"] {
	border-color: var(--border-inverse);
}
.schedule-item[data-recurring="1"].today {
	border-color: var(--border-accent);
}
.schedule-item.today .row.header {
	background: var(--bg-highlight);
	color: var(--text-primary);
}
.schedule-item.today .row.main,
.schedule-item.today .details {
	color: var(--text-primary);
}

.schedule_editor {
	border-bottom: 1px solid var(--border-primary);
	margin-bottom: 15px;
}
.toggle-details {
	position: absolute;
	right: 12px;
	border: none;
	background: none;
	color: var(--text-secondary);
	font-size: 1.2rem;
	cursor: pointer;
	padding: 4px 8px;
}
.toggle-details:hover,
.toggle-details:focus {
	background: none !important;
	border: none !important;
	outline: none;
	color: var(--text-secondary) !important;
}
.details {
	display: none;
	padding: 0.5rem 0.75rem 0;
	border-top: 1px solid var(--border-primary);
	font-size: var(--fs-lg);
}
.details.open {
	display: block;
}
.details p.meta {
	padding-bottom: 2px;
	font-size: var(--fs-sm);
	color: var(--text-secondary);
}

.group-tag {
	display: inline-block;
	padding: 2px 8px;
	margin: 0 4px 3px 0;
	border-radius: 12px;
	border: 1px solid var(--border-secondary);
	background: rgba(0,0,125,0.15);
	font-size: var(--fs-base);
}

/* Editor title */
.editor-title {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 8px;
}
.editor-title h3 {
	margin: 0;
}

/* -------------------------------------------------------------------------------
   Editor-Basis (Schedule, Galerie, Theme, Article)
   ------------------------------------------------------------------------------- */
/* Container */
.te-section-body {
	padding: 16px;
}
/* Feld: Label ueber Input */
.form-row,
.editor-field {
	display: flex;
	flex-direction: column;
	gap: 3px;
	margin-bottom: 10px;
}
/* Label */
.form-row label,
.editor-field label,
.datetime-row label {
	font-size: var(--fs-xs);
	font-weight: bold;
	color: var(--text-accent);
	margin-bottom: 0;
	display: block;
}
/* Inputs volle Breite */
.form-row input[type="text"],
.form-row input[type="file"],
.form-row select,
.form-row textarea {
	width: 100%;
	max-width: 100%;
}
/* Leere Spans ausblenden */
.form-row span:empty {
	display: none;
}
/* Zeile: mehrere Felder nebeneinander */
.editor-row,
.datetime-row {
	display: flex;
	gap: 12px;
	margin-bottom: 10px;
	flex-wrap: wrap;
}
.datetime-row {
	gap: 8px 16px;
	align-items: end;
	margin: 8px 0;
}
.editor-field.grow,
.editor-row .editor-field {
	flex: 1;
	min-width: 140px;
	margin-bottom: 0;
}
.filter-row .editor-field {
	flex: 0 1 auto;
	min-width: 0;
	align-items: flex-start;
}
.filter-spacer {
	flex: 1;
}
.editor-field.w-xs  { width:  80px; }
.editor-field.w-sm  { width: 120px; }
.editor-field.w-md  { width: 180px; }
.editor-field.w-lg  { width: 260px; }
.editor-field.w-xl  { width: 360px; }
.editor-field.w-full { width: 100%; flex: 1; }
/* Datetime-Felder */
.datetime-wrap {
	display: flex;
	gap: 8px;
	align-items: center;
}
.datetime-wrap input[type="date"] {
	width: 160px;
}
.datetime-wrap input[type="time"] {
	width: 100px;
}
/* Hinweis-Text */
.editor-body .hint {
	line-height: 36px;
	font-size: var(--fs-md);
	color: var(--text-secondary);
	display: flex;
	align-items: center;
}
/* MultiSelect */
.form-row .ms-parent {
	width: 100% !important;
}
.form-row .ms-choice {
	height: 36px;
	line-height: 36px;
	padding: 0 10px;
	border: 1px solid var(--border-secondary);
	border-radius: var(--radius);
	font-size: var(--fs-base);
	color: var(--text-heading);
}
/* File-Input */
input[type="file"] {
	font-size: var(--fs-base);
}
input[type="file"]::file-selector-button {
	background: var(--bg-secondary);
	color: var(--text-heading);
	border: 1px solid var(--border-secondary);
	border-radius: var(--radius);
	padding: 6px 12px;
	font-size: var(--fs-base);
	cursor: pointer;
	transition: all 0.2s;
}
input[type="file"]::file-selector-button:hover {
	background: var(--bg-hover);
	border-color: var(--border-hover);
	color: var(--text-hover);
}
/* Footer */
.form-footer,
.editor-footer {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 8px;
}
/* Editor-Modal (gemeinsam fuer alle Editoren) */
.editor-overlay {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: rgba(0, 0, 0, 0.6);
	z-index: 20000;
	display: flex;
	align-items: flex-start;
	justify-content: center;
	padding-top: 30px;
}
.editor-modal {
	background: var(--bg-primary);
	border-radius: 6px;
	width: 95%;
	max-width: 900px;
	max-height: calc(100vh - 60px);
	display: flex;
	flex-direction: column;
	box-shadow: var(--shadow-lg);
}
.editor-modal--narrow {
	max-width: 640px;
}
.editor-modal--wide {
	max-width: 960px;
}
.editor-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 12px 16px;
	border-bottom: 1px solid var(--border-primary);
	background: var(--bg-secondary);
	border-radius: 6px 6px 0 0;
}
.editor-title {
	font-weight: bold;
	font-size: var(--fs-lg);
}
.editor-close {
	background: none;
	border: none;
	font-size: 20px;
	cursor: pointer;
	color: var(--text-accent);
	line-height: 1;
}
.editor-close:hover {
	color: var(--text-hover);
}
.editor-body {
	padding: 16px;
	overflow-y: auto;
	scrollbar-gutter: stable;
	flex: 1;
}
.editor-footer {
	padding: 12px 16px;
	border-top: 1px solid var(--border-primary);
	background: var(--bg-secondary);
	border-radius: 0 0 6px 6px;
}
.editor-status {
	font-size: var(--fs-sm);
}
.editor-status--ok { color: var(--text-success); }
.editor-status--error { color: var(--text-error); }
.form-footer {
	margin-top: 14px;
	margin-bottom: 20px;
}
.form-footer .btn-clear,
.form-footer .btn-save {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	border-radius: var(--radius);
	padding: 0.4rem 0.8rem;
	cursor: pointer;
	font-size: var(--fs-lg);
	text-decoration: none;
	box-sizing: border-box;
	line-height: 1.4;
	transition: all 0.2s;
}
.btn-save {
	background: var(--bg-success);
	border: 1px solid var(--border-success);
	color: var(--text-success);
}
.btn-save:hover {
	filter: brightness(0.85);
}
.btn-clear {
	background: var(--bg-error);
	border: 1px solid var(--border-error);
	color: var(--text-error);
}
.btn-clear:hover {
	filter: brightness(0.85);
}
/* Fortschrittsbalken */
.progress-bar-wrap {
	height: 20px;
	background: var(--bg-accent);
	border-radius: var(--radius);
	overflow: hidden;
	flex: 1;
}
.progress-bar {
	height: 100%;
	width: 0;
	background: var(--bg-success);
	border-radius: var(--radius);
	transition: width 0.2s;
}
/* Bild-Vorschau-Grid */
.pic-preview-grid {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	padding: 10px 0;
}
.pic-preview-item {
	position: relative;
	width: 100px;
	text-align: center;
}
.pic-preview-item img {
	width: 100px;
	height: 75px;
	object-fit: cover;
	border-radius: var(--radius);
	border: 1px solid var(--border-secondary);
}
.pic-preview-name {
	display: block;
	font-size: 0.7rem;
	color: var(--text-secondary);
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	max-width: 100px;
}
.pic-preview-delete {
	position: absolute;
	top: -4px;
	right: -4px;
	width: 20px;
	height: 20px;
	border-radius: 50%;
	border: none;
	background: var(--bg-error);
	color: var(--text-inverse);
	font-size: 0.65rem;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 0;
	line-height: 1;
}
.pic-preview-delete:hover {
	filter: brightness(0.8);
}

/* -------------------------------------------------------------------------------
   Alerts
   ------------------------------------------------------------------------------- */
.alert {
	padding: 0.75rem 1rem;
	border-radius: var(--radius);
	margin-bottom: 1rem;
	font-size: var(--fs-lg);
}
.alert.success {
	background: var(--bg-success);
	border: 1px solid var(--border-success);
	color: var(--text-success);
}
.alert.error {
	background: var(--bg-error);
	border: 1px solid var(--border-error);
	color: var(--text-error);
}

/* -------------------------------------------------------------------------------
   Content-Blocks (Links, Orden, Listen, Bilder, Termine)
   — Alte float-basierte Layouts auf flexbox umgestellt
   ------------------------------------------------------------------------------- */
div.all_pictures,
div.links,
div.orden,
div.lists {
	display: block;
	width: 100%;
	min-height: 80px;
	border-bottom: 1px solid var(--border-primary);
	margin: 0 0 1rem;
	padding-bottom: 0.5rem;
}
div.lists {
	min-height: 70px;
}
div.links img,
div.orden img,
div.lists img {
	width: 100px;
	margin: 0 1rem 0.5rem 0;
	float: left;
	border-radius: var(--radius);
}
div.lists img,
div.orden img {
	width: 150px;
	background-color: var(--bg-accent);
}
div.lists img {
	max-height: 80px;
}
div.links a {
	text-decoration: none;
	margin-left: 0;
	width: auto;
}
div.all_pictures p,
div.orden p,
div.lists p,
div.links p {
	padding-bottom: 0;
}
div.all_pictures h4,
div.orden h4,
div.lists h4,
div.links h4 {
	width: auto;
	padding-bottom: 2px;
	margin-left: 0;
	border-bottom: 1px solid var(--border-primary);
}
div.description {
	font-size: var(--fs-base);
	min-height: 40px;
	margin: 0 0 0.5rem 110px;
	border-top: 1px solid var(--border-primary);
	padding-top: 0.3rem;
}
div.links div.description {
	min-height: 50px;
}
div.lists div.description {
	min-height: 40px;
	margin-left: 160px;
}
div.orden div.description {
	min-height: 100px;
	margin-left: 160px;
}
/* -------------------------------------------------------------------------------
   Pictures Gallery
   ------------------------------------------------------------------------------- */
div.all_pictures a {
	width: 200px;
	text-decoration: none;
	color: var(--text-primary);
	display: block;
	background-repeat: no-repeat;
	background-size: 40px 40px, 200px auto;
	padding-top: 2px;
	padding-left: 3px;
	font-size: var(--fs-xs);
	font-weight: 600;
	float: left;
}
div.all_pictures div.description {
	margin: 0 0 0 13.3rem;
	padding-top: 0.3rem;
}
div.all_pictures p.location,
div.all_pictures p.date {
	margin-left: 13.3rem;
	font-size: var(--fs-md);
}
ul.pictures {
	padding: 0 0 0 2px;
	margin: 0;
	background-color: var(--bg-accent);
	height: auto;
	min-height: 24px;
	list-style: none;
	display: flex;
	flex-wrap: wrap;
	border-radius: var(--radius);
	overflow: hidden;
}
ul.pictures li {
	display: inline;
}
ul.pictures a {
	font-size: var(--fs-base);
	display: block;
	height: 24px;
	width: auto;
	padding: 0 0.75rem;
	float: none;
	border-right: 1px solid var(--border-primary);
	text-align: center;
	color: var(--text-primary);
	text-decoration: none;
	line-height: 24px;
}
ul.pictures a.active {
	font-weight: bold;
	background-color: var(--bg-active);
}
ul.pictures a:hover {
	font-weight: bold;
	background-color: var(--bg-hover);
}
div.image {
	width: 200px;
	text-decoration: none;
	color: var(--text-primary);
	background-repeat: no-repeat;
	background-size: 40px 40px, 200px auto;
	padding-top: 2px;
	padding-left: 3px;
	font-size: var(--fs-xs);
	font-weight: 600;
	position: relative;
	float: left;
}
div.image a.index {
	position: absolute;
	bottom: 4px;
	margin: 0;
	padding: 0;
	height: 38px;
	width: 38px;
	border: 1px solid rgba(0,51,158,0.75);
	background-repeat: no-repeat;
	background-size: 38px 38px;
	left: 2px;
	background-image: url(/css/images/icons/index.png);
	opacity: 0.9;
	border-radius: var(--radius);
}
div.image a.index:hover {
	cursor: pointer;
	border: 1px solid rgba(255,153,0,0.75);
}

/* -------------------------------------------------------------------------------
   Utility Classes
   ------------------------------------------------------------------------------- */
.clickable {
	cursor: pointer;
}
.list-circle {
	list-style-type: circle;
}
.today,
div.schedule ul li.today {
	color: var(--text-error);
}
p.clear {
	clear: both;
}
.italic {
	font-style: italic;
}
.bold {
	font-weight: 600;
}
.underline {
	text-decoration: underline;
}
.text-right {
	text-align: right;
}
.text-left {
	text-align: left;
}
.text-center {
	text-align: center;
}
.small {
	font-size: var(--fs-md);
}
img.noborder {
	border: none;
	display: inline-block;
	padding: 0;
	margin: 0;
	vertical-align: bottom;
	border-radius: 0;
}
li.weekday {
	font-size: var(--fs-lg);
	padding: 2px 0 0;
}
li.day {
	font-size: 2.8rem;
	font-weight: bold;
	padding: 10px 0 5px;
	line-height: 1;
}
li.month {
	font-size: var(--fs-h3);
}
p.location {
	clear: inherit;
}
/* -------------------------------------------------------------------------------
   Footer
   ------------------------------------------------------------------------------- */
footer {
	background: var(--bg-inverse);
	color: rgba(255,255,255,0.8);
	text-align: center;
	padding: 0.6rem 1rem;
	font-size: var(--fs-base);
	margin-top: auto;
}

/* -------------------------------------------------------------------------------
   Back to Top
   ------------------------------------------------------------------------------- */
.back-to-top {
	position: fixed;
	bottom: 1.5rem;
	right: 1.5rem;
	z-index: 100;
	font-size: 2.5rem;
	color: var(--text-heading);
	background: var(--bg-primary);
	border-radius: 50%;
	box-shadow: var(--shadow-sm);
	width: 48px;
	height: 48px;
	display: flex;
	align-items: center;
	justify-content: center;
	text-decoration: none;
	transition: all 0.3s;
}
.back-to-top:hover {
	color: var(--text-hover);
	box-shadow: var(--shadow-lg);
}

/* -------------------------------------------------------------------------------
   Login / Error / Register Screens
   ------------------------------------------------------------------------------- */
#errorScreen,
#loginScreen {
	width: 100%;
	max-width: 400px;
	margin: 2rem auto;
	padding: 1rem;
	text-align: center;
}
#errorScreen legend,
#loginScreen legend {
	font-size: var(--fs-md);
	margin-left: 5px;
	padding: 0 2px;
	font-weight: 600;
}
#errorScreen {
	float: none;
}
#errorScreen fieldset {
	border: 1px solid var(--border-error);
	border-radius: var(--radius);
	color: var(--text-error);
}
#errorScreen fieldset p {
	margin-bottom: 4px;
}
#loginScreen label {
	display: inline-block;
	width: 190px;
	line-height: 20px;
}
#loginScreen input[type=submit] {
	margin: 2px 0 4px 0;
	clear: both;
}
#loginScreen a {
	margin: 3px 0;
	display: inline-block;
	width: 100%;
	font-size: var(--fs-md);
	color: var(--text-secondary);
}
#loginScreen fieldset {
	min-height: 150px;
	border-radius: var(--radius);
}
#register span {
	margin-top: 2px;
	font-size: var(--fs-lg);
	display: inline-block;
	width: 144px;
}
#register .short {
	border-top: 2px solid var(--border-error);
	color: var(--text-error);
}
#register .weak {
	border-top: 2px solid orange;
	color: orange;
}
#register .good {
	border-top: 2px solid teal;
	color: teal;
}
#register .strong {
	border-top: 2px solid var(--border-success);
	color: var(--text-success);
}

/* -------------------------------------------------------------------------------
   Group Colors
   ------------------------------------------------------------------------------- */
.groupcolor_1 { color: white; background-color: rgb(130, 130, 70); }
.groupcolor_2 { color: white; background-color: rgb(90, 30, 130); }
.groupcolor_3 { color: white; background-color: rgb(130, 30, 70); }
.groupcolor_4 { color: white; background-color: rgb(30, 70, 130); }
.groupcolor_5 { color: white; background-color: rgb(30, 70, 30); }

/* -------------------------------------------------------------------------------
   Forms — Globale Basis-Styles
   ------------------------------------------------------------------------------- */
label {
	display: inline-block;
	margin-bottom: 0.4rem;
}
input[type="text"],
input[type="password"],
input[type="email"],
input[type="date"],
input[type="time"],
input[type="number"],
input[type="datetime-local"],
select,
textarea {
	padding: 0 0.5rem;
	height: 36px;
	line-height: 36px;
	font-size: var(--fs-lg);
	font-family: inherit;
	color: var(--text-heading);
	background-color: var(--bg-primary);
	border: 1px solid var(--border-secondary);
	border-radius: var(--radius);
	box-sizing: border-box;
	transition: border-color 0.2s;
}
textarea {
	height: auto;
	line-height: 1.5;
	padding: 8px 10px;
	resize: vertical;
}
select {
	-webkit-appearance: none;
	appearance: none;
	padding-right: 2rem;
	background-image: url("data:image/svg+xml;utf8,<svg fill='darkblue' height='24' viewBox='0 0 24 24' width='24' xmlns='http://www.w3.org/2000/svg'><path d='M7 10l5 6 6-6z'/><path d='M0 0h24v24H0z' fill='none'/></svg>");
	background-repeat: no-repeat;
	background-position: right 4px center;
}
input[type="text"]:hover,
input[type="password"]:hover,
input[type="email"]:hover,
input[type="date"]:hover,
input[type="time"]:hover,
input[type="number"]:hover,
input[type="datetime-local"]:hover,
select:hover,
textarea:hover {
	border-color: var(--border-hover);
}
input[type="text"]:focus,
input[type="password"]:focus,
input[type="email"]:focus,
input[type="date"]:focus,
input[type="time"]:focus,
input[type="number"]:focus,
input[type="datetime-local"]:focus,
select:focus,
textarea:focus {
	border-color: var(--border-focus);
	outline: none;
}
::placeholder {
	color: var(--text-secondary);
}
input[type="submit"] {
	height: 36px;
	padding: 0 1.5rem;
	font-size: var(--fs-lg);
	font-family: inherit;
	font-weight: 600;
	cursor: pointer;
	border: 1px solid var(--border-success);
	border-radius: var(--radius);
	background-color: var(--bg-success);
	color: var(--text-primary);
	transition: all 0.2s;
}
input[type="submit"]:hover {
	background-color: var(--bg-inverse);
	color: var(--text-inverse);
	border-color: var(--border-inverse);
}

/* -------------------------------------------------------------------------------
   Login Modal
   ------------------------------------------------------------------------------- */
#login-overlay {
	display: none;
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: rgba(0, 0, 0, 0.6);
	z-index: 10000;
}
#login-modal {
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	background: var(--bg-primary);
	border-radius: calc(var(--radius) * 2);
	padding: 2rem;
	min-width: 320px;
	max-width: 400px;
	width: 90%;
	box-shadow: var(--shadow-lg);
}
#login-modal fieldset {
	border: 1px solid var(--border-secondary);
	border-radius: var(--radius);
	padding: 1rem;
}
#login-modal legend {
	font-size: var(--fs-md);
	font-weight: 600;
	padding: 0 4px;
}
#login-modal label {
	display: block;
	margin-bottom: 2px;
	font-size: var(--fs-lg);
}
#login-modal input[type="text"],
#login-modal input[type="password"],
#login-modal input[type="email"] {
	width: 100%;
	font-size: var(--fs-xl);
}
#login-modal input[type="text"]:focus,
#login-modal input[type="password"]:focus,
#login-modal input[type="email"]:focus {
	box-shadow: 0 0 0 3px rgba(255, 136, 0, 0.15);
}
#login-modal input[type="submit"] {
	width: 100%;
	margin-top: 0.75rem;
	font-size: var(--fs-xl);
}
#login-modal a {
	display: inline-block;
	margin-top: 8px;
	font-size: var(--fs-base);
	color: var(--text-secondary);
}
#login-modal a:hover {
	color: var(--text-hover);
}
.login-links {
	text-align: center;
	margin-top: 10px;
}
.login-links a {
	margin: 0 6px;
}
.login-view {
	display: none;
}
.login-view.active {
	display: block;
}
#login-close {
	position: absolute;
	top: 12px;
	right: 16px;
	font-size: 1.5rem;
	color: var(--text-secondary);
	cursor: pointer;
	line-height: 1;
}
#login-close:hover {
	color: var(--text-hover);
}
#login-msg {
	display: none;
	padding: 0.5rem 0.75rem;
	margin-bottom: 0.75rem;
	border-radius: var(--radius);
	font-size: var(--fs-md);
	text-align: center;
}
#login-msg.login-msg-err {
	background: var(--bg-error);
	border: 1px solid var(--border-error);
	color: var(--text-error);
}
#login-msg.login-msg-ok {
	background: var(--bg-success);
	border: 1px solid var(--border-success);
	color: var(--text-success);
}

/* -------------------------------------------------------------------------------
   Lightbox
   ------------------------------------------------------------------------------- */
.lightbox-overlay {
	display: none;
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: rgba(0, 0, 0, 0.9);
	z-index: 10000;
	justify-content: center;
	align-items: center;
}
.lightbox-overlay.active {
	display: flex;
}
.lightbox-content {
	position: relative;
	max-width: 90vw;
	max-height: 90vh;
	text-align: center;
}
.lightbox-content img {
	max-width: 90vw;
	max-height: 80vh;
	object-fit: contain;
	border-radius: var(--radius);
	box-shadow: 0 0 30px rgba(0, 0, 0, 0.5);
}
.lightbox-title {
	color: var(--text-disabled);
	font-size: var(--fs-lg);
	margin-top: 8px;
}
.lightbox-title a {
	color: var(--text-link);
	text-decoration: none;
	margin-right: 10px;
}
.lightbox-title a:hover {
	text-decoration: underline;
}
.lightbox-close {
	position: absolute;
	top: -40px;
	right: 0;
	color: var(--text-inverse);
	font-size: 32px;
	cursor: pointer;
	line-height: 1;
	width: 36px;
	text-align: center;
}
.lightbox-close:hover {
	color: var(--text-hover);
}
.lightbox-prev,
.lightbox-next {
	position: fixed;
	top: 50%;
	transform: translateY(-50%);
	color: var(--text-inverse);
	font-size: 48px;
	cursor: pointer;
	padding: 10px;
	user-select: none;
	z-index: 10001;
	opacity: 0.6;
	transition: opacity 0.2s, color 0.2s;
}
.lightbox-prev:hover,
.lightbox-next:hover {
	opacity: 1;
	color: var(--text-hover);
}
.lightbox-prev {
	left: 20px;
}
.lightbox-next {
	right: 20px;
}
.lightbox-counter {
	color: var(--text-secondary);
	font-size: var(--fs-base);
	margin-top: 4px;
}

/* ===================================================================
   Tile Layout (Links, Orden, Prunksitzungen, Videos)
   =================================================================== */

.tile-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
	gap: 1rem;
	position: relative;
	padding-top: 8px;
}

.tile-add-btn {
	position: absolute;
	top: -28px;
	right: 0;
}

.tile {
	position: relative;
	text-align: center;
	border-radius: var(--radius);
	border: 1px solid var(--border-primary);
	background: var(--bg-primary);
	overflow: hidden;
	box-shadow: var(--shadow-sm);
}
.tile:hover {
	border-color: var(--border-hover);
}
.tile a {
	display: block;
	text-decoration: none;
	color: var(--text-primary);
}
.tile img {
	display: block;
	width: calc(100% - 1.5rem);
	height: auto;
	aspect-ratio: 1;
	object-fit: contain;
	margin: 0.75rem auto 0;
	border-radius: 0;
}
.tile-name {
	display: block;
	border-top: 1px solid var(--border-primary);
	padding: 0.5rem;
	font-size: var(--fs-base);
	font-weight: 600;
	line-height: 1.3;
	word-break: break-word;
}
.tile-date {
	display: block;
	padding: 0 0.5rem 0.5rem;
	font-size: var(--fs-sm);
	color: var(--text-secondary);
}
.tile-image-wrap {
	position: relative;
}
.tile-date-overlay {
	position: absolute;
	bottom: 6px;
	left: 50%;
	transform: translateX(-50%);
	background: rgba(0,0,0,0.6);
	color: var(--text-inverse);
	font-size: var(--fs-lg);
	font-weight: 700;
	padding: 2px 10px;
	border-radius: 3px;
	white-space: nowrap;
}

/* Tile Action Buttons */
.tile-actions {
	position: absolute;
	top: 4px;
	right: 4px;
	display: none;
	z-index: 2;
}
.tile:hover .tile-actions {
	display: flex;
	gap: 2px;
}
.tile-actions .admin-btn {
	display: flex;
	align-items: center;
	justify-content: center;
	background: rgba(255, 255, 255, 0.85);
	border-radius: 3px;
	color: var(--text-secondary);
}
.tile-actions .admin-btn:hover {
	background: rgba(255, 255, 255, 0.85);
	color: var(--text-hover);
}
.tile-placeholder {
	display: flex;
	align-items: center;
	justify-content: center;
	position: relative;
	width: 100%;
	aspect-ratio: 4/3;
	color: var(--text-inverse);
	font-size: 2rem;
}
.form-hint {
	color: var(--text-disabled);
	font-size: 0.75rem;
}
.tile-hidden {
	opacity: 0.35;
}
.tile-hidden .tile-name,
.tile-hidden .tile-date {
	text-decoration: line-through;
}

/* Video Tile */
.tile-video-link {
	position: relative;
	display: block;
}
.tile-video-play {
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	font-size: 2.5rem;
	color: var(--text-inverse);
	text-shadow: 0 0 15px rgba(0, 0, 0, 0.7);
	pointer-events: none;
	transition: transform 0.2s;
}
.tile:hover .tile-video-play {
	transform: translate(-50%, -50%) scale(1.15);
}

/* Video Modal */
#video-modal-overlay {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: rgba(0, 0, 0, 0.9);
	z-index: 20000;
	display: flex;
	align-items: center;
	justify-content: center;
}
#video-modal {
	max-width: 900px;
	width: 95%;
}
.video-modal-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 0.5rem 0;
	color: var(--text-inverse);
}
.video-modal-title {
	font-size: var(--fs-xl);
	font-weight: 600;
}
.video-modal-close {
	background: none;
	border: none;
	color: var(--text-inverse);
	font-size: 32px;
	cursor: pointer;
	padding: 0 5px;
	transition: color 0.2s;
}
.video-modal-close:hover {
	color: var(--text-hover);
}
.video-modal-body iframe,
.video-modal-body video {
	display: block;
	width: 100%;
	max-height: 80vh;
	aspect-ratio: 16 / 9;
	border-radius: var(--radius);
}

/* Picture Gallery Tiles */
.pic-year-heading {
	margin: 1.5rem 0 0.5rem;
	padding-bottom: 0.3rem;
	border-bottom: 2px solid var(--border-secondary);
	color: var(--text-primary);
	font-size: var(--fs-xl);
}
.pic-year-heading:first-child {
	margin-top: 0.5rem;
}
.pic-grid {
	grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
}
.pic-tile-image {
	display: flex;
	align-items: center;
	justify-content: center;
	position: relative;
	aspect-ratio: 4/3;
	overflow: hidden;
	background: var(--bg-accent);
}
.pic-tile-image::before {
	content: '';
	position: absolute;
	inset: 0;
	background: var(--pic-blur-bg) center/cover no-repeat;
	filter: blur(8px) brightness(0.7);
	transform: scale(1.1);
	z-index: 0;
}
.pic-tile-img-link {
	position: relative;
	z-index: 1;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 100%;
}
.pic-tile-image img {
	max-width: calc(100% - 16px);
	max-height: calc(100% - 16px);
	object-fit: contain;
}
.pic-count {
	position: absolute;
	top: 4px;
	left: 4px;
	z-index: 2;
	background: rgba(0,0,0,0.5);
	color: var(--text-inverse);
	font-size: var(--fs-xs);
	padding: 2px 6px;
	border-radius: 3px;
	pointer-events: none;
}
/* Album-Thumbnails: Cover-Stern + Delete als Overlay */
.pic-thumb .tile-actions {
	top: 4px;
	right: 4px;
}
.pic-set-cover-btn.active {
	color: var(--text-active);
}
.pic-set-cover-btn:hover {
	color: var(--text-hover);
}
.pic-thumb-cover {
	outline: 2px solid var(--border-accent);
	outline-offset: -2px;
}
.pic-thumb-cover .tile-actions {
	display: flex;
	gap: 2px;
}
.pic-thumb-cover .tile-actions .pic-delete-img-btn {
	display: none;
}
.pic-thumb-cover:hover .tile-actions .pic-delete-img-btn {
	display: flex;
}
/* Edit-Modal (nutzt ae-* Klassen vom Article-Editor) */
#pic-edit-overlay {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: rgba(0, 0, 0, 0.5);
	z-index: 20000;
	display: flex;
	align-items: center;
	justify-content: center;
}
#pic-edit-modal {
	background: var(--bg-primary);
	border-radius: var(--radius);
	width: 90%;
	max-width: 500px;
	box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}
.pic-meta {
	display: block;
	padding: 0 0.5rem 0.5rem;
	font-size: var(--fs-sm);
	color: var(--text-secondary);
}
.pic-album-grid {
	grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
}
.pic-thumb-image {
	display: flex;
	align-items: center;
	justify-content: center;
	position: relative;
	aspect-ratio: 4/3;
	overflow: hidden;
	background: var(--bg-accent);
}
.pic-thumb-image a {
	position: relative;
	z-index: 1;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 100%;
}
.pic-thumb img {
	max-width: 100%;
	max-height: 100%;
	object-fit: contain;
	cursor: pointer;
}
.pic-album-meta {
	color: var(--text-secondary);
	font-size: var(--fs-base);
	margin-left: 0.5rem;
}

/* Tile Editor Modal */
#tile-editor-overlay {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: rgba(0, 0, 0, 0.6);
	z-index: 20000;
	display: flex;
	align-items: center;
	justify-content: center;
}
#tile-editor-modal {
	text-align: left;
	background: var(--bg-primary);
	border-radius: calc(var(--radius) * 2);
	width: 90%;
	max-width: 600px;
	max-height: 90vh;
	display: flex;
	flex-direction: column;
	box-shadow: var(--shadow-lg);
}
.te-input {
	width: 100%;
	padding: 0.5rem 0.6rem;
	font-size: var(--fs-lg);
	border: 1px solid var(--border-secondary);
	border-radius: var(--radius);
	box-sizing: border-box;
	transition: border-color 0.2s;
}
.te-input:focus {
	border-color: var(--border-focus);
	outline: none;
	box-shadow: 0 0 0 3px rgba(255, 136, 0, 0.15);
}
.te-textarea {
	width: 100%;
	padding: 0.5rem 0.6rem;
	font-size: var(--fs-md);
	border: 1px solid var(--border-secondary);
	border-radius: var(--radius);
	box-sizing: border-box;
	resize: vertical;
	transition: border-color 0.2s;
}
.te-textarea:focus {
	border-color: var(--border-focus);
	outline: none;
	box-shadow: 0 0 0 3px rgba(255, 136, 0, 0.15);
}

/* Tile Editor Status */
#te-status {
	flex: 1;
	font-size: var(--fs-md);
}
/* ===============================================================================
   Admin Page Styles
   =============================================================================== */

.admin-section {
	margin-bottom: 1.5rem;
}
.admin-section h3 {
	padding: 0.5rem 0;
	border-bottom: 1px solid var(--border-primary);
	margin-bottom: 0.75rem;
}
.counter-grid {
	display: grid;
	grid-template-columns: repeat(6, 1fr);
	gap: 10px;
}
.counter-tile {
	display: flex;
	flex-direction: column;
	align-items: center;
	background: color-mix(in srgb, var(--bg-content) 92%, transparent);
	border: 1px solid var(--border-color);
	border-radius: 6px;
	padding: 12px 8px;
	text-align: center;
}
.counter-val {
	font-size: 1.4rem;
	font-weight: bold;
	color: var(--text-heading);
	line-height: 1.2;
}
.counter-lbl {
	font-size: var(--fs-xs);
	color: var(--text-secondary);
	margin-top: 2px;
}
.counter-prev {
	font-size: var(--fs-xs);
	color: var(--text-secondary);
	opacity: 0.6;
	margin-top: 6px;
	border-top: 1px solid var(--border-color);
	padding-top: 4px;
	width: 100%;
}
@media (max-width: 768px) {
	.counter-grid { grid-template-columns: repeat(3, 1fr); }
}
.admin-nav {
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem;
}
.admin-nav a {
	display: flex;
	flex-direction: column;
	align-items: center;
	text-align: center;
	padding: 0;
	width: 150px;
	min-height: 80px;
	background: color-mix(in srgb, var(--bg-content) 92%, transparent);
	border: 1px solid var(--border-primary);
	border-radius: var(--radius);
	text-decoration: none;
	transition: all 0.2s;
	box-shadow: var(--shadow-sm);
	overflow: hidden;
}
.admin-nav a:hover {
	border-color: var(--border-hover);
}
.admin-nav a strong {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	flex: 1;
	padding: 0.5rem;
	color: var(--text-heading);
	font-size: var(--fs-md);
	font-weight: 700;
	border-bottom: 1px solid var(--border-primary);
	word-break: break-word;
}
.admin-nav a span {
	display: block;
	width: 100%;
	padding: 0.25rem 0.5rem;
	font-size: var(--fs-xs);
	color: var(--text-secondary);
}
.admin-back {
	margin: 8px 0 0 0;
	padding: 0;
}
.admin-back a {
	font-size: var(--fs-sm);
	color: var(--text-secondary);
	text-decoration: none;
}
.admin-back a:hover {
	color: var(--text-hover);
}

/* ===============================================================================
   Admin Tableview
   =============================================================================== */

.admin-page {
	position: relative;
}
.admin-page .btn-add {
	position: absolute;
	top: 8px;
	right: 0;
}
.admin-page aside {
	display: none;
}
.admin-page section {
	margin-right: 0;
	min-height: calc(100vh - 100px);
}
.tableview {
	width: 100%;
	border-collapse: collapse;
	font-size: var(--fs-sm);
}
.tableview th,
.tableview td,
.content-area .tableview td,
.content-area .tableview th {
	text-align: left;
	vertical-align: middle;
	border-bottom: 1px solid var(--border-primary);
	padding: 4px 6px;
}
.tableview thead th {
	background: var(--bg-secondary);
	font-weight: bold;
	white-space: nowrap;
}
.tableview thead th a {
	color: var(--text-primary);
	text-decoration: none;
}
.tableview thead th a:hover {
	color: var(--text-heading);
}
.tableview tbody tr:hover {
	background: var(--bg-hover);
}
.tableview tbody tr.markline:nth-child(even) {
	background: var(--bg-secondary);
}
.tableview tfoot td {
	background: var(--bg-secondary);
	border-top: 2px solid var(--border-primary);
}
.tableview-check,
.content-area .tableview .tableview-check { width: 24px; min-width: 24px; text-align: center; padding: 4px 2px; }
.tableview-small { width: 40px; min-width: 40px; }
.tableview-actions { width: 50px; min-width: 50px; white-space: nowrap; }
.tableview-actions button + button { margin-left: 4px; }
.tableview input[type="number"] { width: 50px; }
.tableview-medium { width: 80px; min-width: 80px; }
.tableview-large { width: 140px; min-width: 140px; }
.tableview-xlarge { width: 200px; min-width: 200px; }
.status-groupname { font-size: 0.8em; color: var(--text-secondary); }
.status-badge { display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; border-radius: 3px; font-size: var(--fs-sm); font-weight: 500; color: #fff; }
.tableview-2xlarge { width: 280px; min-width: 280px; }
.tableview input[type="text"],
.tableview input[type="date"],
.tableview input[type="datetime-local"],
.tableview input[type="number"],
.tableview select,
.tableview textarea {
	width: 100%;
	height: auto;
	line-height: normal;
	padding: 3px 4px;
	margin: 0;
	font-size: var(--fs-sm);
	border: 1px solid var(--border-primary);
	border-radius: 3px;
	box-sizing: border-box;
}
.tableview select {
	-webkit-appearance: auto;
	appearance: auto;
	background-image: none;
}
.tableview textarea {
	min-height: 50px;
	resize: vertical;
}
.tableview input[type="checkbox"] {
	width: auto;
}
.tableview input[type="color"] {
	width: 40px;
	height: 28px;
	padding: 1px;
	cursor: pointer;
}
.tableview .readonly {
	color: var(--text-secondary);
	font-style: italic;
}
.tableview-row-saving {
	opacity: 0.6;
}
.tableview-row-saved {
	background: var(--bg-success) !important;
}
.tableview-row-error {
	background: var(--bg-error) !important;
}
.button {
	display: inline-block;
	padding: 4px 10px;
	border: 1px solid var(--border-primary);
	border-radius: 3px;
	cursor: pointer;
	font-size: var(--fs-sm);
	background: var(--bg-secondary);
	text-decoration: none;
	color: var(--text-primary);
}
.button:hover {
	background: var(--bg-hover);
}
.button_sm,
a.button_sm {
	width: 22px;
	height: 22px;
	padding: 0;
	font-size: 12px;
	line-height: 22px;
	text-align: center;
}
.button_success {
	background: var(--bg-success);
	color: var(--text-inverse);
	border-color: var(--border-success);
}
.button_success:hover {
	filter: brightness(0.7);
}
.button_error {
	background: var(--bg-error);
	color: var(--text-inverse);
	border-color: var(--border-error);
}
.button_error:hover {
	filter: brightness(0.7);
}
.tableview-pager {
	margin: 8px 0;
	font-size: var(--fs-sm);
}
.tableview-pager a {
	display: inline-block;
	padding: 3px 8px;
	margin: 0 2px;
	border: 1px solid var(--border-primary);
	border-radius: 3px;
	text-decoration: none;
	color: var(--text-primary);
}
.tableview-pager a.active {
	background: var(--bg-active);
	color: var(--text-active);
	border-color: var(--border-active);
}
.tableview-offset-select {
	margin-left: 10px;
	padding: 3px 6px;
	font-size: var(--fs-sm);
	height: auto;
	line-height: normal;
	min-width: 120px;
}
#tableview-filter-row th {
	background: var(--bg-secondary);
}
#tableview-filter-row input,
#tableview-filter-row select {
	width: 100% !important;
	min-width: 0 !important;
	height: auto;
	line-height: normal;
	font-size: var(--fs-sm);
	padding: 3px 4px;
	margin: 0;
	border: 1px solid var(--border-primary);
	border-radius: 3px;
	box-sizing: border-box;
}
#tableview-filter-row select {
	-webkit-appearance: auto;
	appearance: auto;
	background-image: none;
}
/* Profil-Seite */
.profile-grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 1.5rem;
	align-items: stretch;
}
.profile-card {
	background: color-mix(in srgb, var(--bg-content) 92%, transparent);
	border: 1px solid var(--border-color);
	border-radius: 6px;
	padding: 1.2rem 1.5rem;
}
.profile-card h3 { margin: 0 0 0.8rem 0; font-size: var(--fs-base); }
.profile-card h4 { margin: 1rem 0 0.5rem 0; font-size: var(--fs-sm); color: var(--text-secondary); }
.profile-table { border-collapse: collapse; width: 100%; }
.profile-table th { text-align: left; padding: 4px 1rem 4px 0; color: var(--text-secondary); font-weight: normal; white-space: nowrap; }
.profile-table td { padding: 4px 0; }
.profile-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.profile-tag {
	display: inline-block;
	background: var(--bg-sidebar);
	border: 1px solid var(--border-color);
	border-radius: 3px;
	padding: 2px 8px;
	font-size: var(--fs-xs);
	color: var(--text-secondary);
	cursor: default;
	transition: background 0.15s, color 0.15s;
}
.profile-tag:hover { background: var(--bg-hover); color: var(--text-hover); border-color: var(--border-hover); }
.profile-card .form-footer { justify-content: flex-end; }
.profile-msg { margin-left: 8px; font-size: var(--fs-sm); }
.profile-divider { border: none; border-top: 1px solid var(--border-color); margin: 1.2rem 0; }
@media (max-width: 768px) {
	.profile-grid { grid-template-columns: 1fr; }
}

.migration-applied { color: var(--text-success); font-weight: bold; }
.migration-pending { color: var(--text-error); font-weight: bold; }
.migration-msg { padding: 8px 12px; margin: 8px 0; border-radius: 3px; }
.migration-msg.success { background: var(--bg-success); color: var(--text-success); border: 1px solid var(--border-success); }
.migration-msg.error { background: var(--bg-error); color: var(--text-error); border: 1px solid var(--border-error); }
.migration-sql { background: var(--bg-secondary); border: 1px solid var(--border-primary); padding: 10px; font-size: 12px; overflow-x: auto; white-space: pre-wrap; }

/* ===============================================================================
   Article Editor
   =============================================================================== */

.article-block {
	position: relative;
}
.article-edit-btn {
	position: absolute;
	top: 8px;
	right: 0;
}
#ae-headline {
	width: 100%;
	padding: 6px 8px;
	font-size: var(--fs-md);
	border: 1px solid var(--border-primary);
	border-radius: 4px;
	box-sizing: border-box;
}
.news-block {
	position: relative;
}
.news-actions {
	position: absolute;
	top: 8px;
	right: 0;
}
.news-block.archived {
	opacity: 0.5;
}
.shortnews {
	position: relative;
}
.news-create-btn {
	margin-left: auto;
}
/* ===============================================================================
   TinyMCE Editor Styles
   =============================================================================== */
.tox-tinymce-aux { z-index: 20200 !important; }
.tox-dialog-wrap { z-index: 20300 !important; }

.mce-content-body {
	font-family: Arial, Helvetica, sans-serif;
	font-size: 14px;
	line-height: 1.5;
	padding: 10px;
}
.mce-content-body h1 { font-size: 1.6em; padding: 0.5em 0; }
.mce-content-body h2 { font-size: 1.4em; padding: 0.5em 0; }
.mce-content-body h3 { font-size: 1.2em; padding: 0.4em 0; }
.mce-content-body h4 { font-size: 1.1em; padding: 0.3em 0; }
.mce-content-body h5 { font-size: 1.0em; padding: 0.3em 0; }
.mce-content-body pre { background: #f5f5f5; padding: 8px; border-radius: 4px; font-family: monospace; font-size: 0.9em; }
.mce-content-body p { margin: 0.3em 0; }
.mce-content-body img { max-width: 100%; }
.mce-content-body img.img-left,
.article-content img.img-left,
.news-content img.img-left { float: left; margin: 0 15px 10px 0; }
.mce-content-body img.img-right,
.article-content img.img-right,
.news-content img.img-right { float: right; margin: 0 0 10px 15px; }
.mce-content-body img.img-center,
.article-content img.img-center,
.news-content img.img-center { display: block; margin: 10px auto; float: none; }
.mce-content-body table { border-collapse: collapse; }
.mce-content-body table td,
.mce-content-body table th { border: 1px solid #ccc; padding: 4px 8px; }

/* ===============================================================================
   Theme Editor
   =============================================================================== */

.editor-list {
	margin-bottom: 20px;
}
.editor-list table {
	width: 100%;
	border-collapse: collapse;
	font-size: var(--fs-md);
}
.editor-list th,
.editor-list td {
	padding: 6px 10px;
	text-align: left;
	border-bottom: 1px solid var(--border-primary);
}
.editor-list td:last-child {
	text-align: right;
}
.editor-list th {
	font-weight: bold;
	font-size: var(--fs-sm);
	color: var(--text-accent);
	border-bottom: 2px solid var(--border-secondary);
}
.editor-list select {
	border: 1px solid var(--border-secondary);
	border-radius: 3px;
	padding: 1px 4px;
	font-size: var(--fs-xs);
	height: 24px;
	line-height: 24px;
	cursor: pointer;
	background: var(--bg-primary);
	-webkit-appearance: auto;
	appearance: auto;
}
.te-status-select { width: 100px; }
.te-status-select.te-active {
	color: var(--text-success);
	font-weight: bold;
}
.te-status-select.te-auto {
	color: var(--text-heading);
	font-weight: bold;
}
.te-status-select.te-testing {
	color: var(--text-link);
	font-weight: bold;
}
.te-status-select.te-inactive {
	color: var(--text-disabled);
}
.editor-list .te-date {
	white-space: nowrap;
}
.editor-list .col-id { width: 40px; }
.editor-list .col-narrow { width: 70px; }
.editor-list .col-medium { width: 130px; }
.editor-list .col-meta {
	font-size: var(--fs-xs);
	color: var(--text-secondary);
}
.editor-list .col-actions {
	white-space: nowrap;
}
.editor-field.grow-2 {
	flex: 2;
	min-width: 140px;
}
.editor-row .editor-field.shrink {
	flex: 0 0 auto;
	min-width: 0;
}
.editor-field .upload-row {
	display: flex;
	gap: 6px;
	align-items: center;
}
.editor-body hr {
	border: none;
	border-top: 1px solid var(--border-primary);
	margin: 12px 0;
}
.te-section {
	margin-bottom: 16px;
	border: 1px solid var(--border-primary);
	border-radius: 4px;
}
.te-section-header {
	display: flex;
	align-items: center;
	padding: 8px 12px;
	background: var(--bg-secondary);
	cursor: pointer;
	font-weight: bold;
	font-size: var(--fs-md);
	user-select: none;
}
.te-section-header:hover {
	background: var(--bg-hover);
}
.te-section-header .te-toggle {
	margin-right: 8px;
	transition: transform 0.2s;
	font-size: 10px;
}
.te-section.collapsed .te-section-body {
	display: none;
}
.te-section.collapsed .te-toggle {
	transform: rotate(-90deg);
}
.te-section-body {
	padding: 12px;
}
.editor-field input[type="text"],
.editor-field input[type="date"],
.editor-field input[type="number"],
.editor-field select {
	width: 100%;
	box-sizing: border-box;
}
.editor-field input[type="number"] {
	width: 80px;
}
.te-color-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
	gap: 8px;
}
.te-color-item {
	display: flex;
	align-items: center;
	gap: 6px;
}
.te-color-item label {
	font-size: var(--fs-xs);
	color: var(--text-primary);
	min-width: 80px;
}
.te-color-item input[type="color"] {
	width: 32px;
	height: 26px;
	padding: 0;
	border: 1px solid var(--border-secondary);
	border-radius: 3px;
	cursor: pointer;
}
.te-color-item input[type="text"] {
	width: 80px;
	height: auto;
	line-height: normal;
	padding: 2px 6px;
	font-size: var(--fs-xs);
	font-family: monospace;
	border: 1px solid var(--border-secondary);
	border-radius: 3px;
}
.te-color-reset,
.te-size-reset {
	background: none;
	border: none;
	color: var(--text-disabled);
	cursor: pointer;
	font-size: 12px;
	padding: 0 2px;
}
.te-color-reset:hover,
.te-size-reset:hover {
	color: var(--text-error);
}
.te-upload {
	display: flex;
	align-items: center;
	gap: 10px;
	margin-bottom: 8px;
}
.te-image-grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 16px;
}
.te-image-block {
	display: flex;
	flex-direction: column;
	gap: 6px;
}
.te-image-block label {
	font-weight: bold;
	font-size: var(--fs-sm);
}
.te-image-preview-wrap {
	width: 100%;
	aspect-ratio: 16/9;
	border: 1px solid var(--border-secondary);
	border-radius: 4px;
	background: var(--bg-secondary);
	display: flex;
	align-items: center;
	justify-content: center;
	overflow: hidden;
}
.te-image-preview-wrap .te-upload-preview {
	width: 100%;
	height: 100%;
	object-fit: cover;
}
.te-image-placeholder {
	color: var(--text-disabled);
	font-size: 2rem;
}
.te-image-actions {
	display: flex;
	align-items: center;
	gap: 8px;
}
.te-upload-btn {
	padding: 4px 12px;
	font-size: var(--fs-sm);
	background: var(--bg-secondary);
	border: 1px solid var(--border-secondary);
	border-radius: 4px;
	cursor: pointer;
}
.te-upload-btn:hover {
	background: var(--bg-hover);
}
.te-upload-name {
	font-size: var(--fs-xs);
	color: var(--text-accent);
}
#te-msg {
	margin-right: auto;
}

/* -------------------------------------------------------------------------------
   Editor-Fieldsets (kompakte Sektionen in Modals)
   ------------------------------------------------------------------------------- */
.editor-body fieldset {
	border: 1px solid var(--border-color);
	border-radius: var(--radius);
	padding: 8px 12px 4px;
	margin-bottom: 8px;
}
.editor-body fieldset legend {
	font-size: var(--fs-xs);
	font-weight: bold;
	color: var(--text-accent);
	padding: 0 6px;
}
.editor-body fieldset .editor-row {
	margin-bottom: 6px;
}
.editor-body fieldset table {
	width: 100%;
	font-size: var(--fs-sm);
}
.editor-body--scroll {
	max-height: 70vh;
	overflow-y: auto;
}

/* -------------------------------------------------------------------------------
   Kalender-Abo (calendar_subscribe.inc.php)
   ------------------------------------------------------------------------------- */
.cal-row {
	display: flex;
	align-items: flex-start;
	gap: 1.5rem;
	margin-bottom: 1.5rem;
}
.cal-row > .ms-parent,
.cal-row > .cal-buttons {
	flex-shrink: 0;
	width: 280px !important;
}
.cal-subscribe .ms-parent .ms-choice {
	display: none;
}
.cal-subscribe .ms-parent .ms-drop {
	position: relative;
	display: block !important;
	top: 0;
	border: 1px solid var(--border-primary);
	border-radius: var(--radius);
}
.cal-row > p {
	flex: 1;
	margin: 0;
	line-height: 1.5;
}
/* multipleSelect Dropdown: Abstand zwischen Eintraegen */
.cal-subscribe .ms-drop ul > li label {
	padding: 0.4rem 0.6rem;
}
.cal-subscribe .ms-drop ul > li + li {
	border-top: 1px solid var(--border-primary);
}
.cal-buttons {
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
}
.cal-btn {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	padding: 0.6rem 1rem;
	background: color-mix(in srgb, var(--bg-content) 92%, transparent);
	border: 1px solid var(--border-primary);
	border-radius: var(--radius);
	text-decoration: none;
	transition: all 0.2s;
	box-shadow: var(--shadow-sm);
}
.cal-btn:hover {
	border-color: var(--border-hover);
}
.cal-btn i {
	font-size: 1.5rem;
	color: var(--text-primary);
	flex-shrink: 0;
	width: 2rem;
	text-align: center;
}
.cal-btn strong {
	font-size: var(--fs-md);
	color: var(--text-primary);
	white-space: nowrap;
}
.cal-btn small {
	font-size: var(--fs-xs);
	color: var(--text-secondary);
	font-weight: normal;
}
.cal-warning {
	color: var(--text-error, #c00);
	margin-top: 0;
}

/* -------------------------------------------------------------------------------
   Raumbelegungsplan
   ------------------------------------------------------------------------------- */
.rp-nav {
	display: flex;
	align-items: center;
	gap: 6px;
}
.rp-break {
	display: none;
}
/* Wochenansicht */
.roomplan-week {
	display: grid;
	grid-template-columns: 50px repeat(7, 1fr);
	border: 1px solid var(--border-primary);
	border-radius: var(--radius);
	overflow: hidden;
}
.rp-corner {
	background: var(--bg-secondary);
	border-bottom: 1px solid var(--border-primary);
	border-right: 1px solid var(--border-primary);
}
.rp-day-header {
	text-align: center;
	padding: 0.3rem;
	background: var(--bg-secondary);
	border-bottom: 1px solid var(--border-primary);
	border-right: 1px solid var(--border-primary);
	font-weight: bold;
	font-size: var(--fs-sm);
}
.rp-day-header:last-child { border-right: none; }
.rp-day-header.rp-today { background: var(--bg-highlight); }
.rp-time-label {
	padding: 0.2rem 0.3rem;
	font-size: var(--fs-xs);
	color: var(--text-secondary);
	text-align: right;
	border-right: 1px solid var(--border-primary);
	border-bottom: 1px solid var(--border-primary);
	background: var(--bg-secondary);
}
.rp-slot {
	position: relative;
	min-height: 2.5rem;
	border-right: 1px solid var(--border-primary);
	border-bottom: 1px solid var(--border-primary);
}
.rp-slot:nth-child(8n) { border-right: none; }
.rp-slot.rp-today { background: color-mix(in srgb, var(--bg-highlight) 30%, transparent); }
.rp-slot-fulltime { min-height: 1.5rem; }
.rp-event {
	position: absolute;
	left: 1px;
	right: 1px;
	border-radius: 3px;
	padding: 1px 4px;
	font-size: var(--fs-xs);
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	z-index: 1;
	background: color-mix(in srgb, var(--bg-header) 20%, var(--bg-primary));
	border-left: 3px solid var(--border-inverse);
	color: var(--text-primary);
	cursor: default;
}
.rp-event.blocking {
	background: repeating-linear-gradient(45deg, #eee, #eee 4px, #ddd 4px, #ddd 8px);
	border-left-color: var(--border-secondary);
	color: var(--text-secondary);
}
.rp-slot-fulltime .rp-event {
	position: relative;
	margin: 1px;
}
.rp-event-time {
	font-weight: bold;
	font-size: var(--fs-2xs);
}
.rp-event-name {
	font-size: var(--fs-2xs);
}
.rp-event-group {
	font-size: var(--fs-2xs);
	color: var(--text-secondary);
	font-style: italic;
}

/* Monatsansicht */
.roomplan-month {
	display: grid;
	grid-template-columns: repeat(7, 1fr);
	border: 1px solid var(--border-primary);
	border-radius: var(--radius);
	overflow: hidden;
}
.roomplan-month .rp-day-header {
	font-size: var(--fs-xs);
	padding: 0.2rem;
}
.rp-day-cell {
	height: 4rem;
	border-right: 1px solid var(--border-primary);
	border-bottom: 1px solid var(--border-primary);
	padding: 0.2rem;
	font-size: var(--fs-xs);
	overflow: hidden;
}
.rp-day-cell:nth-child(7n) { border-right: none; }
.rp-day-cell.rp-today { background: var(--bg-highlight); }
.rp-day-cell.rp-day-empty { background: var(--bg-secondary); }
.rp-day-num {
	font-weight: bold;
	font-size: var(--fs-sm);
	display: block;
	margin-bottom: 2px;
}
.rp-event-bar {
	display: block;
	font-size: var(--fs-2xs);
	padding: 1px 3px;
	margin: 1px 0;
	border-radius: 2px;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	background: color-mix(in srgb, var(--bg-header) 20%, var(--bg-primary));
	border-left: 2px solid var(--border-inverse);
}
.rp-event-bar.blocking {
	background: #eee;
	border-left-color: var(--border-secondary);
	color: var(--text-secondary);
}

/* Jahresansicht */
.roomplan-year {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 1rem;
}
.rp-mini-month {
	border: 1px solid var(--border-primary);
	border-radius: var(--radius);
	padding: 0.4rem;
}
.rp-mini-title {
	font-weight: bold;
	font-size: var(--fs-sm);
	text-align: center;
	margin-bottom: 0.3rem;
}
.rp-mini-header {
	display: grid;
	grid-template-columns: repeat(7, 1fr);
	text-align: center;
	font-size: var(--fs-2xs);
	color: var(--text-secondary);
	margin-bottom: 2px;
}
.rp-mini-grid {
	display: grid;
	grid-template-columns: repeat(7, 1fr);
	text-align: center;
}
.rp-mini-day {
	font-size: var(--fs-2xs);
	padding: 2px;
	cursor: pointer;
	border-radius: 2px;
	text-decoration: none;
	color: var(--text-primary);
}
.rp-mini-day:hover { background: var(--bg-secondary); }
.rp-mini-day.empty { visibility: hidden; }
.rp-mini-day.today { font-weight: bold; outline: 1px solid var(--border-accent); }
.rp-mini-day.busy { background: color-mix(in srgb, var(--bg-header) 25%, var(--bg-primary)); }
.rp-mini-day.blocked { background: var(--bg-accent); color: var(--text-secondary); }

/* ===============================================================================
   RESPONSIVE BREAKPOINTS
   =============================================================================== */

/* --- Tablet (<=1024px) --- */
@media screen and (max-width: 1024px) {
	/* index.php */
	.site-content {
		grid-template-columns: 1fr;
		padding: 1rem;
		gap: 1.5rem;
	}
	.sidebar {
		display: grid;
		grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
		gap: 1rem;
	}
	#main-nav > ul > li > a,
	#main-nav .nav-group {
		padding: 0 0.8rem;
		font-size: 0.9rem;
	}
	.tile-grid {
		grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
	}
	.header-logo img {
		height: 75px;
	}
	.header-inner {
		gap: 0.75rem;
	}
}

/* --- Mobile Landscape: Raumplan Umbruch vor Ansicht --- */
@media screen and (max-width: 1024px) and (orientation: landscape) {
	.roomplan-container .filter { flex-wrap: wrap; }
	.rp-break {
		display: block;
		flex-basis: 100%;
		height: 0;
	}
}

/* --- Mobile (<=768px) --- */
@media screen and (max-width: 768px) {
	/* Raumplan responsive */
	.roomplan-container .filter { flex-wrap: wrap; }
	.rp-break {
		display: block;
		flex-basis: 100%;
		height: 0;
	}
	.roomplan-week { overflow-x: auto; }
	.roomplan-year { grid-template-columns: repeat(2, 1fr); }

	/* Kalender-Abo: Text ueber statt neben Element */
	.cal-row {
		flex-direction: column-reverse;
		gap: 0.75rem;
	}
	.cal-row > .ms-parent,
	.cal-row > .cal-buttons {
		width: 100%;
	}
	header {
		padding: 0.5rem 0.75rem;
	}
	.header-inner {
		gap: 0.5rem;
	}
	.header-logo img {
		height: 60px;
	}
	.logo {
		white-space: normal;
		overflow: visible;
	}
	.header-hamburger-spacer {
		display: block;
		flex-shrink: 0;
		width: 42px;
	}
	.content-area h1 {
		font-size: 1.4rem;
	}
	.content-area h2 {
		font-size: 1.2rem;
	}

	/* Icon-Menue auf Mobile: nicht mehr rechts, sondern normaler Eintrag */
	#main-nav > ul > .nav-icon:last-child {
		margin-left: 0;
	}
	.nav-gear-ring {
		display: none;
	}
	.nav-icon-label {
		display: inline;
	}
	.nav-icon .fas {
		display: none;
	}

	/* Hamburger sichtbar */
	#hamburger {
		display: block;
	}

	/* Navigation: versteckt, vertikal, rechtsbuendig 75% */
	#main-nav {
		display: none;
		position: fixed;
		top: 0;
		right: 0;
		width: 75%;
		max-width: 320px;
		background: var(--bg-menu);
		z-index: 1050;
		overflow-y: auto;
		max-height: 100vh;
		padding: 60px 0 1rem;
		box-shadow: -4px 0 12px rgba(0,0,0,0.3);
		border-bottom-left-radius: var(--radius);
	}
	#main-nav.open {
		display: block;
	}
	#main-nav > ul {
		flex-direction: column;
		align-items: stretch;
	}
	#main-nav > ul > li {
		border-bottom: 1px solid rgba(255,255,255,0.15);
	}
	#main-nav > ul > li > a,
	#main-nav .nav-group {
		padding: 0.55rem 1.2rem;
		font-size: 1rem;
	}

	/* Dropdowns auf Mobile: immer sichtbar unter dem Elternelement */
	#main-nav .dropdown {
		position: static;
		display: none;
		background: rgba(0,0,0,0.1);
		border: none;
		border-radius: 0;
		box-shadow: none;
		padding: 0;
	}
	#main-nav .has-dropdown:hover .dropdown,
	#main-nav .has-dropdown:focus-within .dropdown {
		display: block;
	}
	#main-nav .dropdown li a {
		color: var(--text-inverse);
		padding: 0.45rem 1.2rem 0.45rem 2rem;
	}
	#main-nav .dropdown li a:hover {
		background: rgba(0,0,0,0.1);
		color: var(--text-inverse);
	}

	/* Sub-Dropdowns auf Mobile: unterhalb, eingerueckt */
	#main-nav .subdropdown {
		position: static;
		display: none;
		background: rgba(0,0,0,0.1);
		border: none;
		border-radius: 0;
		box-shadow: none;
		padding: 0;
		min-width: 0;
	}
	#main-nav .has-subdropdown:hover > .subdropdown {
		display: block;
	}
	#main-nav .subdropdown li a {
		padding-left: 3rem;
	}
	#main-nav .nav-subgroup {
		color: var(--text-inverse);
		padding: 0.45rem 1.2rem 0.45rem 2rem;
	}
	#main-nav .nav-subgroup::after {
		content: '\25BC';
	}

	.tile-grid {
		grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
		gap: 0.5rem;
	}

	.editor-row {
		grid-template-columns: 1fr;
	}

	.editor-body .form-row {
		grid-template-columns: 1fr;
		gap: 4px;
	}

	.datetime-wrap {
		grid-template-columns: 1fr;
	}
	.editor-body .datetime-row {
		grid-template-columns: 1fr;
	}

	ul.status {
		grid-template-columns: 40px 1fr 120px;
	}

	div.all_pictures a {
		width: 100px;
	}

	div.description,
	div.links div.description,
	div.lists div.description,
	div.orden div.description {
		margin-left: 0;
		clear: both;
		padding-top: 0.5rem;
	}
	div.links img,
	div.orden img,
	div.lists img {
		float: none;
		display: block;
		margin: 0 auto 0.5rem;
	}

	.schedule-table .row {
		grid-template-columns: 36px 1fr 80px;
	}

	#video-modal {
		width: 98%;
	}

	/* Mobile Reihenfolge: Termine > Neuigkeiten > Bilder > Countdown */
	.site-content:not(.admin-content) {
		display: flex;
		flex-direction: column;
		gap: 1rem;
	}
	.sidebar {
		display: contents;
	}
	.content-area { order: 2; }
	#schedules { order: 1; }
	#pictures { order: 3; }
	#countdown { order: 4; }

	/* Sidebar auf Unterseiten ausblenden */
	.subpage .sidebar {
		display: none;
	}
}

/* --- Small Mobile (<=480px) --- */
@media screen and (max-width: 480px) {
	.header-logo img {
		height: 40px;
	}

	.tile-grid {
		grid-template-columns: repeat(2, 1fr);
		gap: 0.5rem;
	}

	.admin-nav a {
		width: 120px;
	}

	.schedule-table .row {
		grid-template-columns: 1fr;
		gap: 2px;
	}
	.schedule-table .cell.icon {
		display: none;
	}
	.schedule-table .cell.actions {
		text-align: left;
	}
}
/* ---- Audit-Log Viewer ---- */
.log-badge {
	display: inline-block;
	padding: 0.15rem 0.4rem;
	border-radius: 3px;
	font-size: 0.75rem;
	font-weight: 500;
	color: #fff;
}
.log-badge-auth { background: var(--bg-inverse); color: var(--text-inverse); }
.log-badge-admin { background: var(--bg-error); color: var(--text-error); }
.log-badge-schedule { background: var(--bg-success); color: var(--text-success); }
.log-badge-content { background: var(--bg-highlight); color: var(--text-active); }
.log-badge-config { background: var(--bg-disabled); color: var(--text-disabled); }
.log-badge-user { background: var(--bg-menu); color: var(--text-menu); }
.log-badge-import { background: var(--bg-accent); color: var(--text-primary); }
.log-details pre {
	margin: 0;
	white-space: pre-wrap;
	word-break: break-word;
	font-size: var(--fs-sm);
}
.log-group-trigger {
	cursor: pointer;
}
.log-group-trigger:hover {
	background: var(--bg-table-hover);
}
.log-arrow-cell {
	text-align: right !important;
	width: 50px !important;
	min-width: 50px !important;
}
.log-group-info {
	white-space: nowrap;
	font-size: var(--fs-sm);
	color: var(--text-secondary);
	cursor: pointer;
}
.log-group-info i {
	display: inline-block;
	margin-left: 4px;
	color: var(--text-disabled);
	transition: color 0.15s;
}
.log-group-info:hover i {
	color: var(--text-hover);
}
