
/* --- Login Styles --- */
/*--- Favicon ---*/
link[rel="icon"] {
    href: url('favicon.ico');
}



.login-container {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	min-height: 100vh;
	padding: 20px;
	background: #f4f6f8;
	font-family: 'helvetica', serif;
}

.login-header {
	text-align: center;
	margin-bottom: 40px;
}

.login-title {
	font-size: 2.5em;
	font-weight: 700;
	color: #4f9732;
	margin-bottom: 8px;
	text-shadow: 0 2px 4px rgba(79, 151, 50, 0.1);
	font-family: 'helvetica', serif;
}

.login-subtitle {
	font-size: 1.2em;
	color: #404040;
	font-weight: 500;
	margin-bottom: 0;
	font-family: 'helvetica', serif;
}

.login-form {
	background: #fff;
	padding: 50px 40px;
	border-radius: 16px;
	box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
	width: 100%;
	max-width: 420px;
	border: 1px solid #e9ecef;
	font-family: 'helvetica', serif;
}

.login-form label {
	display: block;
	margin-bottom: 8px;
	font-weight: 600;
	color: #404040;
	font-size: 1em;
	font-family: 'helvetica', serif;
}

.login-form input[type="text"],
.login-form input[type="password"] {
	width: 100%;
	padding: 16px 20px;
	border: 2px solid #8aa05f;
	border-radius: 10px;
	font-size: 1.05em;
	margin-bottom: 24px;
	transition: all 0.3s ease;
	background: #fafbfc;
	box-sizing: border-box;
	font-family: 'helvetica', serif;
}

.login-form input[type="text"]:focus,
.login-form input[type="password"]:focus {
	outline: none;
	border-color: #4f9732;
	background: #fff;
	box-shadow: 0 0 0 3px rgba(79, 151, 50, 0.1);
}

.login-form input[type="text"]::placeholder,
.login-form input[type="password"]::placeholder {
	color: #999;
	font-style: italic;
	font-family: 'helvetica', serif;
}

