
body {
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
	margin: 0;
	padding: 0;
}

h1 {
	font-size: 16px;
	margin-top: 0;
}

p {
	color: rgb(107, 114, 128);
	font-size: 15px;
	margin-bottom: 10px;
	margin-top: 5px;
}

.card {
	max-width: 620px;
	margin: 0 auto;
	padding: 16px;
	border: 1px solid lightgray;
	border-radius: 16px;
}

.card p:last-child {
	margin-bottom: 0;
}
/* Custom sidebar adjustment for pages */
.ml-64 {
	margin-left: 256px;
}

/* Responsive behavior for sidebar */
@media (max-width: 1024px) {
	.ml-64 {
		margin-left: 0;
	}
	
	/* Hide sidebar on mobile, show toggle button instead */
	custom-sidebar {
		transform: translateX(-100%);
		transition: transform 0.3s ease;
	}
	
	custom-sidebar.active {
		transform: translateX(0);
	}
}

/* Ensure all pages with sidebar have consistent layout */
body.has-sidebar {
	min-height: 100vh;
	background-color: #f9fafb;
}

/* Mobile Responsive Tables */
@media (max-width: 1024px) {
	.ml-64 {
		margin-left: 0;
	}
	
	/* Responsive table wrapper */
	.overflow-x-auto {
		overflow-x: auto;
		-webkit-overflow-scrolling: touch;
	}
	
	/* Make tables scrollable on mobile */
	table {
		min-width: 800px;
	}
	
	/* Card adjustments for mobile */
	.card-hover, .inventory-card, .workorder-card, .operator-card {
		margin-bottom: 1rem;
	}
	
	/* Grid adjustments */
	.grid-cols-1.md\:grid-cols-4 {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media (max-width: 640px) {
	.grid-cols-1.md\:grid-cols-4 {
		grid-template-columns: 1fr;
	}
	
	/* Stack stats cards on mobile */
	.workorder-card, .inventory-card {
		padding: 1rem;
	}
	
	/* Reduce padding on mobile */
	.p-6 {
		padding: 1rem;
	}
	
	/* Header adjustments */
	header {
		flex-direction: column;
		gap: 1rem;
	}
	
	header .flex.items-center {
		width: 100%;
		justify-content: space-between;
	}
}

/* Print Optimized Styles */
@media print {
	/* Hide navigation and actions */
	sidebar-toggle,
	custom-sidebar,
	header button,
	.sidebar-toggle,
	nav,
	.flex.space-x-2,
	.border-t.border-gray-200 {
		display: none !important;
	}
	
	/* Reset margins for print */
	.ml-64 {
		margin-left: 0 !important;
	}
	
	.page-content {
		margin-left: 0 !important;
		width: 100% !important;
	}
	
	/* Ensure white background */
	body {
		background: white !important;
	}
	
	/* Remove shadows for cleaner print */
	.shadow-sm, .shadow-md, .shadow-lg {
		box-shadow: none !important;
		border: 1px solid #e5e7eb !important;
	}
	
	/* Ensure tables are visible */
	.overflow-x-auto {
		overflow: visible !important;
	}
	
	table {
		min-width: 100% !important;
		font-size: 10pt !important;
	}
	
	/* Page breaks */
	.bg-white.rounded-lg {
		page-break-inside: avoid;
		margin-bottom: 1rem;
	}
	
	/* Header styling for print */
	header {
		border-bottom: 2px solid #000 !important;
		margin-bottom: 2rem;
	}
	
	/* Show print header */
	.print-header {
		display: block !important;
		text-align: center;
		margin-bottom: 2rem;
	}
	
	/* QR code placeholder for work orders */
	.print-qr {
		display: block !important;
		float: right;
		width: 100px;
		height: 100px;
		border: 2px solid #000;
		text-align: center;
		line-height: 100px;
		font-size: 10px;
	}
}

.print-header, .print-qr {
	display: none;
}

/* Print button styling */
.print-button {
	display: inline-flex;
	align-items: center;
	padding: 0.5rem 1rem;
	background-color: #f3f4f6;
	border: 1px solid #d1d5db;
	border-radius: 0.375rem;
	color: #374151;
	font-size: 0.875rem;
	cursor: pointer;
	transition: background-color 0.2s;
}

.print-button:hover {
	background-color: #e5e7eb;
}

/* Toast Notifications */
.toast {
	position: fixed;
	bottom: 1rem;
	right: 1rem;
	padding: 1rem;
	border-radius: 0.5rem;
	box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
	z-index: 50;
	animation: slideIn 0.3s ease;
	max-width: 400px;
}

.toast.success {
	background-color: #10b981;
	color: white;
}

.toast.error {
	background-color: #ef4444;
	color: white;
}

.toast.warning {
	background-color: #f59e0b;
	color: white;
}

@keyframes slideIn {
	from {
		transform: translateX(100%);
		opacity: 0;
	}
	to {
		transform: translateX(0);
		opacity: 1;
	}
}

/* Sidebar toggle button for mobile */
.sidebar-toggle {
	position: fixed;
	top: 1rem;
	left: 1rem;
	z-index: 100;
	background: #3b82f6;
	color: white;
	border: none;
	border-radius: 0.5rem;
	padding: 0.75rem;
	display: none;
	box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
}

@media (max-width: 1024px) {
	.sidebar-toggle {
		display: block;
	}
}

/* Page content transition */
.page-content {
	transition: margin-left 0.3s ease;
}
