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


/* Bild-Overlay über Video und Hintergrund */
body::before {
	content: "";
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: url('../img/bg.jpg') center center / cover no-repeat;
	opacity: 0.2;
	pointer-events: none;
	z-index: 0;
}

/* Hintergrund */
body {
	margin: 0;
	padding: 75px;
	font-family: 'Roboto', Arial, sans-serif;
	background:
		url('../img/asfalt-dark.png'),
		linear-gradient(130deg,
		rgb(254, 8, 11),
		rgb(195, 6, 9) 15%,
		rgb(138, 4, 6) 30%,
		rgb(80, 1, 2) 45%,
		rgb(37, 0, 0) 55%,
		rgb(12, 0, 0) 70%,
		rgb(4, 0, 0) 85%,
		rgb(0, 0, 0) 100%
	);
	background-attachment: fixed;
	background-repeat: repeat;
	background-size: cover;
	color: #000;
	text-align: center;
	width: 100%;
}

/* Container zentrieren */
.login-container {
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	z-index: 1;
	width: 100%;
	max-width: 360px;
	padding: 2rem;
	background: rgba(255, 255, 255, 1);
	border: 1px solid rgba(0, 0, 0, 0.15);
	backdrop-filter: blur(8px);
	border-radius: 8px;
	box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

/* Überschrift */
.login-container h1 {
	text-align: center;
	font-size: 1.75rem;
	margin-bottom: 1.5rem;
	color: #8A0406;
}

/* Fehlermeldung */
.msg-container {
	margin: 1em 0;
}
.msg-container h3 {
	font-size: 20px;
	margin-bottom: 1em;
}
.msg-container .msg {
	padding: 0.75em 1em;
	border-radius: 4px;
	margin-bottom: 0.5em;
	font-weight: normal;
	font-size: 14px;
}
.msg-container .msg-error {
	background: #c00;
	color: #fff;
}
.msg-container .msg-success {
	background: #080;
	color: #000;
}
.msg-container .msg-info {
	background: #006;
	color: #000;
}
.msg-container .msg-warning {
	background: #c60;
	color: #000;
}

/* Formularelemente */
.login-container form div {
	margin-bottom: 1rem;
}

.login-container label {
	display: block;
	font-weight: 600;
	margin-bottom: 0.125rem;
	color: #000;
	text-align: left;
}

.login-container input[type="text"],
.login-container input[type="password"] {
	width: 100%;
	padding: 0.5rem 0.75rem;
	border: 1px solid #ccc;
	border-radius: 4px;
	font-size: 1rem;
}

/* Fokus-Styling */
.login-container input:focus {
	border-color: #8A0406;
	outline: none;
	box-shadow: 0 0 0 3px rgba(138,4,6,0.2);
}

/* Button */
.login-container button {
	width: 100%;
	padding: 0.65rem;
	background-color: #8A0406;
	color: #fff;
	font-size: 1rem;
	font-weight: 600;
	border: none;
	border-radius: 4px;
	cursor: pointer;
	transition: background-color 0.2s ease;
}

.login-container button:hover {
	background-color: #6e0305;
}

/* Kleine Hilflinien (optional) */
.login-container a {
	display: block;
	text-align: center;
	margin-top: 0.75rem;
	font-size: 0.9rem;
	color: #8A0406;
	text-decoration: none;
}

.login-container a:hover {
	text-decoration: underline;
}


/* error */
.error-container {
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	text-align: center;
	padding: 2rem;
	background: #fff;
	border: 1px solid #ddd;
	border-radius: 8px;
	box-shadow: 0 4px 12px rgba(0,0,0,0.1);
	max-width: 400px;
	color: #000;
}
.error-container h1 { margin: 0 0 1rem; font-size: 2rem; }
.error-container p  { margin: 0; }



.topbar {
	background: transparent;
	color: rgb(255, 255, 255);
	height: 50px;
	display: flex;
	justify-content: flex-end;
	align-items: center;
	padding: 0 20px;
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	z-index: 1001;
}

.topbar .dropdown-content {
	display: none;
	position: absolute;
	right: 0;
	top: 50px;
	background-color: rgba(0, 0, 0, 0.95);
	min-width: 180px;
	z-index: 1002;
	border-radius: 4px;
	box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.topbar .dropdown-content a {
	padding: 10px;
	display: block;
	text-decoration: none;
	color: white;
}

.topbar .dropdown-content a:hover {
	background-color: #444;
}

.topbar .dropdown {
	position: relative;
}

.topbar .dropdown a {
	color: white;
	text-decoration: none;
	padding: 14px;
	display: block;
}

.layout {
	display: flex;
	margin-top: 50px;
	height: calc(100vh - 50px);
	position: relative;
	z-index: 1;
}

.sidebar {
	position: fixed;
	top: 50px;
	left: 0;
	width: 250px;
	background: transparent;
	color: rgb(255, 255, 255);
	box-sizing: border-box;
	height: calc(100vh - 50px);
	text-align: left;
	padding-top: 30px;
}

.sidebar .dropdown {
	width: 100%;
	text-align: left;
}
.sidebar .dropdown:hover {
	background-color: rgba(254, 8, 11, 0.25);
	transition: background-color 0.15s ease;
}

.sidebar .dropdown a {
	color: rgb(238, 238, 238);
	display: block;
	padding: 12px 16px;
	text-decoration: none;
	width: 100%;
	background: transparent;
	transition: background-color 0.2s ease;
}

.sidebar .dropdown a:hover {
	background-color: rgba(254, 8, 11, 0.15);
}

.sidebar .dropdown-content {
	display: none;
	background: rgba(0, 0, 0, 0.75);
}

.content {
	position: fixed;
	top: 50px;
	left: 250px;
	right: 0;
	bottom: 0;
	padding: 40px;
	color: rgb(15, 15, 15);
	background: rgba(255, 255, 255, 1);
	box-sizing: border-box;
	overflow-y: auto;
	text-align: left;
	border-top-left-radius: 4px;
}

/* Grund-Layout für Überschriften im Content-Bereich */
.content h1 {
	font-size: 2.4rem;
	margin-bottom: 1rem;
	color: rgba(254, 8, 11, 0.85);
}

.content h2 {
	font-size: 1.8rem;
	margin-bottom: 0.75rem;
	color: rgba(254, 8, 11, 0.65);
}

.content h3 {
	font-size: 1.4rem;
	margin-bottom: 0.5rem;
	color: rgba(254, 8, 11, 0.45);
}

/* Tabellen */
/* Modernes kartenbasiertes Tabellenlayout */
.content table {
	width: 100%;
	border-collapse: separate;
	border-spacing: 0 16px;
}

.content table tr {
	background: rgba(255, 255, 255, 0.95);
	border-radius: 8px;
	box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
	overflow: hidden;
}
.content table tr:nth-child(odd) {
	background-color: rgba(0, 0, 0, 0.015);
}

/* Tabellenkörper Hover */
.content tbody tr:hover {
	background-color: rgba(254, 8, 11, 0.05);
	box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.content table td {
	padding: 16px 12px;
	padding-top: 6px;
	padding-bottom: 6px;
	vertical-align: top;
	border-top: 1px solid rgba(0, 0, 0, 0.05);
	border-bottom: 1px solid rgba(0, 0, 0, 0.05);
	background-color: transparent;
	text-align: left;
}

/* Tabellenkopf */
.content table thead {
	display: table-header-group;
	color: rgb(255, 255, 255);
}

.content table thead th {
	color: rgb(255, 255, 255);
	font-weight: 600;
	text-align: left;
	padding: 16px 12px;
	background-color: rgba(254, 8, 11, 0.85);
	border-top: none;
	border-bottom: none;
}

/* Tabellenkörper */
.content tbody td {
	background: transparent;
	color: rgb(15, 15, 15);
}

/* Tabellenfuß */
.content table tfoot {
	background: rgba(138, 4, 6, 0.8);
	color: rgb(255, 255, 255);
	font-weight: 600;
}

.content table tfoot td {
	padding: 12px;
	text-align: left;
	vertical-align: middle;
}

/* Abgerundete Ecken für Tabellenzellen */
.content table thead tr th:first-child {
	border-top-left-radius: 8px;
	border-bottom-left-radius: 8px;
}

.content table thead tr th:last-child {
	border-top-right-radius: 8px;
	border-bottom-right-radius: 8px;
}

.content table tbody tr td:first-child {
	border-top-left-radius: 8px;
	border-bottom-left-radius: 8px;
	border-left: 1px solid rgba(0, 0, 0, 0.05);
}

.content table tbody tr td:last-child {
	border-top-right-radius: 8px;
	border-bottom-right-radius: 8px;
	border-right: 1px solid rgba(0, 0, 0, 0.05);
}

.content table td::before {
	display: none;
}

.content table tbody td:last-child {
	text-align: right;
}

.content table tbody td .dropdown {
	position: relative;
	display: inline-block;
}
.content table tbody td .dropdown-content {
	display: none;
	position: absolute;
	background-color: rgba(0, 0, 0, 0.9);
	min-width: 150px;
	box-shadow: 0px 8px 16px rgba(0,0,0,0.2);
	z-index: 999;
	right: 0;
	opacity: 0;
	visibility: hidden;
	transform: translateY(-5px);
	transition: opacity 0.2s ease, transform 0.2s ease, visibility 0s linear 0.2s;
	text-align: left;
}
.content table tbody td .dropdown-content a {
	color: white;
	padding: 10px 12px;
	text-decoration: none;
	display: block;
	white-space: nowrap;
}
.content table tbody td .dropdown-content a:hover {
	background-color: rgba(255,255,255,0.1);
}
.content table tbody td .dropdown:hover .dropdown-content {
	display: block;
	animation: dropdownFadeIn 0.2s ease;
	opacity: 1;
	visibility: visible;
	transition-delay: 0s;
}

.content table tbody td .dropdown-content a {
	padding: 10px;
	display: block;
	text-decoration: none;
	color: white;
}

.dropdown-content a:hover {
	/* Farbton aus body-Verlauf: rgb(195, 6, 9) */
	background-color: rgb(51, 51, 51);
}

.dropdown.open .dropdown-content {
	display: block !important;
}
.content table .dropdown-button {
	display: inline-block;
	background-color: rgba(254, 8, 11, 0.85);
	color: white;
	padding: 6px 12px;
	border-radius: 4px;
	text-decoration: none;
	transition: background-color 0.2s ease;
	font-size: 0.95rem;
}

.content table .dropdown-button:hover {
	background-color: rgba(254, 8, 11, 1);
}

.content div.box {
	max-width: 100%;
	margin: 2em auto;
	background: rgba(255, 255, 255, 0.95);
	padding: 2em;
	border-radius: 8px;
	box-shadow: 0 2px 6px rgba(0,0,0,0.1);
	margin-top: 1em;
}
.content div.box:first-child {
	margin-top: 0;
}

.content form div {
	margin-bottom: 1.5em;
	text-align: left;
}

.content form label {
	display: block;
	font-weight: bold;
	margin-bottom: 0.5em;
	color: rgb(138, 4, 6);
}

.content form input[type="text"],
.content form input[type="url"],
.content form input[type="datetime-local"],
.content form textarea {
	width: 100%;
	padding: 0.75em;
	border: 1px solid rgba(0,0,0,0.1);
	border-radius: 4px;
	font-size: 1rem;
}

input.custom-checkbox {
	appearance: none;
	-webkit-appearance: none;
	-moz-appearance: none;
	width: 24px;
	height: 24px;
	padding: 0;
	border: 1px solid rgba(0, 0, 0, 0.2);
	border-radius: 4px;
	background-color: #fff;
	cursor: pointer;
	vertical-align: middle;
	transition: border-color 0.2s, box-shadow 0.2s;
	position: relative;
}

/* Kreuz anzeigen */
input.custom-checkbox:checked::after {
	content: '';
	position: absolute;
	top: 50%;
	left: 50%;
	width: 24px;
	height: 24px;
	transform: translate(-50%, -50%) rotate(45deg);
	background-color: transparent;
	border-radius: 4px;
}

input.custom-checkbox:checked::before {
	content: '';
	position: absolute;
	top: 50%;
	left: 50%;
	width: 3px;
	height: 24px;
	background-color: #8A0406;
	transform: translate(-50%, -50%) rotate(45deg);
	border-radius: 4px;
}

input.custom-checkbox:checked::after {
	content: '';
	position: absolute;
	top: 50%;
	left: 50%;
	width: 3px;
	height: 24px;
	background-color: #8A0406;
	transform: translate(-50%, -50%) rotate(-45deg);
	border-radius: 4px;
}

/* Fokus-Stil wie bei anderen Inputs */
input.custom-checkbox:hover {
	border-color: #8A0406;
	box-shadow: 0 0 0 3px rgba(138, 4, 6, 0.2);
	outline: none;
}

.content form textarea {
	resize: none;
	min-height: 44px;
	overflow: hidden;
}

.content form select {
	width: 100%;
	padding: 0.75em;
	border: 1px solid rgba(0,0,0,0.1);
	border-radius: 4px;
	font-size: 1rem;
	background-color: white;
	background-image: linear-gradient(45deg, transparent 50%, #8A0406 50%), linear-gradient(135deg, #8A0406 50%, transparent 50%);
	background-position: calc(100% - 20px) calc(50% - 3px), calc(100% - 15px) calc(50% - 3px);
	background-size: 5px 5px, 5px 5px;
	background-repeat: no-repeat;
	appearance: none;
	-webkit-appearance: none;
	-moz-appearance: none;
}

.content form select:hover {
	border-color: #8A0406;
	box-shadow: 0 0 0 3px rgba(138, 4, 6, 0.2);
}

.content form input[type="text"]:focus,
.content form input[type="url"]:focus,
.content form input[type="datetime-local"]:focus,
.content form textarea:focus,
.content form select:focus {
	outline: none;
	border-color: #8A0406;
	box-shadow: 0 0 0 3px rgba(138, 4, 6, 0.2);
}

.content form button[type="submit"] {
	background-color: rgba(254, 8, 11, 0.85);
	color: #fff;
	padding: 0.75em 1.5em;
	border: none;
	border-radius: 4px;
	font-size: 1rem;
	cursor: pointer;
	transition: background-color 0.2s ease;
}

.content form button[type="submit"]:hover {
	background-color: rgba(254, 8, 11, 1);
}


.content form .button-cancel {
	display: inline-block;
	padding: 0.75em 1.5em;
	border-radius: 4px;
	background-color: rgba(0, 0, 0, 0.1);
	color: #333;
	text-decoration: none;
	font-size: 1rem;
	border: 1px solid rgba(0, 0, 0, 0.2);
	transition: background-color 0.2s ease;
}

.content form .button-cancel:hover {
	background-color: rgba(0, 0, 0, 0.2);
}

/* Buttons im Formular rechtsbündig anordnen */
.content form .form-buttons {
	display: flex;
	justify-content: flex-end;
	gap: 1em;
}

.content .pagination {
	text-align: center;
	margin-top: 1.5em;
}
.content .pagination a {
	display: inline-block;
	padding: 0.3em 0.6em;
	margin: 0 0.2em;
	border-radius: 4px;
	background: rgba(138, 4, 6, 0.1);
	color: rgb(0, 0, 0);
	text-decoration: none;
}
.content .pagination a:hover {
	background: rgba(138, 4, 6, 0.3);
}

@keyframes dropdownFadeIn {
	from {
		opacity: 0;
		transform: translateY(-5px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}