/* Reset and base styles */
* {
	margin: 0;
	padding: 0;
	box-sizing: border-box;
}

body {
	font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
	background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
	color: #333;
	line-height: 1.6;
	min-height: 100vh;
	padding: 20px;
}

.container {
	max-width: 1200px;
	margin: 0 auto;
	background: white;
	padding: 30px;
	border-radius: 12px;
	box-shadow: 0 10px 40px rgba(0,0,0,0.15);
	margin-bottom: 20px;
}

/* Header */
header {
	text-align: center;
	background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
	color: white;
	padding: 30px 30px 20px 30px !important;
	margin-bottom: 30px;
}

header h1 {
	font-size: 2.5em;
	margin-bottom: 10px;
	text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
}

.subtitle {
	font-size: 1.1em;
	opacity: 0.95;
	font-weight: 300;
	margin-bottom: 20px;
}

.subtitle-text {
	color: #666;
	font-size: 1.05em;
	margin-bottom: 20px;
}

/* Navigation */
.main-nav {
	display: flex;
	justify-content: center;
	gap: 15px;
	margin-top: 25px;
	flex-wrap: wrap;
}

.nav-link {
	background: rgba(255, 255, 255, 0.2);
	color: white;
	padding: 12px 24px;
	border-radius: 8px;
	text-decoration: none;
	font-weight: 600;
	transition: all 0.3s;
	backdrop-filter: blur(10px);
}

.nav-link:hover {
	background: rgba(255, 255, 255, 0.3);
	transform: translateY(-2px);
}

.nav-link.active {
	background: white;
	color: #f5576c;
	box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

/* Stats Grid */
.stats-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
	gap: 20px;
	margin-bottom: 30px;
}

