/* Global Styles */
* {
	box-sizing: border-box;
}

body {
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	margin: 0;
	padding: 0;
	background: #f8f9fa;
	color: #333;
}

/* Logo und Header */
.logo {
	max-width: 80px;
	height: auto;
	display: block;
	margin: 10px auto;
}

.logo.qrcode {
	max-width: 40px;
	margin-top: 10px;
}

h1 {
	text-align: center;
	margin: 10px 0 20px 0;
	color: #1f2937;
	font-size: 28px;
	letter-spacing: 0.5px;
}

/* Login Styles */
.login-shell {
	max-width: 860px;
	margin: 30px auto 20px auto;
	padding: 28px;
	background: radial-gradient(1200px 400px at 10% -10%, #ffe7b8 0%, rgba(255, 231, 184, 0) 55%),
				linear-gradient(135deg, #e4f2ff 0%, #f7f2ff 45%, #fff7ec 100%);
	border-radius: 18px;
	box-shadow: 0 18px 40px rgba(20, 30, 60, 0.12);
}

.login-card {
	background: #ffffff;
	border: 1px solid #e6e8ef;
	border-radius: 16px;
	padding: 26px;
	max-width: 420px;
	box-shadow: 0 10px 20px rgba(20, 30, 60, 0.08);
	font-family: "Palatino Linotype", "Book Antiqua", Palatino, serif;
}

.login-title {
	margin: 0 0 10px 0;
	font-size: 24px;
	letter-spacing: 0.3px;
	color: #1f2937;
}

.login-subtitle {
	margin: 0 0 18px 0;
	color: #6b7280;
	font-size: 14px;
}

.login-form label {
	display: block;
	margin-bottom: 6px;
	font-weight: bold;
	color: #111827;
}

.login-form input {
	width: 100%;
	padding: 12px 14px;
	border: 1px solid #d6d9e0;
	border-radius: 10px;
	background: #fdfdff;
	margin-bottom: 14px;
	font-size: 14px;
	transition: border-color 0.2s, box-shadow 0.2s;
}

.login-form input:focus {
	outline: none;
	border-color: #3b82f6;
	box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.15);
}

.login-form button {
	width: 100%;
	padding: 12px 16px;
	background: linear-gradient(135deg, #1f2937 0%, #4b5563 100%);
	color: #ffffff;
	border: none;
	border-radius: 10px;
	font-size: 15px;
	font-weight: bold;
	cursor: pointer;
	transition: transform 0.15s ease, box-shadow 0.2s ease;
}

.login-form button:hover {
	transform: translateY(-1px);
	box-shadow: 0 10px 18px rgba(31, 41, 55, 0.25);
}

.login-error {
	background: #ffe4e6;
	color: #9f1239;
	border: 1px solid #fecdd3;
	padding: 10px 12px;
	border-radius: 10px;
	margin-bottom: 14px;
	font-size: 14px;
}

.login-footer {
	margin-top: 14px;
	text-align: center;
	font-size: 13px;
}

.login-footer a {
	color: #2563eb;
	text-decoration: none;
}

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

/* Category Grid */
.category-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
	gap: 20px;
	margin: 30px auto;
	max-width: 1200px;
	padding: 0 20px;
}

.category-card {
	background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
	color: white;
	padding: 30px;
	border-radius: 12px;
	text-align: center;
	cursor: pointer;
	transition: transform 0.3s, box-shadow 0.3s;
	text-decoration: none;
	box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
	display: block;
}

.category-card:hover {
	transform: translateY(-5px);
	box-shadow: 0 8px 15px rgba(0, 0, 0, 0.2);
}

.category-card h2 {
	margin: 10px 0 5px 0;
	font-size: 24px;
}

.category-card p {
	margin: 5px 0 0 0;
	font-size: 14px;
	opacity: 0.95;
}

.category-icon {
	font-size: 48px;
	margin-bottom: 10px;
}

.category-card.technik {
	background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.category-card.putz {
	background: linear-gradient(135deg, #43cea2 0%, #185a9d 100%);
}

/* Logout Button */
.logout-btn {
	display: inline-block;
	margin: 0 0 10px 10px;
	padding: 8px 14px;
	background: #6c757d;
	color: #fff;
	text-decoration: none;
	border-radius: 6px;
	font-size: 14px;
	transition: background 0.2s;
}

.logout-btn:hover {
	background: #5a6268;
}

/* Main Content */
h2 {
	color: #1f2937;
	margin-top: 20px;
}

p {
	line-height: 1.6;
	color: #666;
}

hr {
	border: none;
	border-top: 1px solid #ddd;
	margin: 20px 0;
}

/* Responsive */
@media (max-width: 768px) {
	.category-grid {
		grid-template-columns: 1fr;
	}
	
	.logout-btn {
		display: block;
		margin: 0 0 10px 0;
		width: 100%;
		text-align: center;
	}
}

/* Getränke Menu Grid */
.menu-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
	gap: 25px;
	margin: 30px auto;
	max-width: 1000px;
	padding: 0 20px;
}

.menu-card {
	background: white;
	border: 2px solid #e0e0e0;
	padding: 30px;
	border-radius: 10px;
	text-align: center;
	cursor: pointer;
	transition: all 0.3s;
	text-decoration: none;
	color: #333;
	display: block;
}

.menu-card:hover {
	border-color: #667eea;
	box-shadow: 0 5px 15px rgba(102, 126, 234, 0.3);
	transform: translateY(-3px);
}

.menu-card .icon {
	font-size: 56px;
	margin-bottom: 15px;
}

.menu-card h3 {
	margin: 10px 0;
	color: #667eea;
}

.menu-card p {
	margin: 5px 0 0 0;
	font-size: 14px;
}

/* Back Button */
.back-btn {
	display: inline-block;
	margin: 20px 0 10px 0;
	padding: 10px 20px;
	background: #6c757d;
	color: white;
	text-decoration: none;
	border-radius: 5px;
	transition: background 0.2s;
}

.back-btn:hover {
	background: #5a6268;
}

/* Bestand Table */
.bestand-table {
	width: 100%;
	border-collapse: collapse;
	margin: 20px auto;
	background: white;
	box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
	max-width: 1200px;
}

.bestand-table th {
	background: #667eea;
	color: white;
	padding: 12px;
	text-align: left;
	position: sticky;
	top: 0;
}

.bestand-table td {
	padding: 10px 12px;
	border-bottom: 1px solid #e0e0e0;
}

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

.bestand-low {
	color: #dc3545;
	font-weight: bold;
}

.bestand-ok {
	color: #28a745;
}

.kategorie-header {
	background: #f1f3f5 !important;
	font-weight: bold;
	color: #495057 !important;
}

/* Form Container */
.form-container {
	background: white;
	padding: 25px;
	border-radius: 10px;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
	max-width: 600px;
	margin: 20px auto;
}

.form-group {
	margin-bottom: 20px;
}

.form-group label {
	display: block;
	margin-bottom: 5px;
	font-weight: bold;
	color: #495057;
}

.form-group input,
.form-group select,
.form-group textarea {
	width: 100%;
	padding: 10px;
	border: 1px solid #ced4da;
	border-radius: 5px;
	font-size: 14px;
	transition: border-color 0.2s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
	outline: none;
	border-color: #667eea;
	box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.15);
}

.btn-submit {
	background: #28a745;
	color: white;
	padding: 12px 30px;
	border: none;
	border-radius: 5px;
	font-size: 16px;
	cursor: pointer;
	font-weight: bold;
	transition: background 0.2s;
	display: inline-block;
	text-decoration: none;
}

.btn-submit:hover {
	background: #218838;
}

.btn-submit[name="verkauf_buchen"] {
	background: #dc3545;
}

.btn-submit[name="verkauf_buchen"]:hover {
	background: #c82333;
}

.action-buttons {
	display: flex;
	gap: 12px;
	justify-content: center;
	margin-top: 12px;
}

/* Messages */
.success-msg {
	background: #d4edda;
	color: #155724;
	padding: 15px;
	border-radius: 5px;
	margin: 15px auto;
	border: 1px solid #c3e6cb;
	max-width: 600px;
}

.error-msg {
	background: #f8d7da;
	color: #721c24;
	padding: 15px;
	border-radius: 5px;
	margin: 15px auto;
	border: 1px solid #f5c6cb;
	max-width: 600px;
}

/* Info/Warning Boxes */
.info-box {
	background: #e7f3ff;
	padding: 10px;
	border-left: 4px solid #007bff;
	margin: 10px 0;
	border-radius: 4px;
	font-size: 14px;
}

.warning-box {
	background: #fff3cd;
	padding: 10px;
	border-left: 4px solid #ffc107;
	margin: 10px 0;
	border-radius: 4px;
	font-size: 14px;
}

/* Scanner */
.scanner-wrap {
	margin: 10px 0 20px 0;
	text-align: center;
}

.scanner-video {
	width: 100%;
	max-width: 420px;
	background: #111;
	border-radius: 10px;
	border: 2px solid #e0e0e0;
}

.scanner-controls {
	display: flex;
	gap: 10px;
	justify-content: center;
	margin-top: 10px;
}

.scanner-controls .btn-submit {
	background: #2563eb;
}

.scanner-controls .btn-submit:hover {
	background: #1d4ed8;
}

.scanner-status {
	margin-top: 8px;
	font-size: 13px;
	color: #6b7280;
}

/* Historie Table */
.historie-table {
	width: 100%;
	border-collapse: collapse;
	margin: 20px auto;
	background: white;
	box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
	max-width: 1000px;
}

.historie-table th {
	background: #28a745;
	color: white;
	padding: 10px;
	text-align: left;
}

.historie-table th[style*="rgb(220, 53, 69)"],
.historie-table tbody tr:has(button[name="verkauf_buchen"]) ~ thead th {
	background: #dc3545 !important;
}

.historie-table td {
	padding: 8px 10px;
	border-bottom: 1px solid #e0e0e0;
	font-size: 14px;
}

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

.historie-table small {
	color: #6c757d;
	display: block;
	font-size: 12px;
	margin-top: 2px;
}