.login-btn {
	width: 100%;
	padding: 18px 24px;
	background: linear-gradient(135deg, #4f9732 0%, #3d7828 100%);
	color: #fff;
	border: none;
	border-radius: 10px;
	font-size: 1.1em;
	font-weight: 700;
	cursor: pointer;
	transition: all 0.3s ease;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	box-shadow: 0 4px 15px rgba(79, 151, 50, 0.3);
	font-family: 'helvetica', serif;
}

.login-btn:hover {
	background: linear-gradient(135deg, #3d7828 0%, #2d5a1e 100%);
	transform: translateY(-2px);
	box-shadow: 0 6px 20px rgba(79, 151, 50, 0.4);
}

.login-btn:active {
	transform: translateY(0);
	box-shadow: 0 2px 10px rgba(79, 151, 50, 0.3);
}

.login-error {
	background: #fff5f5;
	border: 1px solid #fed7d7;
	border-radius: 8px;
	padding: 16px;
	margin-bottom: 20px;
	color: #e53e3e;
	font-weight: 500;
	text-align: center;
	font-size: 0.95em;
	font-family: 'helvetica', serif;
}

/* Login Mobile Responsive */
@media (max-width: 480px) {
	.login-container {
		padding: 15px;
	}
	
	.login-title {
		font-size: 2em;
	}
	
	.login-subtitle {
		font-size: 1.1em;
	}
	
	.login-form {
		padding: 35px 25px;
		margin-top: -20px;
	}
	
	.login-form input[type="text"],
	.login-form input[type="password"] {
		padding: 14px 16px;
		font-size: 1em;
	}
	
	.login-btn {
		padding: 16px 20px;
		font-size: 1em;
	}
}

/* --- Sidebar & Navigation Styles --- */
.sidebar {
	width: 260px;
	background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
	box-shadow: 2px 0 8px rgba(0,0,0,0.04);
	position: fixed;
	top: 0;
	left: 0;
	height: 100vh;
	z-index: 100;
	transition: transform 0.3s;
	font-family: 'helvetica', serif;
}

/* Desktop: Sidebar sichtbar */
@media (min-width: 1367px) {
	.sidebar {
		transform: translateX(0);
	}
}

/* Tablet/Mobile: Sidebar versteckt */
@media (max-width: 1366px) {
	.sidebar {
		transform: translateX(-100%);
	}
}

.sidebar.mobile-open {
	transform: translateX(0);
}
.sidebar-nav {
	padding: 70px 0 0 0;
	height: 100%;
	display: flex;
	flex-direction: column;
	justify-content: space-between;
	box-sizing: border-box;
}

.nav-content {
	flex: 1;
	overflow-y: auto;
	padding-bottom: 20px;
	min-height: 0;
}

.nav-links {
	list-style: none;
	margin: 0;
	padding: 0;
}
.nav-links li {
	margin-bottom: 4px;
}
.nav-links a {
	display: block;
	padding: 12px 28px;
	color: #404040;
	text-decoration: none;
	font-size: 1.05em;
	border-radius: 6px;
	transition: background 0.2s, color 0.2s;
	font-family: 'helvetica', serif;
}
.nav-links a.active,
.nav-links a:hover,
.nav-links a:focus {
	background: #8aa05f;
	color: #fff;
}

/* --- Dropdown Navigation --- */
.sidebar .nav-links .dropdown-nav {
	position: relative;
}
.sidebar .nav-links .dropdown-toggle {
	display: flex;
	align-items: center;
	justify-content: space-between;
	width: 100%;
	padding: 12px 20px 12px 28px;
	color: #404040;
	background: none;
	border: none;
	font-size: 1.05em;
	cursor: pointer;
	text-align: left;
	border-radius: 6px;
	transition: background 0.2s;
	font-family: 'helvetica', serif;
	box-sizing: border-box;
}
.sidebar .nav-links .dropdown-toggle:hover {
	background: #8aa05f;
	color: #fff;
}
.sidebar .nav-links .dropdown-menu {
	display: block;
	position: static;
	min-width: auto;
	background: transparent;
	box-shadow: none;
	border-radius: 0;
	z-index: auto;
	padding: 0;
	margin: 0;
	list-style: none;
	border: none;
	max-height: 0;
	overflow: hidden;
	opacity: 0;
	transition: all 0.3s ease;
	margin-left: 20px;
}
.sidebar .nav-links .dropdown-nav.open .dropdown-menu {
	max-height: 500px;
	opacity: 1;
}
.sidebar .nav-links .dropdown-nav.open .dropdown-toggle {
	background: #8aa05f;
	color: #fff;
}
.sidebar .nav-links .dropdown-nav.open .dropdown-toggle span {
	transform: rotate(180deg);
	transition: transform 0.3s ease;
}
.sidebar .nav-links .dropdown-menu li a {
	display: block;
	padding: 10px 28px;
	color: #404040;
	text-decoration: none;
	font-size: 0.95em;
	border-radius: 6px;
	transition: background 0.2s, color 0.2s;
	font-family: 'helvetica', serif;
	margin: 2px 0;
}
.sidebar .nav-links .dropdown-menu li a:hover,
.sidebar .nav-links .dropdown-menu li a.active {
	background: #8aa05f;
	color: #fff;
}
.sidebar .nav-links .dropdown-menu li:not(:last-child) a {
	border-bottom: none;
}

/* Dropdown arrow animation */
.sidebar .nav-links .dropdown-toggle span {
	transition: transform 0.3s ease;
	display: inline-block;
	font-size: 0.9em;
	margin-left: 8px;
	flex-shrink: 0;
}

/* --- Topbar Styles --- */
.topbar {
	width: 100%;
	height: 64px;
	background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
	color: #404040;
	box-shadow: 0 2px 8px rgba(0,0,0,0.04);
	position: fixed;
	top: 0;
	left: 0;
	z-index: 101;
	font-family: 'helvetica', serif;
}
.topbar-content {
	display: flex;
	align-items: center;
	justify-content: space-between;
	height: 100%;
	padding: 0 32px;
	/* allow absolute-centering of brand inside this container */
	position: relative;
}
.nav-brand h1 {
	font-size: 1.5em;
	font-weight: 700;
	margin: 0;
	color: #8aa05f;
	font-family: 'helvetica', serif;
}

/* .nav-brand left-aligned by default (desktop). Centering for smaller screens is applied in the responsive block further below. */
.brand-subtitle {
	font-size: 0.95em;
	color: #4f9732;
	font-family: 'helvetica', serif;
}
.logout-button {
	color: #404040;
	background: rgba(79, 151, 50, 0.1);
	border-radius: 6px;
	padding: 8px 18px;
	text-decoration: none;
	font-weight: 600;
	transition: background 0.2s;
	font-family: 'helvetica', serif;
}
.logout-button:hover {
	background: rgba(79, 151, 50, 0.2);
}

/* Hide the topbar brand on tablet and mobile to save space and avoid layout collisions
   User requested removal of the brand in tablet/mobile modes. This keeps desktop layout unchanged. */
@media (max-width: 1366px) {
    .nav-brand {
        display: none !important;
    }
}

/* Mobile Menu Button - Base Styles */
.mobile-menu-toggle {
	display: none;
	flex-direction: column;
	justify-content: center;
	align-items: center;
	width: 30px;
	height: 30px;
	background: transparent;
	border: none;
	cursor: pointer;
	padding: 0;
	z-index: 1002;
	position: relative;
}

/* Mobile & Tablet: Hamburger-Button aktivieren */
@media (max-width: 1366px) {
	.mobile-menu-toggle {
		display: flex !important;
		flex-direction: column;
		justify-content: center;
		align-items: center;
		width: 50px;
		height: 50px;
		padding: 0;
		border-radius: 8px;
		background: #4f9732 !important; /* Deutlich sichtbar für Test */
		border: 2px solid #ffffff !important;
		cursor: pointer;
		z-index: 1002;
		position: relative;
		box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
		transition: all 0.2s ease;
		/* Touch-Optimierung */
		touch-action: manipulation;
		-webkit-touch-callout: none;
		-webkit-user-select: none;
		user-select: none;
		-webkit-tap-highlight-color: rgba(79, 151, 50, 0.3);
	}
	
	.mobile-menu-toggle:hover {
		background: #3d7828 !important;
		box-shadow: 0 4px 12px rgba(79, 151, 50, 0.4);
	}
	
	.mobile-menu-toggle:active {
		background: #2d5a1e !important;
		transform: scale(0.95);
		box-shadow: 0 2px 6px rgba(79, 151, 50, 0.3);
	}
	
	.hamburger-line {
		display: block;
		width: 26px;
		height: 3px;
		background: #ffffff !important; /* Weiße Linien für Kontrast */
		border-radius: 2px;
		margin: 3px 0;
		transition: all 0.3s ease;
		pointer-events: none;
	}
	
	/* Hamburger-Button Animation */
	.mobile-menu-toggle.active .hamburger-line:nth-child(1) {
		transform: rotate(45deg) translate(7px, 7px);
	}
	.mobile-menu-toggle.active .hamburger-line:nth-child(2) {
		opacity: 0;
	}
	.mobile-menu-toggle.active .hamburger-line:nth-child(3) {
		transform: rotate(-45deg) translate(7px, -7px);
	}
}

/* Spezielle Optimierung für große Tablets (iPad Pro 12.9") */
@media (min-width: 1025px) and (max-width: 1366px) {
	.mobile-menu-toggle {
		width: 52px !important;
		height: 52px !important;
		padding: 0 !important;
		border-radius: 10px !important;
		background: rgba(79, 151, 50, 0.1) !important;
		border: 2px solid rgba(79, 151, 50, 0.3) !important;
		box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1) !important;
		justify-content: center !important;
		align-items: center !important;
	}
	
	.mobile-menu-toggle:hover {
		background: rgba(79, 151, 50, 0.2) !important;
		border-color: rgba(79, 151, 50, 0.5) !important;
		box-shadow: 0 4px 12px rgba(79, 151, 50, 0.2) !important;
	}
	
	.mobile-menu-toggle:active {
		background: rgba(79, 151, 50, 0.3) !important;
		transform: scale(0.96) !important;
		box-shadow: 0 2px 6px rgba(79, 151, 50, 0.3) !important;
	}
	
	.hamburger-line {
		width: 26px !important;
		height: 3px !important;
		background: #404040 !important;
		margin: 3px 0 !important;
	}
	
	.sidebar {
		width: min(420px, 85vw) !important;
		box-shadow: 4px 0 20px rgba(0, 0, 0, 0.15) !important;
	}
}

@media (max-width: 480px) {
	.mobile-menu-toggle {
		width: 44px;
		height: 44px;
		padding: 10px;
		/* Erweiterte Touch-Optimierung für kleine Screens */
		-webkit-tap-highlight-color: rgba(79, 151, 50, 0.4);
	}
	
	.mobile-menu-toggle:active {
		transform: scale(0.92);
	}
	
	.hamburger-line {
		width: 24px;
		height: 4px;
	}
}

/* --- User Info Styles --- */
.nav-user {
	margin: 0;
	padding: 20px 28px;
	flex-shrink: 0;
	background: rgba(180, 210, 122, 0.05);
	border-top: 1px solid rgba(180, 210, 122, 0.2);
}
.user-info {
	display: flex;
	align-items: center;
	gap: 14px;
}
.user-avatar {
	width: 44px;
	height: 44px;
	background: #4f9732;
	color: #fff;
	font-size: 1.3em;
	font-weight: 700;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	box-shadow: 0 2px 8px rgba(0,0,0,0.08);
	font-family: 'helvetica', serif;
}
.user-details {
	display: flex;
	flex-direction: column;
	gap: 2px;
}
.user-name {
	font-weight: 600;
	color: #404040;
	font-size: 1em;
	font-family: 'helvetica', serif;
}
.user-role {
	font-size: 0.95em;
	color: #4f9732;
	font-weight: 500;
	font-family: 'helvetica', serif;
}
.user-role.admin {
	color: #e74c3c;
}
.user-role.buchhaltung {
	color: #2980b9;
}

/* --- Mobile & Tablet Styles (bis iPad Pro 12.9") --- */
@media (max-width: 1366px) {
	.mobile-menu-toggle {
		display: flex !important;
	}
	.sidebar {
		position: fixed;
		top: 0;
		left: 0;
		height: 100vh;
		z-index: 1000;
		transition: all 0.3s ease;
		width: min(400px, 90vw);
		max-width: 400px;
		overflow-y: auto;
		-webkit-overflow-scrolling: touch;
		touch-action: pan-y;
		transform: translateX(-100%);
		box-shadow: 4px 0 20px rgba(0, 0, 0, 0.15);
	}
	
	.sidebar.mobile-open {
		transform: translateX(0) !important;
	}
	
	/* Mobile & Tablet Navigation Content */
	.sidebar-nav {
		padding: 20px 0 0 0;
		min-height: 100vh;
		box-sizing: border-box;
		display: flex;
		flex-direction: column;
		justify-content: space-between;
	}
	
	.nav-content {
		flex: 1;
		overflow-y: auto;
		padding-bottom: 20px;
		min-height: 0;
	}
	
	/* Mobile & Tablet Overlay für bessere UX */
	.mobile-overlay {
		position: fixed;
		top: 0;
		left: 0;
		width: 100vw;
		height: 100vh;
		background: rgba(0, 0, 0, 0.6);
		z-index: 999;
		opacity: 0;
		visibility: hidden;
		transition: all 0.3s ease;
		backdrop-filter: blur(2px);
	}
	
	.mobile-overlay.active {
		opacity: 1;
		visibility: visible;
	}
	
	.topbar-content {
		padding: 0 12px;
	}
	/* Main Content Anpassung direkt bei 1366px */
	.main-content {
		margin-left: 0;
		padding: 84px 16px 32px 16px;
	}
}
@media (max-width: 600px) {
	.nav-links a, .sidebar .nav-links .dropdown-toggle {
		padding: 18px 20px;
		font-size: 1.1em;
		min-height: 44px; /* iOS Touch-Target Mindestgröße */
		display: flex;
		align-items: center;
		/* Strikte Touch-Event Kontrolle */
		touch-action: manipulation;
		-webkit-touch-callout: none;
		-webkit-user-select: none;
		user-select: none;
		position: relative;
		/* Verzögerte Touch-Response */
		transition: background-color 0.15s ease, transform 0.1s ease;
	}
	
	/* Verhindert ungewollte Klicks während Scroll/Swipe */
	.nav-links a {
		pointer-events: auto;
		-webkit-tap-highlight-color: rgba(180, 210, 122, 0.3);
		/* Strikte Touch-Behandlung */
		cursor: pointer;
		text-decoration: none;
	}
	
	/* Strikte Touch-Kontrolle für Links */
	.nav-links a:before {
		content: '';
		position: absolute;
		top: 0;
		left: 0;
		right: 0;
		bottom: 0;
		z-index: 1;
		/* Touch-Verzögerung durch Overlay */
		opacity: 0;
		transition: opacity 0.1s ease;
	}
	
	.nav-links a:active:before {
		opacity: 0.1;
		background: rgba(79, 151, 50, 0.1);
	}
	
	/* Touch-Feedback nur bei echten Touches */
	@media (hover: none) and (pointer: coarse) {
		.nav-links a:active {
			background-color: rgba(180, 210, 122, 0.4) !important;
			transform: scale(0.98);
		}
		
		.nav-links a:not(:active) {
			transition-delay: 0.05s;
		}
	}
	
	/* Dropdown-Toggles größer machen */
	.sidebar .nav-links .dropdown-toggle {
		padding: 18px 20px;
		min-height: 48px;
		touch-action: manipulation;
		-webkit-tap-highlight-color: rgba(180, 210, 122, 0.3);
		/* Verhindert sofortige Aktivierung */
		transition: background-color 0.2s ease;
	}
	
	/* Dropdown-Menü-Items auch größer */
	.sidebar .nav-links .dropdown-menu li a {
		padding: 16px 32px;
		font-size: 1em;
		min-height: 44px;
		display: flex;
		align-items: center;
		touch-action: manipulation;
		-webkit-tap-highlight-color: rgba(180, 210, 122, 0.2);
		/* Verzögerung für Dropdown-Items */
		transition: all 0.15s ease;
	}
	
	/* User-Bereich anpassen */
	.nav-user {
		padding: 20px;
		margin: 0;
		flex-shrink: 0;
		background: rgba(180, 210, 122, 0.1);
		border-top: 1px solid rgba(180, 210, 122, 0.3);
		-webkit-user-select: none;
		user-select: none;
	}
	
	.user-avatar {
		width: 50px;
		height: 50px;
		font-size: 1.4em;
		pointer-events: none; /* Verhindert versehentliche Klicks */
	}
	
	.user-name {
		font-size: 1.1em;
		pointer-events: none;
	}
	
	.user-role {
		font-size: 1em;
		pointer-events: none;
	}
	
	/* Dropdown-Pfeile größer machen */
	.sidebar .nav-links .dropdown-toggle span {
		font-size: 1.2em;
		margin-left: 12px;
		pointer-events: none; /* Verhindert Klicks auf den Pfeil */
	}
}

/* === EXTRA MOBILE NAVIGATION (max-width: 480px) === */
@media (max-width: 480px) {
	/* Noch größere Touch-Targets für sehr kleine Screens */
	.nav-links a, .sidebar .nav-links .dropdown-toggle {
		padding: 20px 24px;
		font-size: 1.2em;
		min-height: 50px;
		border-bottom: 1px solid rgba(180, 210, 122, 0.2);
		/* Strikte Touch-Kontrolle */
		touch-action: manipulation;
		-webkit-touch-callout: none;
		-webkit-user-select: none;
		user-select: none;
		position: relative;
		-webkit-tap-highlight-color: rgba(180, 210, 122, 0.4);
		cursor: pointer;
		/* Verzögerte Response */
		transition: all 0.2s ease;
	}
	
	/* Anti-Ghost-Click Protection */
	.nav-links a {
		/* Überschreibt href temporär bei schnellen Touches */
		-webkit-touch-callout: none;
		-webkit-user-select: none;
		-khtml-user-select: none;
		-moz-user-select: none;
		-ms-user-select: none;
		user-select: none;
	}
	
	/* Touch-Verzögerung für echte mobile Geräte */
	@media (hover: none) and (pointer: coarse) {
		.nav-links a {
			/* Längere Transition für bessere Kontrolle */
			transition: background-color 0.3s ease, transform 0.2s ease;
		}
		
		.nav-links a:active {
			background: rgba(79, 151, 50, 0.2) !important;
			transform: scale(0.98);
			/* Kurze Verzögerung vor Navigation */
			transition-delay: 0.1s;
		}
		
		.nav-links a:not(:active) {
			/* Reset nach Touch */
			transition-delay: 0s;
		}
	}
	
	/* Touch-Feedback nur bei längerem Drücken */
	.nav-links a:active,
	.sidebar .nav-links .dropdown-toggle:active {
		background: rgba(79, 151, 50, 0.2) !important;
		transform: scale(0.98);
		transition: all 0.1s ease;
		/* Wichtig: Verzögerung vor Aktivierung */
		animation: touchDelay 0.15s ease-in-out;
	}
	
	@keyframes touchDelay {
		0% { opacity: 1; }
		50% { opacity: 0.8; }
		100% { opacity: 1; }
	}
	
	.sidebar .nav-links .dropdown-toggle {
		padding: 20px 24px;
		min-height: 52px;
		touch-action: manipulation;
		-webkit-tap-highlight-color: rgba(180, 210, 122, 0.4);
		/* Erweiterte Verzögerung für Dropdowns */
		transition: all 0.25s ease;
	}
	
	.sidebar .nav-links .dropdown-menu li a {
		padding: 18px 36px;
		font-size: 1.1em;
		min-height: 48px;
		border-bottom: 1px solid rgba(180, 210, 122, 0.1);
		touch-action: manipulation;
		-webkit-tap-highlight-color: rgba(180, 210, 122, 0.3);
		/* Dropdown-Items mit Verzögerung */
		transition: all 0.2s ease;
	}
	
	/* Touch-Feedback für Dropdown-Items */
	.sidebar .nav-links .dropdown-menu li a:active {
		background: rgba(79, 151, 50, 0.15) !important;
		transform: scale(0.98);
		/* Längere Verzögerung für Submenu-Items */
		animation: touchDelay 0.2s ease-in-out;
	}
	
	/* Navigation spacing */
	.nav-links li {
		margin-bottom: 0; /* Entfernt extra Abstände */
	}
	
	/* User Info größer */
	.nav-user {
		padding: 24px;
		margin: 0;
		border-top: 2px solid rgba(180, 210, 122, 0.3);
		background: rgba(180, 210, 122, 0.1);
		flex-shrink: 0;
		-webkit-user-select: none;
		user-select: none;
	}
	
	.user-info {
		gap: 16px;
	}
	
	.user-avatar {
		width: 54px;
		height: 54px;
		font-size: 1.5em;
		pointer-events: none;
	}
	
	.user-name {
		font-size: 1.2em;
		font-weight: 700;
		pointer-events: none;
	}
	
	.user-role {
		font-size: 1.05em;
		pointer-events: none;
	}
	
	/* Dropdown-Animation verbessern */
	.sidebar .nav-links .dropdown-menu {
		margin-left: 0;
		background: rgba(180, 210, 122, 0.05);
		border-radius: 0;
	}
	
	.sidebar .nav-links .dropdown-toggle span {
		font-size: 1.3em;
		margin-left: 16px;
		font-weight: bold;
		pointer-events: none; /* Wichtig: Verhindert Klicks auf Pfeil */
	}
	
	/* Aktive Zustände verbessern */
	.nav-links a.active,
	.nav-links a:hover,
	.sidebar .nav-links .dropdown-toggle:hover,
	.sidebar .nav-links .dropdown-nav.open .dropdown-toggle {
		background: #8aa05f;
		color: #fff;
		font-weight: 600;
	}
	
	.sidebar .nav-links .dropdown-menu li a:hover,
	.sidebar .nav-links .dropdown-menu li a.active {
		background: rgba(79, 151, 50, 0.1);
		color: #fff;
		font-weight: 600;
		margin-left: 8px;
		border-radius: 6px;
	}
}

/* --- Main Content Layout --- */
body {
	font-family: 'helvetica', serif;
	margin: 0;
	padding: 0;
	background: #f4f6f8;
}

/* Desktop: Main content mit Sidebar-Abstand */
@media (min-width: 1367px) {
	.main-content {
		margin-left: 260px;
		padding: 84px 32px 32px 32px;
		min-height: calc(100vh - 64px);
		box-sizing: border-box;
	}
}

/* Tablet/Mobile: Main content ohne Sidebar-Abstand */
@media (max-width: 1366px) {
	.main-content {
		margin-left: 0;
		padding: 84px 32px 32px 32px;
		min-height: calc(100vh - 64px);
		box-sizing: border-box;
	}
}

/* --- Page Header Styles --- */
.page-header {
	margin-bottom: 32px;
}

.page-title {
	font-size: 2.2em;
	font-weight: 700;
	color: #404040;
	margin: 0 0 8px 0;
	font-family: 'helvetica', serif;
}

.page-subtitle {
	font-size: 1.1em;
	color: #4f9732;
	margin: 0;
	font-weight: 500;
	font-family: 'helvetica', serif;
}

/* --- Content Card Styles --- */
.content-card {
	background: #fff;
	border-radius: 8px;
	box-shadow: 0 2px 4px rgba(0, 0, 0, 0.06);
	padding: 24px;
	margin-bottom: 24px;
	border: 1px solid #e5e7eb;
}

/* --- Form Container & Sections --- */
.form-container {
	font-family: 'helvetica', serif;
}

.form-section {
	margin-bottom: 40px;
	padding-bottom: 30px;
	border-bottom: 1px solid #e9ecef;
}

.form-section:last-of-type {
	border-bottom: none;
	margin-bottom: 0;
	padding-bottom: 0;
}

.section-title {
	font-size: 1.4em;
	font-weight: 600;
	color: #4f9732;
	margin: 0 0 24px 0;
	padding-bottom: 8px;
	border-bottom: 2px solid #8aa05f;
	font-family: 'helvetica', serif;
}

/* --- Form Grid Layouts --- */
.form-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
	gap: 24px;
	margin-bottom: 20px;
}

