/* Bootstrap 5 Branding – Pastellgrün-Töne */
:root {
	--bs-primary: #7fb069;
	--bs-primary-rgb: 127,176,105;
	--bs-success: #9bc47a;
	--bs-success-rgb: 155,196,122;
	--bs-link-color: #7fb069;
}

body { background-color: #f8fbf8; }
.navbar-brand img { height: 36px; }

/* Cards */
.card { border-radius: 12px; box-shadow: 0 8px 24px rgba(0,0,0,.06); }
.card .card-title { margin-bottom: .5rem; }

/* Dark mode */
body.dark-mode { background-color: #0f1410; color: #e8f0ea; }
body.dark-mode .card { background-color: #141a14; color: #e8f0ea; }
body.dark-mode .navbar { background-color: #1a241a !important; }

/* Buttons */
.btn-primary { background-color: var(--bs-primary); border-color: var(--bs-primary); }
.btn-success { background-color: var(--bs-success); border-color: var(--bs-success); }
.btn-outline-success { color: var(--bs-success); border-color: var(--bs-success); }
.btn-outline-success:hover { background-color: var(--bs-success); color: #fff; }

/* Sidebar Styles */
.sidebar {
	width: 280px;
	height: 100vh;
	position: fixed;
	top: 0;
	left: -280px;
	z-index: 1030;
	transition: left 0.3s ease;
	overflow-y: auto;
}

.sidebar.show {
	left: 0;
}

.sidebar-header {
	border-bottom: 1px solid rgba(255,255,255,0.1);
}

.sidebar-menu .nav-link {
	border-radius: 8px;
	transition: all 0.2s ease;
}

.sidebar-menu .nav-link:hover {
	background-color: rgba(255,255,255,0.1);
	transform: translateX(4px);
}

.sidebar-menu .nav-link.active {
	background-color: rgba(255,255,255,0.2);
}

/* Sidebar Overlay for mobile */
.sidebar-overlay {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100vh;
	background-color: rgba(0,0,0,0.5);
	z-index: 1020;
	opacity: 0;
	visibility: hidden;
	transition: all 0.3s ease;
}

.sidebar-overlay.show {
	opacity: 1;
	visibility: visible;
}

/* Main content */
body {
	margin: 0;
	padding: 0;
}

/* Desktop: Sidebar always visible by default */
@media (min-width: 992px) {
	.sidebar {
		left: 0;
		position: fixed;
	}
	
	body {
		padding-left: 280px;
		transition: padding-left 0.3s ease;
	}
	
	body.sidebar-closed {
		padding-left: 0;
	}
	
	body.sidebar-closed .sidebar {
		left: -280px;
	}
	
	/* Ensure navbar stays on top */
	.navbar {
		z-index: 1040;
		position: relative;
	}
}

/* Mobile: Sidebar hidden by default */
@media (max-width: 991.98px) {
	.sidebar {
		left: -280px;
	}
	
	body {
		padding-left: 0;
	}
}

/* Dark mode adjustments */
body.dark-mode .sidebar {
	background-color: var(--bs-primary) !important;
}

/* Table column widths for KKS results */
.col-year {
	width: 80px !important;
	min-width: 80px;
}

.col-equal {
	width: calc((100% - 80px) / 6) !important;
	min-width: 120px;
}

/* Sticky Footer */
html, body {
	height: 100%;
}

body {
	display: flex;
	flex-direction: column;
}

.main-content {
	flex: 1 0 auto;
	min-height: calc(100vh - 200px); /* Mindesthöhe abzüglich Footer */
}

footer {
	flex-shrink: 0;
	margin-top: auto;
}