.stat-card {
	background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
	color: white;
	padding: 30px;
	border-radius: 10px;
	text-align: center;
	box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

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

.stat-card h3 {
	font-size: 1.1em;
	font-weight: 400;
	opacity: 0.9;
	margin-bottom: 15px;
}

.stat-number {
	font-size: 3em;
	font-weight: bold;
	margin: 0;
}

/* Card sections */
.card {
	background: white;
	padding: 30px;
	border-radius: 10px;
	margin-bottom: 30px;
	box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.card h2 {
	color: #667eea;
	margin-bottom: 25px;
	font-size: 1.8em;
	border-bottom: 3px solid #667eea;
	padding-bottom: 10px;
}

/* Simple Form */
.simple-form {
	max-width: 100%;
}

.form-row-simple {
	display: grid;
	grid-template-columns: 2fr 2fr 1fr;
	gap: 20px;
	align-items: end;
}

.form-group {
	display: flex;
	flex-direction: column;
}

.form-group label {
	font-weight: 600;
	color: #555;
	margin-bottom: 8px;
	font-size: 0.95em;
}

.form-group small {
	font-size: 0.85em;
	color: #888;
	margin-top: 5px;
}

input[type="text"],
input[type="number"],
select {
	width: 100%;
	padding: 14px;
	border: 2px solid #e0e0e0;
	border-radius: 8px;
	font-size: 1em;
	transition: border-color 0.3s;
	font-family: inherit;
}

input[type="text"]:focus,
input[type="number"]:focus,
select:focus {
	outline: none;
	border-color: #667eea;
	box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* Buttons */
button,
.btn-primary {
	background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
	color: white;
	border: none;
	padding: 14px 28px;
	border-radius: 8px;
	font-size: 1.05em;
	font-weight: 600;
	cursor: pointer;
	transition: transform 0.2s, box-shadow 0.2s;
	box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
	width: 100%;
}

button:hover,
.btn-primary:hover {
	transform: translateY(-2px);
	box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.btn-order {
	background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
	margin-top: 20px;
}

.btn-order:hover {
	box-shadow: 0 6px 20px rgba(245, 87, 108, 0.4);
}

.btn-meal {
	background: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
}

/* Stock Grid */
.stock-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
	gap: 15px;
	margin-top: 20px;
}

.stock-item {
	background: #f8f9fa;
	padding: 15px;
	border-radius: 8px;
	text-align: center;
	border: 2px solid #e0e0e0;
	transition: all 0.3s;
}

.stock-item:hover {
	transform: translateY(-3px);
	box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.stock-item.low-stock {
	background: #fff3cd;
	border-color: #ffc107;
}

.stock-item-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 10px;
}

.stock-name {
	font-weight: 600;
	color: #333;
	font-size: 0.95em;
}

.stock-alert {
	font-size: 1.2em;
}

.stock-quantity {
	font-size: 1.8em;
	font-weight: bold;
	color: #667eea;
	margin-bottom: 5px;
}

.stock-category {
	font-size: 0.85em;
	color: #888;
}

/* Orders Container */
.orders-container {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
	gap: 25px;
}

.order-card {
	height: fit-content;
}

.meal-card {
	grid-column: 1 / -1;
}

.order-form {
	display: flex;
	flex-direction: column;
	gap: 20px;
}

.order-section {
	margin-bottom: 20px;
}

.order-section h3 {
	color: #667eea;
	margin-bottom: 12px;
	font-size: 1.2em;
}

.info-text {
	color: #666;
	font-style: italic;
	background: #f0f0f0;
	padding: 10px;
	border-radius: 5px;
}

.checkbox-grid {
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.checkbox-label {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 10px;
	background: #f8f9fa;
	border-radius: 6px;
	cursor: pointer;
	transition: background 0.2s;
}

.checkbox-label:hover {
	background: #e9ecef;
}

.checkbox-label input[type="checkbox"] {
	width: 20px;
	height: 20px;
	cursor: pointer;
}

.checkbox-label span {
	font-weight: 500;
	color: #333;
}

.extra-items-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
	gap: 15px;
}

.extra-item {
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.extra-item label {
	font-weight: 600;
	color: #555;
	font-size: 0.95em;
}

.extra-item input {
	padding: 10px;
}

.meal-info {
	margin-top: 25px;
	padding: 20px;
	background: #f0f7ff;
	border-radius: 8px;
	border-left: 4px solid #667eea;
}

.meal-info h4 {
	color: #667eea;
	margin-bottom: 12px;
}

.meal-info ul {
	list-style: none;
	padding: 0;
}

.meal-info li {
	padding: 8px 0;
	color: #555;
}

/* Filter bar */
.filter-bar {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 25px;
	flex-wrap: wrap;
	gap: 15px;
}

.filter-form {
	display: flex;
	align-items: center;
	gap: 10px;
}

.filter-form label {
	font-weight: 600;
	color: #555;
}

.filter-form select {
	padding: 10px 14px;
	margin-left: 8px;
}

/* Table */
.table-wrapper {
	overflow-x: auto;
	margin-top: 20px;
}

.inventory-table {
	width: 100%;
	border-collapse: collapse;
}

.inventory-table thead {
	background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
	color: white;
}

.inventory-table th {
	padding: 16px;
	text-align: left;
	font-weight: 600;
	font-size: 0.95em;
}

.inventory-table td {
	padding: 14px 16px;
	border-bottom: 1px solid #e0e0e0;
}

.inventory-table tbody tr {
	transition: background-color 0.2s;
}

.inventory-table tbody tr:hover {
	background-color: #f5f5f5;
}

.low-stock-row {
	background-color: #fff3cd !important;
}

.low-stock-row:hover {
	background-color: #ffe8a1 !important;
}

.quantity-col {
	font-size: 1.2em;
	font-weight: bold;
	color: #667eea;
}

/* Badges */
.category-badge {
	display: inline-block;
	background: #e3f2fd;
	color: #1976d2;
	padding: 6px 14px;
	border-radius: 16px;
	font-size: 0.85em;
	font-weight: 600;
}

.status-badge {
	display: inline-block;
	padding: 6px 14px;
	border-radius: 16px;
	font-size: 0.85em;
	font-weight: 600;
}

.status-badge.in-stock {
	background: #d4edda;
	color: #155724;
}

.status-badge.low-stock {
	background: #fff3cd;
	color: #856404;
}

/* Flash messages */
.flashes {
	list-style: none;
	margin-bottom: 20px;
}

.flash {
	padding: 16px 22px;
	border-radius: 8px;
	margin-bottom: 12px;
	font-weight: 500;
	font-size: 1.05em;
}

.flash.success {
	background: #d4edda;
	color: #155724;
	border-left: 5px solid #28a745;
}

.flash.error {
	background: #f8d7da;
	color: #721c24;
	border-left: 5px solid #dc3545;
}

/* Empty state */
.empty-state {
	text-align: center;
	padding: 50px;
	color: #999;
	font-size: 1.2em;
}

/* Footer */
.footer {
	text-align: center;
	padding: 20px;
	color: white;
	background: rgba(0,0,0,0.2);
	backdrop-filter: blur(10px);
}

.footer small {
	opacity: 0.9;
}

/* Responsive */
@media (max-width: 900px) {
	.form-row-simple {
		grid-template-columns: 1fr;
	}
	
	.orders-container {
		grid-template-columns: 1fr;
	}
	
	.meal-card {
		grid-column: 1;
	}
	
	.container {
		padding: 20px;
	}
	
	header h1 {
		font-size: 1.8em;
	}
	
	.main-nav {
		flex-direction: column;
		align-items: stretch;
	}
	
	.nav-link {
		text-align: center;
	}
	
	.filter-bar {
		flex-direction: column;
		align-items: flex-start;
	}
	
	.inventory-table {
		font-size: 0.85em;
	}
	
	.inventory-table th,
	.inventory-table td {
		padding: 10px;
	}
	
	.stat-number {
		font-size: 2.2em;
	}
	
	.stock-grid {
		grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
	}
	
	.extra-items-grid {
		grid-template-columns: 1fr;
	}
}