.address-grid {
	grid-template-columns: minmax(0, 2fr) minmax(80px, 1fr) minmax(120px, 1fr);
	gap: 20px;
}

@media (max-width: 1000px) {
	.address-grid {
		grid-template-columns: 1fr;
	}
}

@media (max-width: 768px) {
	.address-grid {
		grid-template-columns: 1fr;
	}
}

.checkbox-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
	gap: 16px;
	margin-bottom: 12px;
}

/* --- Form Groups & Labels --- */
.form-group {
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.form-label {
	font-size: 1em;
	font-weight: 600;
	color: #404040;
	margin-bottom: 4px;
	font-family: 'helvetica', serif;
}

.form-label.required::after {
	content: ' *';
	color: #e74c3c;
	font-weight: 700;
}

.form-help {
	font-size: 0.9em;
	color: #666;
	margin-top: 4px;
	font-style: italic;
	font-family: 'helvetica', serif;
}

/* --- Form Inputs --- */
.form-input,
.form-select {
	padding: 14px 16px;
	border: 2px solid #8aa05f;
	border-radius: 8px;
	font-size: 1em;
	background: #fafbfc;
	transition: all 0.3s ease;
	font-family: 'helvetica', serif;
	box-sizing: border-box;
}

.form-input:focus,
.form-select:focus {
	outline: none;
	border-color: #4f9732;
	background: #fff;
	box-shadow: 0 0 0 3px rgba(79, 151, 50, 0.1);
}

.form-input::placeholder {
	color: #999;
	font-style: italic;
}

/* --- Checkboxes --- */
.checkbox-group {
	display: flex;
	align-items: center;
	gap: 12px;
	cursor: pointer;
}

.form-checkbox {
	appearance: none;
	-webkit-appearance: none;
	-moz-appearance: none;
	width: 20px;
	height: 20px;
	border: 2px solid #8aa05f;
	border-radius: 4px;
	background: #fafbfc;
	cursor: pointer;
	position: relative;
	transition: all 0.3s ease;
	margin: 0;
	flex-shrink: 0;
}

.form-checkbox:focus {
	outline: none;
	box-shadow: 0 0 0 3px rgba(79, 151, 50, 0.1);
}

.form-checkbox:checked {
	background: #4f9732;
	border-color: #4f9732;
}

.form-checkbox:checked::after {
	content: '✓';
	position: absolute;
	top: 1px;
	left: 3px;
	color: #fff;
	font-size: 14px;
	font-weight: bold;
	line-height: 1;
}

/* --- Buttons --- */
.form-actions {
	display: flex;
	gap: 16px;
	justify-content: flex-start;
	margin-top: 40px;
	padding-top: 30px;
	border-top: 1px solid #e9ecef;
}

.btn {
	padding: 14px 28px;
	border: none;
	border-radius: 8px;
	font-size: 1.05em;
	font-weight: 600;
	cursor: pointer;
	transition: all 0.3s ease;
	font-family: 'helvetica', serif;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	text-decoration: none;
	box-sizing: border-box;
}

.btn-primary {
	background: linear-gradient(135deg, #4f9732 0%, #3d7828 100%);
	color: #fff;
	box-shadow: 0 4px 15px rgba(79, 151, 50, 0.3);
}

.btn-primary:hover {
	background: linear-gradient(135deg, #3d7828 0%, #2d5a1e 100%);
	transform: translateY(-2px);
	box-shadow: 0 6px 20px rgba(79, 151, 50, 0.4);
}

.btn-success {
	background: linear-gradient(135deg, #27ae60 0%, #219a52 100%);
	color: #fff;
	box-shadow: 0 4px 15px rgba(39, 174, 96, 0.3);
}

.btn-success:hover {
	background: linear-gradient(135deg, #219a52 0%, #1e8449 100%);
	transform: translateY(-2px);
	box-shadow: 0 6px 20px rgba(39, 174, 96, 0.4);
}

.btn-secondary {
	background: #f8f9fa;
	color: #404040;
	border: 2px solid #8aa05f;
}

.btn-secondary:hover {
	background: #8aa05f;
	color: #404040;
	transform: translateY(-1px);
}

.btn:active {
	transform: translateY(0);
}

/* Button Group */
.button-group {
	display: flex;
	gap: 12px;
	align-items: center;
	flex-wrap: wrap;
}

/* --- Alert Messages --- */
.alert {
	padding: 16px 20px;
	border-radius: 8px;
	margin-bottom: 24px;
	font-family: 'helvetica', serif;
	font-weight: 500;
}

.alert-success {
	background: #d1edcc;
	border: 1px solid #4f9732;
	color: #2d5a1e;
}

.alert-error {
	background: #ffe6e6;
	border: 1px solid #e74c3c;
	color: #c0392b;
}

.alert-warning {
	background: #fff3cd;
	border: 1px solid #ffc107;
	color: #856404;
}

/* --- Responsive Design --- */
@media (max-width: 768px) {
	.content-card {
		padding: 24px 20px;
	}
	
	.form-grid {
		grid-template-columns: 1fr;
		gap: 20px;
	}
	
	.checkbox-grid {
		grid-template-columns: 1fr;
		gap: 12px;
	}
	
	.form-actions {
		flex-direction: column;
		gap: 12px;
	}
	
	.btn {
		width: 100%;
	}
}

/* --- Table Components --- */
.card-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 24px;
	padding-bottom: 16px;
	border-bottom: 2px solid #e9ecef;
	/* allow absolute-centering of the section title */
	position: relative;
}

.stats-badge {
	display: flex;
	flex-direction: column;
	align-items: center;
	background: linear-gradient(135deg, #4f9732 0%, #3d7828 100%);
	color: white;
	padding: 12px 20px;
	border-radius: 12px;
	box-shadow: 0 2px 8px rgba(79, 151, 50, 0.3);
}

.stats-number {
	font-size: 1.8em;
	font-weight: 700;
	line-height: 1;
	font-family: 'helvetica', serif;
}

.stats-label {
	font-size: 0.9em;
	font-weight: 500;
	opacity: 0.9;
	font-family: 'helvetica', serif;
}

.table-container {
	margin-top: 20px;
}

.table-wrapper {
	overflow-x: auto;
	border-radius: 12px;
	border: 1px solid #e9ecef;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.data-table {
	width: 100%;
	border-collapse: collapse;
	font-family: 'helvetica', serif;
	background: white;
}

.data-table thead {
	background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

.data-table th {
	padding: 16px 12px;
	text-align: left;
	font-weight: 600;
	color: #404040;
	border-bottom: 2px solid #8aa05f;
	font-size: 0.95em;
	white-space: nowrap;
}

.data-table td {
	padding: 14px 12px;
	border-bottom: 1px solid #e9ecef;
	vertical-align: middle;
	font-size: 0.95em;
}

.data-table tbody tr:hover {
	background: #f8f9fa;
	transition: background 0.2s ease;
}

.data-table tbody tr:last-child td {
	border-bottom: none;
}

/* Table Cell Types */
.name-cell {
	font-weight: 600;
	color: #404040;
	min-width: 160px;
}

.address-cell {
	max-width: 200px;
	word-wrap: break-word;
}

.description-cell {
	max-width: 250px;
	color: #666;
}

.checkbox-cell {
	text-align: center;
	width: 60px;
}

.actions-cell {
	min-width: 180px;
}

/* Status Badges */
.status-badge {
	display: inline-block;
	padding: 4px 10px;
	border-radius: 20px;
	font-size: 0.85em;
	font-weight: 600;
	text-align: center;
	white-space: nowrap;
	font-family: 'helvetica', serif;
}

.badge-success {
	background: #d1edcc;
	color: #2d5a1e;
	border: 1px solid #4f9732;
}

.badge-danger {
	background: #ffe6e6;
	color: #c0392b;
	border: 1px solid #e74c3c;
}

.badge-warning {
	background: #fff3cd;
	color: #856404;
	border: 1px solid #ffc107;
}

.badge-info {
	background: #d1ecf1;
	color: #0c5460;
	border: 1px solid #17a2b8;
}

.badge-secondary {
	background: #f8f9fa;
	color: #6c757d;
	border: 1px solid #adb5bd;
}

/* Action Buttons */
.action-buttons {
	display: flex;
	gap: 8px;
	flex-wrap: wrap;
}

.inline-form {
	display: inline;
}

.btn-sm {
	padding: 6px 12px;
	font-size: 0.85em;
	border-radius: 6px;
	font-weight: 600;
	border: none;
	cursor: pointer;
	text-decoration: none;
	transition: all 0.2s ease;
	font-family: 'helvetica', serif;
}

.btn-sm.btn-primary {
	background: #4f9732;
	color: white;
}

.btn-sm.btn-primary:hover {
	background: #3d7828;
	transform: translateY(-1px);
}

.btn-sm.btn-danger {
	background: #e74c3c;
	color: white;
}

.btn-sm.btn-danger:hover {
	background: #c0392b;
	transform: translateY(-1px);
}

.btn-sm.btn-success {
	background: #27ae60;
	color: white;
}

.btn-sm.btn-success:hover {
	background: #219a52;
	transform: translateY(-1px);
}

/* Resident Info */
.resident-info {
	display: flex;
	flex-direction: column;
	gap: 4px;
}

.active-count {
	font-weight: 600;
	color: #4f9732;
}

.inactive-count {
	color: #6c757d;
	font-size: 0.85em;
}

/* Empty State */
.empty-state {
	text-align: center;
	padding: 60px 40px;
	color: #6c757d;
}

.empty-message {
	font-size: 1.1em;
	margin-bottom: 20px;
	font-family: 'helvetica', serif;
}

/* Responsive Table */
@media (max-width: 1200px) {
	.data-table th,
	.data-table td {
		padding: 12px 8px;
		font-size: 0.9em;
	}
	
	.action-buttons {
		flex-direction: column;
		gap: 4px;
	}
	
	.btn-sm {
		font-size: 0.8em;
		padding: 5px 10px;
	}
}

@media (max-width: 768px) {
	.card-header {
		flex-direction: column;
		gap: 16px;
		align-items: flex-start;
	}
	
	.stats-badge {
		align-self: flex-end;
		padding: 8px 16px;
	}
	
	.stats-number {
		font-size: 1.4em;
	}
	
	.data-table {
		font-size: 0.85em;
	}
	
	.data-table th,
	.data-table td {
		padding: 10px 6px;
	}
	
	.address-cell,
	.description-cell {
		max-width: 150px;
	}
}

/* --- Service Table Styles --- */
.service-table {
	width: 100%;
	border-collapse: collapse;
	font-family: 'helvetica', serif;
	background: white;
	border-radius: 12px;
	overflow: hidden;
}

.service-table thead {
	background: linear-gradient(135deg, #4f9732 0%, #3d7828 100%);
	color: white;
}

.service-table th {
	padding: 18px 16px;
	text-align: center;
	font-weight: 600;
	font-size: 1em;
	border-right: 1px solid rgba(255, 255, 255, 0.2);
	font-family: 'helvetica', serif;
}

.service-table th:last-child {
	border-right: none;
}

.name-header {
	text-align: left !important;
	min-width: 200px;
	background: linear-gradient(135deg, #404040 0%, #2c2c2c 100%);
}

.meal-header {
	min-width: 90px;
}

.service-table tbody tr {
	border-bottom: 1px solid #e9ecef;
	transition: all 0.2s ease;
}

.service-table tbody tr:hover {
	background: #f8f9fa;
	transform: translateX(2px);
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.service-table tbody tr:last-child {
	border-bottom: none;
}

.service-table td {
	padding: 16px;
	vertical-align: middle;
	border-right: 1px solid #e9ecef;
}

.service-table td:last-child {
	border-right: none;
}

.name-cell {
	text-align: left;
	font-weight: 600;
	color: #404040;
	font-size: 1.05em;
	background: #fafbfc !important;
	width: fit-content;
	font-family: 'helvetica', serif;
}

.service-row:hover .name-cell {
	background: #f1f3f4 !important;
	color: #4f9732;
}

.checkbox-cell {
	text-align: center;
	width: 60px;
	padding: 16px 12px;
}

.service-checkbox {
	cursor: pointer;
	transition: all 0.3s ease;
}

.service-checkbox:disabled {
	opacity: 0.5;
	cursor: not-allowed;
}

/* Status Message */
.status-message {
	margin-top: 20px;
	padding: 12px 16px;
	border-radius: 8px;
	font-weight: 500;
	text-align: center;
	font-family: 'helvetica', serif;
	opacity: 0;
	transition: opacity 0.3s ease;
}

.status-message.show {
	opacity: 1;
}

.status-message.success {
	background: #d1edcc;
	color: #2d5a1e;
	border: 1px solid #4f9732;
}

.status-message.error {
	background: #ffe6e6;
	color: #c0392b;
	border: 1px solid #e74c3c;
}

/* Responsive Service Table */
@media (max-width: 1200px) {
	.service-table th,
	.service-table td {
		padding: 14px 10px;
		font-size: 0.95em;
	}
	
	.meal-header,
	.checkbox-cell {
		min-width: 70px;
		width: 70px;
	}
}

@media (max-width: 900px) {
	.service-table {
		font-size: 0.9em;
	}
	
	.service-table th,
	.service-table td {
		padding: 12px 8px;
	}
	
	.name-cell {
		min-width: 100px;
		font-size: 1em;
	}
	
	.meal-header,
	.checkbox-cell {
		min-width: 60px;
		width: 60px;
	}
}

@media (max-width: 600px) {
	.service-table th,
	.service-table td {
		padding: 10px 6px;
		font-size: 0.85em;
	}
	
	.name-cell {
		min-width: 80px;
		font-size: 0.9em;
	}
	
	.meal-header,
	.checkbox-cell {
		min-width: 45px;
		width: 45px;
	}
	
	/* Stack table headers on very small screens */
	.service-table thead th {
		font-size: 0.8em;
		padding: 8px 4px;
	}
}

/* --- Text Alignment Helpers --- */
.text-center {
	text-align: center;
}

.text-muted {
	color: #6c757d;
}

/* --- Abrechnung Styles --- */
.row-exceeded {
	background: linear-gradient(135deg, #fff3cd 0%, #ffeaa7 100%) !important;
	border-left: 4px solid #856404;
}

.row-exceeded:hover {
	background: linear-gradient(135deg, #ffecb3 0%, #fff3cd 100%) !important;
}

/* --- Dashboard Styles --- */
.dashboard-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
	gap: 24px;
	margin-bottom: 40px;
}

.dashboard-card {
	background: white;
	border-radius: 16px;
	box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
	border: 1px solid #e9ecef;
	padding: 24px;
	transition: all 0.3s ease;
	font-family: 'helvetica', serif;
}

.dashboard-card:hover {
	transform: translateY(-2px);
	box-shadow: 0 6px 25px rgba(0, 0, 0, 0.12);
}

.dashboard-card .card-header {
	display: flex;
	align-items: center;
	gap: 16px;
	margin-bottom: 16px;
	padding-bottom: 0;
	border-bottom: none;
}

.card-icon {
	font-size: 2.5em;
	width: 60px;
	height: 60px;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 16px;
	background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

.primary-card .card-icon {
	background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

.success-card .card-icon {
	background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

.warning-card .card-icon {
	background: linear-gradient(135deg, #f39c12 0%, #e67e22 100%);
}

.info-card .card-icon {
	background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
}

.card-stats .stats-number {
	font-size: 2.2em;
	font-weight: 700;
	color: #404040;
	margin: 0;
	line-height: 1;
}

.card-stats .stats-label {
	font-size: 1em;
	color: #4f9732;
	font-weight: 600;
	margin: 4px 0 0 0;
}

.detail-stats {
	display: flex;
	align-items: center;
	gap: 8px;
	font-size: 0.9em;
	color: #666;
	margin-top: 8px;
}

.detail-number {
	font-weight: 600;
	color: #4f9732;
}

.detail-separator {
	color: #8aa05f;
}

.dashboard-row {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 24px;
	margin-bottom: 32px;
}

/* Dashboard Meal Grid - Spezifisch für Dashboard */
.dashboard-meal-grid {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 12px;
	margin-top: 20px;
	max-width: 100%;
}

.dashboard-meal-card {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 8px;
	padding: 24px 16px;
	background: #f8f9fa;
	border-radius: 8px;
	border: 1px solid #e9ecef;
	transition: all 0.2s ease;
	text-align: center;
	min-height: 120px;
	justify-content: center;
	text-decoration: none;
	color: inherit;
}

a.dashboard-meal-card {
	text-decoration: none !important;
	color: inherit !important;
}

.dashboard-meal-card:hover {
	background: #e9ecef;
	transform: translateY(-1px);
}

.dashboard-meal-card:hover {
	background: #e9ecef;
	transform: translateY(-1px);
}

.dashboard-meal-card-large {
	/* Standard: normale Größe */
}

.dashboard-meal-icon {
	font-size: 1.8em;
	margin-bottom: 6px;
}

.dashboard-meal-content {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 6px;
}

.dashboard-meal-title {
	font-size: 1em;
	font-weight: 600;
	margin: 0;
	color: #404040;
	font-family: 'helvetica', serif;
	line-height: 1.2;
}

.dashboard-meal-count {
	font-size: 1.3em;
	font-weight: 700;
	color: #4f9732;
	margin: 0;
}

.dashboard-meal-card:hover .dashboard-meal-count {
	color: inherit;
}

/* Dashboard Actions Grid - Identisches Design zu Meal Cards */
.dashboard-actions-grid {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 12px;
	margin-top: 20px;
	max-width: 100%;
}

.dashboard-action-card {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 6px;
	padding: 16px 12px;
	background: #f8f9fa;
	border-radius: 8px;
	border: 1px solid #e9ecef;
	transition: all 0.2s ease;
	text-align: center;
	min-height: 90px;
	justify-content: center;
	text-decoration: none;
	color: #404040;
}

.dashboard-action-card:hover {
	background: #e9ecef;
	transform: translateY(-1px);
	color: #404040;
}

.dashboard-action-icon {
	font-size: 1.4em;
	margin-bottom: 4px;
}

.dashboard-action-content {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 2px;
}

.dashboard-action-title {
	font-size: 0.85em;
	font-weight: 600;
	margin: 0;
	color: inherit;
	font-family: 'helvetica', serif;
	line-height: 1.2;
}

.dashboard-action-description {
	font-size: 0.75em;
	font-weight: 400;
	margin: 0;
	color: #666;
	font-family: 'helvetica', serif;
	line-height: 1.2;
}

.meal-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
	gap: 20px;
	margin-top: 20px;
	max-width: 100%;
}

.meal-card {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 16px;
	background: #f8f9fa;
	border-radius: 12px;
	border: 1px solid #e9ecef;
	transition: all 0.2s ease;
}

.meal-card:hover {
	background: #8aa05f;
	color: #4f9732;
	transform: translateY(-1px);
}

.meal-card .meal-icon {
	font-size: 1.8em;
}

.meal-title {
	font-size: 1em;
	font-weight: 600;
	margin: 0 0 4px 0;
	color: inherit;
	font-family: 'helvetica', serif;
}

.meal-count {
	font-size: 1.2em;
	font-weight: 700;
	color: #4f9732;
}

.meal-card:hover .meal-count {
	color: inherit;
}

.areas-grid {
	display: grid;
	gap: 12px;
	margin-top: 20px;
}

.area-item {
	display: flex;
	align-items: center;
	padding: 12px 16px;
	background: #f8f9fa;
	border-radius: 8px;
	border: 1px solid #e9ecef;
	transition: all 0.2s ease;
}

.area-item:hover {
	background: #8aa05f;
	color: #4f9732;
}

.area-content {
	display: flex;
	justify-content: space-between;
	align-items: center;
	width: 100%;
}

.area-name {
	font-size: 1em;
	font-weight: 600;
	margin: 0;
	font-family: 'helvetica', serif;
}

.area-count {
	font-size: 0.9em;
	color: #666;
	font-weight: 500;
}

.area-item:hover .area-count {
	color: inherit;
	opacity: 0.8;
}

.actions-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(180px, 250px));
	gap: 12px;
	margin-top: 20px;
	max-width: 520px;
	justify-content: start;
}

/* Responsive Grid Layouts */
@media (max-width: 900px) {
	.meal-grid {
		grid-template-columns: 1fr;
		gap: 12px;
	}
	
	.actions-grid {
		grid-template-columns: 1fr;
		gap: 12px;
	}
	
	.dashboard-meal-grid {
		grid-template-columns: 1fr;
		gap: 8px;
	}
	
	.dashboard-actions-grid {
		grid-template-columns: 1fr;
		gap: 8px;
	}
}

/* Tablet: Mitarbeiter-Kachel doppelte Breite */
@media (min-width: 768px) and (max-width: 1366px) {
	.dashboard-meal-card-large {
		grid-column: span 2;
	}
}

@media (max-width: 600px) {
	.dashboard-row {
		grid-template-columns: 1fr;
		gap: 16px;
	}
}

.action-card {
	display: flex;
	align-items: center;
	gap: 16px;
	padding: 20px;
	background: #f8f9fa;
	border: 2px solid #e9ecef;
	border-radius: 12px;
	text-decoration: none;
	color: #404040;
	transition: all 0.3s ease;
	font-family: 'helvetica', serif;
}

.action-card:hover {
	background: #8aa05f;
	border-color: #4f9732;
	color: #4f9732;
	transform: translateY(-2px);
	box-shadow: 0 4px 15px rgba(79, 151, 50, 0.2);
}

.action-icon {
	font-size: 2em;
	width: 50px;
	height: 50px;
	display: flex;
	align-items: center;
	justify-content: center;
	background: white;
	border-radius: 12px;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.action-title {
	font-size: 1.1em;
	font-weight: 600;
	margin: 0 0 4px 0;
	color: inherit;
}

/* section title default: keep in normal flow (left) on large screens */

/* Center titles on medium and smaller screens (tablet / mobile) */
@media (max-width: 1024px) {
	.card-header {
		position: relative;
	}
	.card-header .section-title {
		position: absolute;
		left: 50%;
		transform: translateX(-50%);
		margin: 0;
		text-align: center;
		z-index: 1;
	}
	.card-header .back-button,
	.card-header .date-info {
		z-index: 2; /* keep controls above the centered title */
	}
}

/* Very small screens: keep normal flow to avoid overlap */
@media (max-width: 640px) {
	.card-header .section-title {
		position: static;
		transform: none;
		text-align: left;
		margin-right: 8px;
	}
	/* keep back-button, title and date-info on a single row on mobile */
	.card-header {
		display: flex;
		align-items: center;
		justify-content: space-between;
		gap: 8px;
	}
	.card-header .back-button {
		flex: 0 0 auto;
		margin-right: 8px;
	}
	.card-header .section-title {
		flex: 1 1 auto;
		text-align: center;
		margin: 0;
		order: 2;
	}
	.card-header .date-info {
		flex: 0 0 auto;
		order: 3;
	}
}
.action-description {
	font-size: 0.9em;
	color: #666;
	margin: 0;
	font-style: italic;
}

.action-card:hover .action-description {
	color: inherit;
	opacity: 0.8;
}

.status-grid {
	display: grid;
	gap: 16px;
	margin-top: 20px;
}

.status-item {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 16px;
	background: #f8f9fa;
	border-radius: 8px;
	border: 1px solid #e9ecef;
}

.status-indicator {
	width: 12px;
	height: 12px;
	border-radius: 50%;
	flex-shrink: 0;
}

.status-indicator.success {
	background: #27ae60;
	box-shadow: 0 0 0 3px rgba(39, 174, 96, 0.2);
}

.status-indicator.warning {
	background: #f39c12;
	box-shadow: 0 0 0 3px rgba(243, 156, 18, 0.2);
}

.status-indicator.info {
	background: #3498db;
	box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.2);
}

.status-title {
	font-size: 1em;
	font-weight: 600;
	margin: 0 0 4px 0;
	color: #404040;
	font-family: 'helvetica', serif;
}

.status-description {
	font-size: 0.9em;
	color: #666;
	margin: 0;
}

/* Dashboard Responsive */
@media (max-width: 1200px) {
	.dashboard-row {
		grid-template-columns: 1fr;
		gap: 24px;
	}
	
	.actions-grid {
		grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
	}
}

@media (max-width: 768px) {
	.dashboard-grid {
		grid-template-columns: 1fr;
		gap: 16px;
		margin-bottom: 24px;
	}
	
	.dashboard-card {
		padding: 20px;
	}
	
	.card-icon {
		font-size: 2em;
		width: 50px;
		height: 50px;
	}
	
	.card-stats .stats-number {
		font-size: 1.8em;
	}
	
	.meal-grid {
		grid-template-columns: 1fr;
		gap: 12px;
	}
	
	.actions-grid {
		grid-template-columns: 1fr;
		gap: 12px;
	}
	
	.action-card {
		padding: 16px;
	}
}

/* --- Inline Editing Styles --- */
.editable-field {
    cursor: pointer;
    position: relative;
    padding: 8px 12px;
    border-radius: 4px;
    transition: background-color 0.2s ease;
}

.editable-field:hover:not(.editing) {
    background-color: #f8f9fa;
    box-shadow: 0 0 0 1px #8aa05f;
}

.editable-field.editing {
    background-color: #fff;
    cursor: default;
}

.inline-edit-input,
.inline-edit-select {
    width: 100%;
    padding: 6px 8px;
    border: 2px solid #4f9732;
    border-radius: 4px;
    font-size: 0.9em;
    font-family: 'helvetica', serif;
    background: #fff;
    box-sizing: border-box;
    min-width: 120px;
}

.inline-edit-input:focus,
.inline-edit-select:focus {
    outline: none;
    border-color: #4f9732;
    box-shadow: 0 0 0 2px rgba(79, 151, 50, 0.2);
}

.inline-edit-select {
    cursor: pointer;
}

/* Status Message für Inline-Editing */
.status-message {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 12px 20px;
    border-radius: 8px;
    font-family: 'helvetica', serif;
    font-weight: 600;
    z-index: 1000;
    transform: translateX(400px);
    opacity: 0;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.status-message.show {
    transform: translateX(0);
    opacity: 1;
}

.status-message.success {
    background: #d1edcc;
    color: #2d5a1e;
    border: 2px solid #4f9732;
}

.status-message.error {
    background: #ffe6e6;
    color: #c0392b;
    border: 2px solid #e74c3c;
}

/* Hover-Effekt für editierbare Zeilen */
.editable-row:hover {
    background-color: #f9fdf9;
}

.editable-row .editable-field:hover:not(.editing)::after {
    content: '✎';
    position: absolute;
    right: 4px;
    top: 50%;
    transform: translateY(-50%);
    color: #4f9732;
    font-size: 0.8em;
    opacity: 0.7;
}

/* Responsive Inline-Editing */
@media (max-width: 768px) {
    .inline-edit-input,
    .inline-edit-select {
        font-size: 16px; /* Prevents zoom on iOS */
        padding: 8px;
    }
    
    .status-message {
        right: 10px;
        left: 10px;
        transform: translateY(-100px);
    }
    
    .status-message.show {
        transform: translateY(0);
    }
}

/* --- Bewohner Zuordnung Styles --- */
.zuordnung-row:hover {
	background: #f8f9fa !important;
}

.bewohner-info {
	display: flex;
	flex-direction: column;
	gap: 2px;
}

.bewohner-info strong {
	color: #404040;
	font-size: 1.05em;
}

.bewohner-info small {
	color: #666;
	font-size: 0.85em;
}

.current-assignment {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 4px;
}

.current-assignment small {
	color: #666;
	font-size: 0.8em;
}

.bereich-select, .zimmer-input {
	width: 100%;
	max-width: 150px;
	padding: 8px 12px;
	border: 2px solid #8aa05f;
	border-radius: 6px;
	font-size: 0.9em;
	background: #fafbfc;
	transition: all 0.3s ease;
	font-family: 'helvetica', serif;
}

.zimmer-input {
	width: 80px !important;
	max-width: 80px !important;
	text-align: center;
	font-size: 0.8em !important;
	padding: 6px 4px;
}

.bereich-select:focus, .zimmer-input:focus {
	outline: none;
	border-color: #4f9732;
	background: #fff;
	box-shadow: 0 0 0 3px rgba(79, 151, 50, 0.1);
}

.assignment-status {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 4px;
}

.status-indicator {
	width: 12px;
	height: 12px;
	border-radius: 50%;
	transition: all 0.3s ease;
}

.status-indicator.ready {
	background: #95a5a6;
	box-shadow: 0 0 0 3px rgba(149, 165, 166, 0.2);
}

.status-indicator.saving {
	background: #f39c12;
	box-shadow: 0 0 0 3px rgba(243, 156, 18, 0.2);
	animation: pulse 1s infinite;
}

.status-indicator.success {
	background: #27ae60;
	box-shadow: 0 0 0 3px rgba(39, 174, 96, 0.2);
}

.status-indicator.error {
	background: #e74c3c;
	box-shadow: 0 0 0 3px rgba(231, 76, 60, 0.2);
}

@keyframes pulse {
	0% { transform: scale(1); }
	50% { transform: scale(1.2); }
	100% { transform: scale(1); }
}

.assignment-status small {
	font-size: 0.75em;
	color: #666;
	text-align: center;
}

/* Bereich-Übersicht Grid */
.bereiche-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
	gap: 20px;
	margin-top: 20px;
}

.bereich-card {
	background: white;
	border: 2px solid #e9ecef;
	border-radius: 12px;
	padding: 20px;
	transition: all 0.3s ease;
	min-height: 200px;
}

.bereich-card:hover {
	border-color: #8aa05f;
	box-shadow: 0 4px 15px rgba(79, 151, 50, 0.1);
}

.bereich-card.unassigned {
	border-color: #f39c12;
	background: linear-gradient(135deg, #fff9e6 0%, #fef7e0 100%);
}

.bereich-card.unassigned:hover {
	border-color: #e67e22;
	box-shadow: 0 4px 15px rgba(243, 156, 18, 0.1);
}

.bereich-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 16px;
	padding-bottom: 12px;
	border-bottom: 1px solid #e9ecef;
}

.bereich-title {
	font-size: 1.2em;
	font-weight: 600;
	color: #404040;
	margin: 0;
	font-family: 'helvetica', serif;
}

.bewohner-count {
	background: linear-gradient(135deg, #4f9732 0%, #3d7828 100%);
	color: white;
	padding: 6px 12px;
	border-radius: 20px;
	font-size: 0.9em;
	font-weight: 600;
	min-width: 30px;
	text-align: center;
}

.unassigned .bewohner-count {
	background: linear-gradient(135deg, #f39c12 0%, #e67e22 100%);
}

.bewohner-list {
	display: flex;
	flex-direction: column;
	gap: 8px;
	max-height: 300px;
	overflow-y: auto;
}

.bewohner-item {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 10px 12px;
	background: #f8f9fa;
	border-radius: 6px;
	border-left: 3px solid #4f9732;
	transition: all 0.2s ease;
}

.bewohner-item:hover {
	background: #e9ecef;
	transform: translateX(2px);
}

.unassigned .bewohner-item {
	border-left-color: #f39c12;
}

.bewohner-name {
	font-weight: 600;
	color: #404040;
	font-size: 0.95em;
}

.zimmer-nr {
	font-size: 0.85em;
	color: #4f9732;
	font-weight: 500;
	background: rgba(79, 151, 50, 0.1);
	padding: 2px 8px;
	border-radius: 12px;
}

.zimmer-nr.no-room {
	color: #e74c3c;
	background: rgba(231, 76, 60, 0.1);
}

/* --- Essenserfassung Styles (Komplett überarbeitet) --- */
.date-selector {
    display: flex;
    align-items: flex-end;
    gap: 16px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 16px 20px;
    border-radius: 12px;
    border: 1px solid #e9ecef;
}

.date-selector .form-label {
    color: #4f9732;
    font-weight: 600;
    margin-bottom: 8px;
}

.date-input {
    max-width: 200px;
    margin-bottom: 0;
    border: 2px solid #8aa05f;
    border-radius: 10px;
    padding: 12px 16px;
    font-size: 1.05em;
    background: white;
    transition: all 0.3s ease;
}

.date-input:focus {
    border-color: #4f9732;
    box-shadow: 0 0 0 3px rgba(79, 151, 50, 0.1);
}

.meal-form {
    margin: 0;
    width: 100%;
}

/* Meal Cards - Professionelles Design */
.meal-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 24px 20px;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    background: #ffffff;
    color: #495057;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    width: 100%;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.meal-card:hover {
    border-color: #6c5ce7;
    box-shadow: 0 2px 8px rgba(108, 92, 231, 0.15);
    transform: translateY(-1px);
}

.meal-card.primary-card {
    border-color: #6c5ce7;
}

.meal-card.primary-card:hover {
    border-color: #5b4cdb;
    box-shadow: 0 2px 8px rgba(108, 92, 231, 0.3);
}

.meal-card.success-card {
    border-color: #00b894;
}

.meal-card.success-card:hover {
    border-color: #00a085;
    box-shadow: 0 2px 8px rgba(0, 184, 148, 0.3);
}

.meal-card.info-card {
    border-color: #0984e3;
}

.meal-card.info-card:hover {
    border-color: #0770c4;
    box-shadow: 0 2px 8px rgba(9, 132, 227, 0.3);
}

.meal-icon {
    font-size: 2.5em;
    line-height: 1;
    margin: 0;
}

.meal-title {
    font-size: 1.1em;
    font-weight: 600;
    margin: 0;
    text-align: center;
}

.meal-subtitle {
    font-size: 0.9em;
    opacity: 0.8;
    margin: 0;
    text-align: center;
    font-weight: 400;
}

.quick-stats {
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid #e9ecef;
}

.stats-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 20px;
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 16px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 12px;
    border: 1px solid #e9ecef;
}

.stat-number {
    font-size: 2em;
    font-weight: 700;
    color: #4f9732;
    line-height: 1;
    margin-bottom: 4px;
    font-family: 'helvetica', serif;
}

.stat-label {
    font-size: 0.9em;
    color: #666;
    font-weight: 500;
    font-family: 'helvetica', serif;
}

/* Numpad Styles */
.numpad-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-bottom: 16px;
}

.numpad-btn {
    font-size: 1.5em;
    padding: 16px;
    background: #fafbfc;
    border: 2px solid #8aa05f;
    color: #4f9732;
    border-radius: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: 'helvetica', serif;
}

.numpad-btn:hover {
    background: #8aa05f;
    color: #404040;
    transform: translateY(-1px);
}

.numpad-btn:active {
    transform: translateY(0);
}

.zimmer-input {
    font-size: 1.8em;
    padding: 16px;
    border-radius: 12px;
    border: 2px solid #8aa05f;
    width: 100%;
    text-align: center;
    letter-spacing: 2px;
    font-weight: 700;
    margin-bottom: 12px;
    font-family: 'helvetica', serif;
    background: #fafbfc;
}

.zimmer-input:focus {
    outline: none;
    border-color: #4f9732;
    background: #fff;
}

.bewohner-card-area {
    flex: 1;
    min-height: 120px;
    padding: 20px;
    border: 2px dashed #8aa05f;
    border-radius: 12px;
    background: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666;
    font-style: italic;
}

.bewohner-card {
    background: #fff;
    border: 2px solid #4f9732;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 4px 12px rgba(79, 151, 50, 0.1);
}

.bewohner-name {
    font-size: 1.3em;
    font-weight: 700;
    color: #4f9732;
    margin-bottom: 8px;
}

.bewohner-details {
    color: #666;
    font-size: 0.95em;
}

/* Mahlzeit-Eingabe Tabelle */
.meal-input-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    font-family: 'helvetica', serif;
}

.meal-input-table th {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 16px 12px;
    text-align: left;
    font-weight: 600;
    color: #404040;
    border-bottom: 2px solid #8aa05f;
}

.meal-input-table td {
    padding: 12px;
    border-bottom: 1px solid #e9ecef;
    vertical-align: middle;
}

.meal-input-table tr:hover {
    background: #f8f9fa;
}

.mahlzeit-anzahl {
    width: 60px;
    padding: 8px 12px;
    border: 2px solid #8aa05f;
    border-radius: 8px;
    text-align: center;
    font-weight: 600;
    background: #fafbfc;
    transition: all 0.2s ease;
    cursor: pointer;
    font-family: 'helvetica', serif;
}

.mahlzeit-anzahl:focus {
    outline: none;
    border-color: #4f9732;
    background: #fff;
}

.mahlzeit-anzahl.marked {
    border-color: #4f9732;
    background: #eafbe7;
    color: #4f9732;
    font-weight: 700;
}

.bewohner-row {
    transition: all 0.2s ease;
}

.bewohner-row.highlight {
    background: #fff9e6;
    border-left: 4px solid #ffc107;
}

.bewohner-row.hidden {
    display: none;
}

/* Filter Buttons */
.filter-buttons {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 8px 16px;
    border: 2px solid #8aa05f;
    background: #fafbfc;
    color: #404040;
    border-radius: 20px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.2s ease;
    font-family: 'helvetica', serif;
}

.filter-btn:hover,
.filter-btn.active {
    background: #8aa05f;
    color: #404040;
}

.search-container {
    position: relative;
    margin-bottom: 20px;
}

.search-input {
    width: 100%;
    max-width: 400px;
    padding: 12px 40px 12px 16px;
    border: 2px solid #8aa05f;
    border-radius: 25px;
    font-size: 1em;
    font-family: 'helvetica', serif;
}

.search-input:focus {
    outline: none;
    border-color: #4f9732;
}

.search-clear {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #666;
    cursor: pointer;
    font-size: 1.2em;
}

.search-result {
    margin-top: 8px;
    font-size: 0.9em;
    font-style: italic;
}

/* Action Buttons (Überarbeitet) */
.action-buttons-row {
    display: flex;
    gap: 16px;
    justify-content: center;
    margin: 32px 0;
    flex-wrap: wrap;
    padding: 24px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 16px;
    border: 2px solid #e9ecef;
}

.toggle-all-btn {
    padding: 14px 28px;
    border: 2px solid transparent;
    border-radius: 12px;
    font-weight: 700;
    font-size: 1em;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    font-family: 'helvetica', serif;
    position: relative;
    overflow: hidden;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

.toggle-all-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transition: all 0.4s ease;
    transform: translate(-50%, -50%);
}

.toggle-all-btn:hover::before {
    width: 300px;
    height: 300px;
}

.toggle-all-btn.primary {
    background: linear-gradient(135deg, #4f9732 0%, #3d7828 100%);
    color: #fff;
    border-color: #4f9732;
}

.toggle-all-btn.primary:hover {
    background: linear-gradient(135deg, #3d7828 0%, #2d5a1e 100%);
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(79, 151, 50, 0.3);
}

.toggle-all-btn.secondary {
    background: linear-gradient(135deg, #6c757d 0%, #5a6268 100%);
    color: #fff;
    border-color: #6c757d;
}

.toggle-all-btn.secondary:hover {
    background: linear-gradient(135deg, #5a6268 0%, #495057 100%);
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(108, 117, 125, 0.3);
}

.toggle-all-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Back Button */
.back-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    color: #495057;
    text-decoration: none;
    font-weight: 500;
    font-size: 14px;
    margin-bottom: 20px;
    transition: all 0.2s ease;
}

.back-button:hover {
    background: #e9ecef;
    border-color: #ced4da;
    color: #343a40;
    transform: translateX(-2px);
}

/* Responsive Essenserfassung */
@media (max-width: 768px) {
    .meal-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .stats-row {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .date-selector {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .date-input {
        max-width: 100%;
    }
    
    .meal-card {
        min-width: auto;
        padding: 16px 12px;
    }
    
    .numpad-grid {
        gap: 8px;
    }
    
    .numpad-btn {
        padding: 12px;
        font-size: 1.2em;
    }
    
    .zimmer-input {
        font-size: 1.4em;
        padding: 12px;
    }
}

@media (max-width: 480px) {
    .meal-grid {
        grid-template-columns: 1fr;
    }
    
    .stats-row {
        grid-template-columns: 1fr;
    }
    
    .meal-card {
        flex-direction: row;
        text-align: left;
    }
    
    .meal-icon {
        font-size: 2em;
    }
    
    .meal-title {
        font-size: 1.1em;
    }
}

/* Responsive Bereiche Grid */
@media (max-width: 768px) {
	.bereiche-grid {
		grid-template-columns: 1fr;
		gap: 16px;
	}
	
	.bereich-card {
		padding: 16px;
		min-height: 150px;
	}
	
	.bereich-header {
		flex-direction: column;
		gap: 8px;
		align-items: flex-start;
	}
	
	.bewohner-item {
		flex-direction: column;
		align-items: flex-start;
		gap: 4px;
	}
	
	.bereich-select, .zimmer-input {
		max-width: 120px;
		font-size: 0.85em;
	}
}

/* === ESSENSERFASSUNG VERBESSERTE STYLES === */

/* Meal Input Table */
.meal-input-table {
	width: 100%;
	border-collapse: collapse;
	margin-top: 16px;
}

.meal-input-table thead th {
	background: #f8f9fa;
	border-bottom: 2px solid #404040;
	font-weight: 600;
	color: #404040;
	padding: 12px 8px;
	text-align: center;
	font-size: 0.9em;
}

.meal-input-table .name-header {
	text-align: left;
	width: 300px;
	min-width: 200px;
}

.meal-input-table .meal-header {
	width: 80px;
	min-width: 60px;
}

.meal-input-table tbody tr {
	border-bottom: 1px solid #e9ecef;
	transition: background-color 0.2s ease;
}

.meal-input-table tbody tr:hover {
	background-color: #f8f9fa;
}

.meal-input-table .name-cell {
	padding: 12px;
	vertical-align: middle;
}

.meal-input-table .checkbox-cell {
	padding: 8px;
	text-align: center;
	vertical-align: middle;
}

/* Bewohner Info */
.bewohner-info {
	display: flex;
	flex-direction: column;
	gap: 4px;
}

.bewohner-info strong {
	color: #404040;
	font-size: 0.95em;
	font-weight: 600;
}

.bewohner-info small {
	display: flex;
	align-items: center;
	gap: 8px;
	font-size: 0.8em;
	color: #666;
}

/* Status Badges */
.status-badge {
	padding: 2px 6px;
	border-radius: 12px;
	font-size: 0.7em;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.5px;
}

.badge-success {
	background-color: #d4edda;
	color: #155724;
	border: 1px solid #c3e6cb;
}

.badge-info {
	background-color: #cce7ff;
	color: #004085;
	border: 1px solid #b3d9ff;
}

/* Mahlzeit Anzahl Inputs */
.mahlzeit-anzahl {
	width: 50px;
	height: 36px;
	text-align: center;
	border: 2px solid #e9ecef;
	border-radius: 6px;
	font-size: 14px;
	font-weight: 600;
	background: #fff;
	color: #404040;
	cursor: pointer;
	transition: all 0.2s ease;
	outline: none;
}

.mahlzeit-anzahl:hover {
	border-color: #4f9732;
	box-shadow: 0 0 0 3px rgba(79, 151, 50, 0.1);
}

.mahlzeit-anzahl:focus {
	border-color: #4f9732;
	box-shadow: 0 0 0 3px rgba(79, 151, 50, 0.2);
}

.mahlzeit-anzahl.marked {
	background: #4f9732;
	color: white;
	border-color: #4f9732;
}

.mahlzeit-anzahl.marked:hover {
	background: #3d7a28;
	border-color: #3d7a28;
}

/* Filter Section */
.filter-section {
	background: #f8f9fa;
	padding: 20px;
	border-radius: 8px;
	border: 1px solid #e9ecef;
}

.search-container {
	position: relative;
	max-width: 400px;
}

.essenserfassung-search {
	position: relative;
	width: 100%;
	margin-bottom: 20px;
}

.essenserfassung-search .search-input {
	width: 100%;
	padding: 12px 40px 12px 16px;
	border: 2px solid #8aa05f;
	border-radius: 25px;
	font-size: 1em;
	font-family: 'helvetica', serif;
}

.essenserfassung-search .search-input:focus {
	outline: none;
	border-color: #4f9732;
}

.essenserfassung-search .search-clear {
	position: absolute;
	right: -40px;
	top: 50%;
	transform: translateY(-50%);
	background: none;
	border: none;
	color: #666;
	cursor: pointer;
	font-size: 1.2em;
}

.search-input {
	width: 100%;
	padding: 12px 16px;
	padding-right: 40px;
	border: 2px solid #e9ecef;
	border-radius: 8px;
	font-size: 14px;
	background: #fff;
	transition: all 0.2s ease;
}

.search-input:focus {
	border-color: #4f9732;
	box-shadow: 0 0 0 3px rgba(79, 151, 50, 0.1);
	outline: none;
}

.search-clear {
	position: absolute;
	right: 12px;
	top: 50%;
	transform: translateY(-50%);
	background: none;
	border: none;
	font-size: 18px;
	color: #666;
	cursor: pointer;
	padding: 0;
	width: 20px;
	height: 20px;
	display: flex;
	align-items: center;
	justify-content: center;
}

.search-clear:hover {
	color: #404040;
}

/* Filter Buttons */
.filter-buttons {
	display: flex;
	gap: 8px;
	flex-wrap: wrap;
}

.filter-btn {
	padding: 8px 16px;
	border: 2px solid #e9ecef;
	background: #fff;
	border-radius: 6px;
	font-size: 13px;
	font-weight: 600;
	color: #404040;
	cursor: pointer;
	transition: all 0.2s ease;
}

.filter-btn:hover {
	border-color: #4f9732;
	background: rgba(79, 151, 50, 0.05);
}

.filter-btn.active {
	background: #4f9732;
	border-color: #4f9732;
	color: white;
}

/* Action Buttons Row */
.action-buttons-row {
	display: flex;
	gap: 8px;
	margin-bottom: 20px;
	flex-wrap: wrap;
}

.toggle-all-btn {
	padding: 8px 16px;
	border-radius: 6px;
	font-size: 14px;
	font-weight: 500;
	cursor: pointer;
	transition: all 0.2s ease;
	border: 1px solid transparent;
}

.toggle-all-btn.primary {
	background: #6c5ce7;
	color: white;
	border-color: #6c5ce7;
}

.toggle-all-btn.primary:hover {
	background: #5b4cdb;
	border-color: #5b4cdb;
}

.toggle-all-btn.secondary {
	background: #f8f9fa;
	color: #495057;
	border-color: #dee2e6;
}

.toggle-all-btn.secondary:hover {
	background: #e9ecef;
	border-color: #ced4da;
}

/* Numpad Popup */
.numpad-popup {
	position: fixed;
	background: #ffffff;
	border-radius: 8px;
	box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
	border: 1px solid #dee2e6;
	z-index: 10000;
	min-width: 280px;
	transform: scale(0.95);
	opacity: 0;
	transition: all 0.2s ease;
}

.numpad-popup.visible {
	transform: scale(1);
	opacity: 1;
}

.numpad-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 16px 20px;
	border-bottom: 1px solid #e9ecef;
	background: #f8f9fa;
}

.numpad-header span {
	font-weight: 600;
	color: #495057;
	font-size: 14px;
}

.numpad-close {
	background: #ffffff;
	border: 1px solid #dee2e6;
	font-size: 16px;
	color: #6c757d;
	cursor: pointer;
	padding: 0;
	width: 28px;
	height: 28px;
	border-radius: 4px;
	display: flex;
	align-items: center;
	justify-content: center;
}

.numpad-close:hover {
	background: #f8f9fa;
	color: #495057;
}

.numpad-display {
	padding: 20px;
	text-align: center;
	border-bottom: 1px solid #e9ecef;
}

.numpad-display span {
	font-size: 32px;
	font-weight: 700;
	color: #4f9732;
	padding: 12px 20px;
	background: #f8f9fa;
	border-radius: 8px;
	border: 2px solid #e9ecef;
	min-width: 80px;
	display: inline-block;
}

.numpad-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 12px;
	padding: 20px;
}

.numpad-btn {
	padding: 16px;
	font-size: 18px;
	font-weight: 600;
	border: 2px solid #e9ecef;
	border-radius: 8px;
	background: #fff;
	color: #404040;
	cursor: pointer;
	transition: all 0.2s ease;
	min-height: 56px;
	display: flex;
	align-items: center;
	justify-content: center;
}

.numpad-btn:hover {
	border-color: #4f9732;
	background: rgba(79, 151, 50, 0.05);
	transform: translateY(-1px);
}

.numpad-btn:active {
	transform: translateY(0);
}

.numpad-btn.clear {
	background: #fff5f5;
	color: #dc3545;
	border-color: #f8d7da;
}

.numpad-btn.clear:hover {
	background: #f8d7da;
	border-color: #dc3545;
}

.numpad-btn.confirm {
	background: #4f9732;
	color: white;
	border-color: #4f9732;
}

.numpad-btn.confirm:hover {
	background: #3d7a28;
	border-color: #3d7a28;
}

/* Toast Messages */
.toast {
	position: fixed;
	top: 20px;
	right: 20px;
	padding: 12px 20px;
	border-radius: 6px;
	color: white;
	font-weight: 500;
	z-index: 10001;
	opacity: 0;
	transform: translateX(100px);
	transition: all 0.3s ease;
}

.toast.toast-success {
	background-color: #4f9732;
}

.toast.toast-error {
	background-color: #dc3545;
}

.toast.toast-info {
	background-color: #404040;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
	.meal-input-table .name-header {
		width: 200px;
		min-width: 150px;
	}
	
	.meal-input-table .meal-header {
		width: 60px;
		min-width: 50px;
	}
	
	.bewohner-info strong {
		font-size: 0.9em;
	}
	
	.bewohner-info small {
		font-size: 0.75em;
	}
	
	.mahlzeit-anzahl {
		width: 45px;
		height: 32px;
		font-size: 13px;
	}
	
	.filter-buttons {
		justify-content: center;
	}
	
	.action-buttons-row {
		justify-content: center;
	}
	
	.numpad-popup {
		min-width: 260px;
		left: 8px !important;
		right: 8px !important;
		max-width: calc(100vw - 16px);
	}
	
	.numpad-grid {
		gap: 8px;
		padding: 16px;
	}
	
	.numpad-btn {
		min-height: 48px;
		font-size: 16px;
		padding: 12px;
	}
}

@media (max-width: 480px) {
	.filter-section {
		padding: 16px;
	}
	
	.search-container {
		max-width: 100%;
	}
	
	.filter-buttons {
		flex-direction: column;
		align-items: stretch;
	}
	
	.filter-btn {
		text-align: center;
	}
	
	.action-buttons-row {
		flex-direction: column;
		gap: 6px;
	}
}

/* === ZIMMERNUMMER-EINGABE === */

.zimmer-eingabe-section {
	margin-bottom: 32px;
	background: #ffffff;
	border-radius: 8px;
	padding: 24px;
	border: 1px solid #dee2e6;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.zimmer-layout {
	display: grid;
	/* allow columns to shrink below their content to avoid horizontal overflow */
	grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
	gap: 24px;
	align-items: start;
}

/* Numpad Container */
.numpad-container {
	background: #f8f9fa;
	border-radius: 8px;
	padding: 20px;
	border: 1px solid #dee2e6;
}

.numpad-header-section {
	margin-bottom: 20px;
	/* allow label and input to sit side-by-side but wrap on small widths */
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 12px;
	flex-wrap: wrap;
}

.numpad-header-section .form-label {
	display: block;
	margin-bottom: 12px;
	font-weight: 600;
	color: #495057;
	font-size: 1em;
}

.zimmer-display {
	width: 100%;
	height: 60px;
	text-align: center;
	font-size: 2em;
	font-weight: 600;
	border: 2px solid #dee2e6;
	border-radius: 8px;
	background: #ffffff;
	color: #6c757d;
	letter-spacing: 2px;
	transition: all 0.2s ease;
	box-sizing: border-box;
	max-width: 100%;
	/* allow the input to shrink on narrow containers */
	min-width: 0;
}

.zimmer-display:not(:placeholder-shown) {
	border-color: #6c5ce7;
	background: #ffffff;
	color: #6c5ce7;
}

/* Compact Numpad Grid */
.numpad-grid-compact {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 12px;
	margin-top: 16px;
}

.numpad-btn-compact {
	height: 50px;
	border: 1px solid #dee2e6;
	border-radius: 6px;
	background: #ffffff;
	font-size: 1.2em;
	font-weight: 600;
	color: #495057;
	cursor: pointer;
	transition: all 0.2s ease;
	display: flex;
	align-items: center;
	justify-content: center;
}

.numpad-btn-compact:hover {
	border-color: #6c5ce7;
	background: #f8f9fa;
}

.numpad-btn-compact:active {
	transform: scale(0.95);
}

.numpad-btn-compact.clear {
	background: #dc3545;
	border-color: #dc3545;
	color: white;
}

.numpad-btn-compact.clear:hover {
	background: #c82333;
	border-color: #c82333;
}

/* Ensure grid children can shrink and avoid causing horizontal overflow */
.numpad-container,
.bewohner-display-area {
    min-width: 0;
}

.numpad-btn-compact.confirm {
	background: #28a745;
	border-color: #28a745;
	color: white;
	font-weight: 700;
}

.numpad-btn-compact.confirm:hover {
	background: #218838;
	border-color: #218838;
}

/* Bewohner Display Area */
.bewohner-display-area {
	background: #ffffff;
	border-radius: 8px;
	border: 1px solid #dee2e6;
	min-height: 280px;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px;
}

.bewohner-card-container {
	width: 100%;
	padding: 0;
}

/* Placeholder State */
.bewohner-placeholder {
	text-align: center;
	padding: 40px 24px;
	color: #6c757d;
	background: #f8f9fa;
	border-radius: 8px;
	border: 2px dashed #dee2e6;
}

.bewohner-placeholder .placeholder-icon {
	font-size: 3em;
	margin-bottom: 16px;
	opacity: 0.7;
}

.bewohner-placeholder .placeholder-text {
	font-size: 1.1em;
	font-weight: 600;
	margin-bottom: 8px;
	color: #495057;
}

.bewohner-placeholder .placeholder-subtext {
	font-size: 0.9em;
	color: #6c757d;
}

.bewohner-placeholder.error {
	border-color: #dc3545;
	background: #fff5f5;
}

.bewohner-placeholder.error .placeholder-icon {
	color: #dc3545;
}

.bewohner-placeholder.error .placeholder-text {
	color: #dc3545;
}

/* Found Bewohner Card */
.bewohner-card-found {
	background: #ffffff;
	border: 2px solid #28a745;
	border-radius: 8px;
	padding: 24px;
	box-shadow: 0 2px 8px rgba(40, 167, 69, 0.1);
}

.bewohner-header {
	margin-bottom: 20px;
	padding-bottom: 16px;
	border-bottom: 1px solid #e9ecef;
}

.bewohner-name {
	font-size: 18px;
	font-weight: 600;
	color: #495057;
	margin-bottom: 4px;
}

.bewohner-zimmer {
	display: inline-block;
	background: #f8f9fa;
	color: #495057;
	padding: 4px 8px;
	border-radius: 4px;
	font-size: 13px;
	font-weight: 500;
	border: 1px solid #dee2e6;
}

.bewohner-typ {
	font-size: 12px;
	color: #6c757d;
	margin-top: 6px;
}

/* Meal Controls */
.meal-controls {
	margin-bottom: 20px;
}

.meal-title {
	font-size: 16px;
	font-weight: 600;
	color: #404040;
	margin-bottom: 16px;
	text-align: center;
}

.counter-controls {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 20px;
}

.counter-btn {
	width: 44px;
	height: 44px;
	border: 2px solid #e9ecef;
	border-radius: 8px;
	font-size: 20px;
	font-weight: 600;
	cursor: pointer;
	transition: all 0.2s ease;
	display: flex;
	align-items: center;
	justify-content: center;
	background: #fff;
	color: #404040;
}

.counter-btn.minus {
	border-color: #dc3545;
	color: #dc3545;
}

.counter-btn.minus:hover {
	background: #dc3545;
	color: white;
	transform: scale(1.05);
}

.counter-btn.plus {
	border-color: #4f9732;
	color: #4f9732;
}

.counter-btn.plus:hover {
	background: #4f9732;
	color: white;
	transform: scale(1.05);
}

.counter-display {
	font-size: 24px;
	font-weight: 700;
	color: #404040;
	min-width: 50px;
	text-align: center;
	background: #f8f9fa;
	border: 2px solid #e9ecef;
	border-radius: 8px;
	padding: 8px 12px;
}

.counter-display.has-value {
	background: #f0f8f0;
	border-color: #4f9732;
	color: #4f9732;
}

/* Meal Status */
.meal-status {
	font-size: 14px;
	font-weight: 500;
	color: #6c757d;
	text-align: center;
	padding: 8px 12px;
	border-radius: 6px;
	background: #f8f9fa;
	border: 1px solid #e9ecef;
}

.meal-status.success {
	background: #f0f8f0;
	color: #4f9732;
	border-color: #d4edda;
}

/* Responsive Design */
/* Stack vertically only for smartphones and smaller */
@media (max-width: 767px) {
	.zimmer-layout {
		grid-template-columns: 1fr;
		gap: 24px;
		max-width: 400px;
		margin: 0 auto;
	}
	
	.numpad-container,
	.bewohner-display-area {
		width: 100%;
	}

	/* reduce size of the big room input on small screens to avoid overflow */
	.zimmer-display {
		font-size: 1.6em;
		height: 50px;
	}
}

@media (max-width: 768px) {
	.zimmer-eingabe-section {
		padding: 16px;
	}
	
	.zimmer-layout {
		gap: 16px;
	}
	
	.bewohner-card-found {
		padding: 16px;
	}
	
	.bewohner-name {
		font-size: 20px;
	}
	
	.counter-btn {
		width: 45px;
		height: 45px;
		font-size: 20px;
	}
	
	.counter-display {
		font-size: 28px;
		min-width: 50px;
		padding: 6px 12px;
	}
}

@media (max-width: 900px) {
	.main-content {
		margin-left: 0;
		padding: 84px 16px 32px 16px;
	}
}

/* =============================================== */
/* COMPREHENSIVE RESPONSIVE STYLES */
/* TABLET (768px - 1024px) & SMARTPHONE (480px - 767px) */
/* =============================================== */

/* === TABLET STYLES (768px - 1024px) === */
@media (min-width: 768px) and (max-width: 1024px) {
	/* Navigation & Layout */
	.sidebar {
		width: 240px;
	}
	

	.topbar-content {
		padding: 0 24px;
	}
	
	.page-title {
		font-size: 1.9em;
	}
	
	.page-subtitle {
		font-size: 1em;
	}
	
	/* Content & Forms */
	.content-card {
		padding: 32px;
		margin-bottom: 24px;
	}
	
	.form-grid {
		grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
		gap: 20px;
	}
	
	.address-grid {
		grid-template-columns: 1fr;
	}
	
	.checkbox-grid {
		grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
		gap: 14px;
	}
	
	/* Tables */
	.data-table th,
	.data-table td {
		padding: 12px 10px;
		font-size: 0.9em;
	}
	
	.name-cell {
		min-width: 140px;
	}
	
	.address-cell,
	.description-cell {
		max-width: 180px;
	}
	
	.action-buttons {
		gap: 6px;
	}
	
	.btn-sm {
		padding: 5px 10px;
		font-size: 0.8em;
	}
	
	/* Service Tables */
	.service-table th,
	.service-table td {
		padding: 14px 12px;
		font-size: 0.95em;
	}
	
	.meal-header,
	.checkbox-cell {
		min-width: 100px;
		width: 100px;
	}
	
	/* Dashboard */
	.dashboard-grid {
		grid-template-columns: repeat(2, 1fr);
		gap: 20px;
	}
	
	.dashboard-card {
		padding: 20px;
	}
	
	.card-icon {
		font-size: 2.2em;
		width: 55px;
		height: 55px;
	}
	
	.card-stats .stats-number {
		font-size: 2em;
	}
	
	.meal-grid {
		grid-template-columns: repeat(2, 1fr);
		gap: 14px;
	}
	
	.actions-grid {
		grid-template-columns: repeat(2, 1fr);
		gap: 14px;
	}
	
	/* Essenserfassung */
	.meal-card {
		min-width: 140px;
		padding: 20px 16px;
	}
	
	.meal-icon {
		font-size: 2.2em;
	}
	
	.meal-title {
		font-size: 1.1em;
	}
	
	.stats-row {
		grid-template-columns: repeat(3, 1fr);
		gap: 16px;
	}
	
	.meal-input-table .name-header {
		width: 250px;
		min-width: 180px;
	}
	
	.meal-input-table .meal-header {
		width: 70px;
		min-width: 55px;
	}
	
	.mahlzeit-anzahl {
		width: 48px;
		height: 34px;
		font-size: 13px;
	}
	
	/* Bereiche */
	.bereiche-grid {
		grid-template-columns: repeat(2, 1fr);
		gap: 18px;
	}
	
	.bereich-card {
		padding: 18px;
		min-height: 180px;
	}
	
	/* Zimmer-Eingabe */
	.zimmer-layout {
		grid-template-columns: 1fr 1fr; /* Keep side-by-side on tablets */
		gap: 20px;
	}
	
	.numpad-container {
		padding: 18px;
	}
	
	.zimmer-display {
		height: 55px;
		font-size: 28px;
	}
	
	.numpad-btn-compact {
		height: 45px;
		font-size: 16px;
	}
	
	/* Buttons */
	.btn {
		padding: 12px 24px;
		font-size: 1em;
	}
	
	.form-actions {
		gap: 14px;
	}
}

/* === SMARTPHONE STYLES (480px - 767px) === */
@media (min-width: 480px) and (max-width: 767px) {
	/* Navigation & Layout */
	.sidebar {
		width: 100vw;
		left: -100vw;
	}
	
	.sidebar.mobile-open {
		transform: translateX(0);
		left: 0;
	}
	
	.main-content {
		margin-left: 0;
		padding: 74px 16px 24px 16px;
	}
	
	.topbar-content {
		padding: 0 16px;
	}
	
	.nav-brand h1 {
		font-size: 1.3em;
	}
	
	.brand-subtitle {
		font-size: 0.85em;
	}
	
	/* Page Headers */
	.page-title {
		font-size: 1.7em;
		margin-bottom: 6px;
	}
	
	.page-subtitle {
		font-size: 0.95em;
	}
	
	/* Content & Forms */
	.content-card {
		padding: 20px 16px;
		margin-bottom: 20px;
	}
	
	.form-section {
		margin-bottom: 28px;
		padding-bottom: 20px;
	}
	
	.section-title {
		font-size: 1.2em;
		margin-bottom: 18px;
	}
	
	.form-grid {
		grid-template-columns: 1fr;
		gap: 16px;
	}
	
	.address-grid {
		grid-template-columns: 1fr;
	}
	
	.checkbox-grid {
		grid-template-columns: 1fr;
		gap: 10px;
	}
	
	.form-input,
	.form-select {
		padding: 12px 14px;
		font-size: 16px; /* Verhindert Zoom auf iOS */
	}
	
	/* Buttons */
	.form-actions {
		flex-direction: column;
		gap: 10px;
		margin-top: 30px;
		padding-top: 20px;
	}
	
	.btn {
		width: 100%;
		padding: 14px 20px;
		font-size: 1em;
	}
	
	/* Tables */
	.table-wrapper {
		border-radius: 8px;
	}
	
	.data-table {
		font-size: 0.85em;
	}
	
	.data-table th,
	.data-table td {
		padding: 10px 8px;
		font-size: 0.85em;
	}
	
	.data-table th {
		padding: 14px 8px;
	}
	
	.name-cell {
		min-width: 120px;
		font-size: 0.9em;
	}
	
	.address-cell,
	.description-cell {
		max-width: 140px;
		font-size: 0.8em;
	}
	
	.action-buttons {
		flex-direction: column;
		gap: 6px;
	}
	
	.btn-sm {
		padding: 8px 12px;
		font-size: 0.8em;
		text-align: center;
	}
	
	/* Card Headers */
	.card-header {
		flex-direction: column;
		gap: 12px;
		align-items: flex-start;
	}
	
	.stats-badge {
		align-self: flex-end;
		padding: 6px 14px;
	}
	
	.stats-number {
		font-size: 1.4em;
	}
	
	/* Service Tables */
	.service-table {
		font-size: 0.85em;
	}
	
	.service-table th,
	.service-table td {
		padding: 10px 6px;
	}
	
	.service-table th {
		padding: 16px 8px;
	}
	
	.name-cell {
		min-width: 140px;
		font-size: 0.9em;
	}
	
	.meal-header,
	.checkbox-cell {
		min-width: 55px;
		width: 55px;
	}
	
	.service-checkbox {
		transform: scale(0.9);
	}
	
	/* Dashboard */
	.dashboard-grid {
		grid-template-columns: 1fr;
		gap: 16px;
		margin-bottom: 20px;
	}
	
	.dashboard-card {
		padding: 18px;
	}
	
	.dashboard-card .card-header {
		gap: 12px;
	}
	
	.card-icon {
		font-size: 2em;
		width: 50px;
		height: 50px;
	}
	
	.card-stats .stats-number {
		font-size: 1.8em;
	}
	
	.dashboard-row {
		grid-template-columns: 1fr;
		gap: 20px;
		margin-bottom: 24px;
	}
	
	.meal-grid {
		grid-template-columns: repeat(2, 1fr);
		gap: 12px;
	}
	
	.meal-card {
		padding: 14px;
	}
	
	.meal-title {
		font-size: 0.95em;
	}
	
	.meal-count {
		font-size: 1.1em;
	}
	
	.actions-grid {
		grid-template-columns: 1fr;
		gap: 10px;
	}
	
	.action-card {
		padding: 16px;
	}
	
	.action-icon {
		font-size: 1.8em;
		width: 45px;
		height: 45px;
	}
	
	/* Essenserfassung */
	.date-selector {
		flex-direction: column;
		align-items: stretch;
		gap: 12px;
	}
	
	.date-input {
		max-width: 100%;
	}
	
	.meal-card {
		min-width: auto;
		padding: 16px 12px;
	}
	
	.meal-icon {
		font-size: 2em;
	}
	
	.meal-title {
		font-size: 1em;
	}
	
	.stats-row {
		grid-template-columns: repeat(2, 1fr);
		gap: 12px;
	}
	
	.stat-item {
		padding: 12px;
	}
	
	.stat-number {
		font-size: 1.6em;
	}
	
	.stat-label {
		font-size: 0.8em;
	}
	
	/* Meal Input Table */
	.meal-input-table .name-header {
		width: 160px;
		min-width: 120px;
	}
	
	.meal-input-table .meal-header {
		width: 50px;
		min-width: 40px;
	}
	
	.meal-input-table th,
	.meal-input-table td {
		padding: 8px 4px;
		font-size: 0.8em;
	}
	
	.bewohner-info strong {
		font-size: 0.85em;
	}
	
	.bewohner-info small {
		font-size: 0.7em;
	}
	
	.mahlzeit-anzahl {
		width: 40px;
		height: 28px;
		font-size: 11px;
	}
	
	/* Filter & Search */
	.filter-section {
		padding: 14px;
	}
	
	.search-input {
		font-size: 16px; /* Verhindert Zoom auf iOS */
		padding: 10px 14px;
		padding-right: 36px;
	}
	
	.filter-buttons {
		justify-content: center;
		gap: 6px;
	}
	
	.filter-btn {
		padding: 6px 12px;
		font-size: 12px;
	}
	
	.action-buttons-row {
		justify-content: center;
		flex-direction: column;
		gap: 8px;
	}
	
	.toggle-all-btn {
		padding: 10px 16px;
		font-size: 13px;
	}
	
	/* Bereiche */
	.bereiche-grid {
		grid-template-columns: 1fr;
		gap: 14px;
	}
	
	.bereich-card {
		padding: 16px;
		min-height: auto;
	}
	
	.bereich-header {
		flex-direction: column;
		gap: 8px;
		align-items: flex-start;
	}
	
	.bewohner-count {
		font-size: 0.8em;
		padding: 4px 10px;
	}
	
	.bewohner-item {
		padding: 8px 10px;
	}
	
	.bewohner-name {
		font-size: 0.85em;
	}
	
	.zimmer-nr {
		font-size: 0.75em;
		padding: 1px 6px;
	}
	
	/* Zuordnung */
	.bereich-select,
	.zimmer-input {
		max-width: 100px;
		font-size: 0.8em;
		padding: 6px 8px;
	}
	
	.zimmer-input {
		width: 60px !important;
		max-width: 60px !important;
		text-align: center;
	}
	
	/* Zimmer-Eingabe */
	.zimmer-eingabe-section {
		padding: 16px;
	}
	
	.zimmer-layout {
		grid-template-columns: 1fr;
		gap: 16px;
		max-width: 100%;
	}
	
	.numpad-container {
		padding: 16px;
		min-height: 280px;
	}
	
	.zimmer-display {
		height: 50px;
		font-size: 24px;
		letter-spacing: 1px;
	}
	
	.numpad-grid-compact {
		gap: 10px;
		margin-top: 14px;
	}
	
	.numpad-btn-compact {
		height: 42px;
		font-size: 16px;
	}
	
	.bewohner-display-area {
		min-height: 250px;
	}
	
	.bewohner-card-found {
		padding: 16px;
	}
	
	.bewohner-name {
		font-size: 18px;
	}
	
	.counter-controls {
		gap: 16px;
	}
	
	.counter-btn {
		width: 40px;
		height: 40px;
		font-size: 18px;
	}
	
	.counter-display {
		font-size: 20px;
		min-width: 45px;
		padding: 6px 10px;
	}
	
	/* Toast & Popups */
	.toast {
		left: 10px;
		right: 10px;
		transform: translateY(-100px);
	}
	
	.toast.show {
		transform: translateY(0);
	}
	
	.numpad-popup {
		left: 8px !important;
		right: 8px !important;
		min-width: auto;
		max-width: calc(100vw - 16px);
	}
	
	.numpad-grid {
		gap: 8px;
		padding: 16px;
	}
	
	.numpad-btn {
		min-height: 44px;
		font-size: 16px;
		padding: 10px;
	}
	
	.numpad-display span {
		font-size: 28px;
		min-width: 70px;
	}
}

/* === EXTRA SMALL SMARTPHONES (max-width: 479px) === */
@media (max-width: 479px) {
	/* Navigation */
	.sidebar {
		width: 100vw;
		left: -100vw;
	}
	
	.sidebar.mobile-open {
		transform: translateX(0);
		left: 0;
	}
	
	.nav-links a,
	.sidebar .nav-links .dropdown-toggle {
		padding: 16px 18px;
		font-size: 1em;
	}
	
	.nav-user {
		padding: 18px;
		margin: 0;
		flex-shrink: 0;
		background: rgba(180, 210, 122, 0.1);
		border-top: 1px solid rgba(180, 210, 122, 0.3);
	}
	
	.topbar-content {
		padding: 0 12px;
	}
	
	.nav-brand h1 {
		font-size: 1.2em;
	}
	
	.brand-subtitle {
		font-size: 0.8em;
	}
	
	.main-content {
		padding: 74px 12px 20px 12px;
	}
	
	/* Page Headers */
	.page-title {
		font-size: 1.5em;
		line-height: 1.2;
	}
	
	.page-subtitle {
		font-size: 0.9em;
	}
	
	/* Content Cards */
	.content-card {
		padding: 16px 12px;
		border-radius: 12px;
	}
	
	.form-section {
		margin-bottom: 24px;
		padding-bottom: 16px;
	}
	
	.section-title {
		font-size: 1.1em;
		margin-bottom: 16px;
	}
	
	/* Forms */
	.form-input,
	.form-select {
		padding: 12px 12px;
		font-size: 16px;
		border-radius: 6px;
	}
	
	.form-checkbox {
		width: 18px;
		height: 18px;
	}
	
	.checkbox-group {
		gap: 10px;
	}
	
	.form-actions {
		margin-top: 24px;
		padding-top: 16px;
	}
	
	.btn {
		padding: 12px 16px;
		font-size: 0.95em;
		border-radius: 6px;
	}
	
	/* Tables */
	.data-table {
		font-size: 0.8em;
	}
	
	.data-table th,
	.data-table td {
		padding: 8px 4px;
		font-size: 0.8em;
	}
	
	.name-cell {
		min-width: 100px;
		font-size: 0.85em;
	}
	
	.address-cell,
	.description-cell {
		max-width: 100px;
		font-size: 0.75em;
	}
	
	.btn-sm {
		padding: 6px 8px;
		font-size: 0.75em;
	}
	
	/* Service Tables */
	.service-table {
		font-size: 0.8em;
	}
	
	.service-table th,
	.service-table td {
		padding: 8px 4px;
	}
	
	.name-cell {
		min-width: 100px;
		font-size: 0.8em;
	}
	
	.meal-header,
	.checkbox-cell {
		min-width: 45px;
		width: 45px;
	}
	
	.service-table thead th {
		font-size: 0.75em;
		padding: 12px 4px;
	}
	
	/* Dashboard */
	.dashboard-card {
		padding: 14px;
	}
	
	.card-icon {
		font-size: 1.8em;
		width: 45px;
		height: 45px;
	}
	
	.card-stats .stats-number {
		font-size: 1.6em;
	}
	
	.card-stats .stats-label {
		font-size: 0.9em;
	}
	
	.detail-stats {
		font-size: 0.8em;
	}
	
	.meal-grid {
		grid-template-columns: 1fr;
		gap: 10px;
	}
	
	.meal-card {
		flex-direction: row;
		text-align: left;
		padding: 12px;
		align-items: center;
		gap: 12px;
	}
	
	.meal-icon {
		font-size: 1.8em;
	}
	
	.meal-title {
		font-size: 0.9em;
		margin: 0;
		text-align: left;
	}
	
	.meal-count {
		font-size: 1em;
		margin-left: auto;
	}
	
	/* Essenserfassung */
	.meal-card {
		padding: 12px;
	}
	
	.stats-row {
		grid-template-columns: 1fr;
		gap: 10px;
	}
	
	.stat-item {
		padding: 10px;
	}
	
	.stat-number {
		font-size: 1.4em;
	}
	
	/* Meal Input Table */
	.meal-input-table .name-header {
		width: 120px;
		min-width: 100px;
	}
	
	.meal-input-table .meal-header {
		width: 40px;
		min-width: 35px;
	}
	
	.meal-input-table th,
	.meal-input-table td {
		padding: 6px 2px;
		font-size: 0.75em;
	}
	
	.bewohner-info strong {
		font-size: 0.8em;
	}
	
	.bewohner-info small {
		font-size: 0.65em;
		flex-direction: column;
		align-items: flex-start;
		gap: 4px;
	}
	
	.mahlzeit-anzahl {
		width: 35px;
		height: 26px;
		font-size: 10px;
	}
	
	.status-badge {
		font-size: 0.6em;
		padding: 1px 4px;
	}
	
	/* Filter & Search */
	.filter-section {
		padding: 12px;
	}
	
	.search-input {
		padding: 10px 12px;
		padding-right: 32px;
		font-size: 16px;
	}
	
	.filter-buttons {
		flex-direction: column;
		align-items: stretch;
		gap: 8px;
	}
	
	.filter-btn {
		text-align: center;
		padding: 8px 12px;
		font-size: 12px;
	}
	
	.action-buttons-row {
		flex-direction: column;
		gap: 6px;
	}
	
	.toggle-all-btn {
		padding: 8px 14px;
		font-size: 12px;
	}
	
	/* Bereiche */
	.bereich-card {
		padding: 12px;
	}
	
	.bereich-title {
		font-size: 1.1em;
	}
	
	.bewohner-count {
		font-size: 0.75em;
		padding: 3px 8px;
	}
	
	.bewohner-item {
		padding: 6px 8px;
	}
	
	.bewohner-name {
		font-size: 0.8em;
	}
	
	.zimmer-nr {
		font-size: 0.7em;
		padding: 1px 4px;
	}
	
	/* Zuordnung */
	.bereich-select,
	.zimmer-input {
		max-width: 80px;
		font-size: 0.75em;
		padding: 4px 6px;
	}
	
	.zimmer-input {
		width: 50px !important;
		max-width: 50px !important;
	}
	
	/* Zimmer-Eingabe */
	.zimmer-eingabe-section {
		padding: 12px;
	}
	
	.numpad-container {
		padding: 12px;
		min-height: 260px;
	}
	
	.zimmer-display {
		height: 45px;
		font-size: 20px;
		letter-spacing: 1px;
	}
	
	.numpad-grid-compact {
		gap: 8px;
		margin-top: 12px;
	}
	
	.numpad-btn-compact {
		height: 38px;
		font-size: 14px;
	}
	
	.bewohner-display-area {
		min-height: 220px;
	}
	
	.bewohner-card-found {
		padding: 12px;
	}
	
	.bewohner-name {
		font-size: 16px;
	}
	
	.bewohner-zimmer {
		font-size: 12px;
		padding: 2px 8px;
	}
	
	.meal-title {
		font-size: 14px;
		margin-bottom: 12px;
	}
	
	.counter-controls {
		gap: 12px;
	}
	
	.counter-btn {
		width: 36px;
		height: 36px;
		font-size: 16px;
	}
	
	.counter-display {
		font-size: 18px;
		min-width: 40px;
		padding: 4px 8px;
	}
	
	.meal-status {
		font-size: 12px;
		padding: 6px 10px;
	}
	
	/* Alerts & Messages */
	.alert {
		padding: 12px 16px;
		font-size: 0.9em;
	}
	
	.status-message {
		font-size: 0.9em;
		padding: 10px 16px;
	}
	
	/* Numpad Popup */
	.numpad-popup {
		min-width: auto;
		width: calc(100vw - 16px);
		left: 8px !important;
		right: 8px !important;
	}
	
	.numpad-header {
		padding: 12px 16px;
	}
	
	.numpad-display {
		padding: 16px;
	}
	
	.numpad-display span {
		font-size: 24px;
		min-width: 60px;
		padding: 8px 12px;
	}
	
	.numpad-grid {
		padding: 12px;
		gap: 6px;
	}
	
	.numpad-btn {
		min-height: 40px;
		font-size: 14px;
		padding: 8px;
	}
}