/* =========================================
   POS DREAMS | PREMIUM UI
   ========================================= */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700&display=swap');

:root {
	/* Core Colors */
	--primary: #ea580c;
	/* Orange-600 */
	--primary-hover: #c2410c;
	/* Orange-700 */
	--primary-light: #fff7ed;
	/* Orange-50 */

	--secondary: #ec4899;
	/* Pink-500 */

	/* Neutral / Backgrounds */
	--bg-body: #f8fafc;
	/* Slate-50 */
	--bg-surface: #ffffff;
	--bg-subtle: #f1f5f9;
	/* Slate-100 */

	/* Text */
	--text-main: #0f172a;
	/* Slate-900 */
	--text-muted: #64748b;
	/* Slate-500 */
	--text-light: #94a3b8;
	/* Slate-400 */

	/* Borders & Accents */
	--border: #e2e8f0;
	/* Slate-200 */
	--divider: #f1f5f9;

	/* Functional */
	--success: #10b981;
	--danger: #ef4444;
	--warning: #f59e0b;

	/* Dimensions */
	--sidebar-width: 80px;
	--right-panel-width: 400px;

	/* Shadows */
	--shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
	--shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
	--shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
	--shadow-card: 0 0 0 1px rgba(0, 0, 0, 0.03), 0 2px 8px rgba(0, 0, 0, 0.04);

	/* Radius */
	--radius-sm: 0.5rem;
	--radius-md: 0.75rem;
	--radius-lg: 1rem;
	--radius-xl: 1.5rem;

	/* Transitions */
	--transition: all 0.2s ease-in-out;
}

* {
	margin: 0;
	padding: 0;
	box-sizing: border-box;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}

body {
	background-color: var(--bg-body);
	font-family: 'Outfit', sans-serif;
	color: var(--text-main);
	height: 100vh;
	overflow: hidden;
	/* App like feel */
}

a {
	color: inherit;
	text-decoration: none;
	text-align: center;
}

/* =========================================
   LAYOUT
   ========================================= */

.app-layout {
	display: flex;
	width: 100vw;
	height: 100vh;
	background: var(--bg-body);
}

/* 1. SIDEBAR (Left) */
.sidebar {
	width: var(--sidebar-width);
	background: var(--bg-surface);
	display: flex;
	flex-direction: column;
	align-items: center;
	padding: 1.5rem 0;
	border-right: 1px solid var(--border);
	flex-shrink: 0;
	z-index: 100;
	/* Sidebar higher than bottom sheet (50) */
	height: 100%;
}

/* ... */

/* Tooltip */
.tooltip {
	/* ... */
	z-index: 120;
	/* ... */
}

/* ... */

/* Submenu */
.submenu {
	/* ... */
	z-index: 110;
	animation: slideIn 0.2s ease-out;
}

@keyframes slideIn {
	from {
		opacity: 0;
		transform: translateX(-10px);
	}

	to {
		opacity: 1;
		transform: translateX(0);
	}
}

.menu-item.expanded .submenu {
	display: block;
	z-index: 9999;
}

.submenu-item {
	display: block;
	padding: 0.6rem 1rem;
	border-radius: var(--radius-sm);
	color: var(--text-muted);
	text-decoration: none;
	font-size: 0.85rem;
	font-weight: 500;
	transition: var(--transition);
	margin-bottom: 2px;
}

.submenu-item:hover,
.submenu-item.active-sub {
	background: var(--primary-light);
	color: var(--primary);
}

/* 2. CENTER PANEL (Main) */
.center-panel {
	flex: 1;
	display: flex;
	flex-direction: column;
	padding: 1.5rem 2rem;
	overflow-y: auto;
	/* Allow scrolling */
	position: relative;
	height: 100vh;
}

@media (max-width: 768px) {
	.center-panel {
		padding: 1rem;
	}

	.nav-items {
		align-items: flex-start;
		margin-top: 1rem;
		width: 100%;

	}
}

/* Top Bar */
.top-bar {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 2rem;
	flex-shrink: 0;
}

.welcome-section h1 {
	font-size: 1.75rem;
	font-weight: 700;
	color: var(--text-main);
	letter-spacing: -0.02em;
}

.welcome-section p {
	color: var(--text-muted);
	font-size: 0.95rem;
	margin-top: 4px;
	font-weight: 400;
}

.header-actions {
	display: flex;
	align-items: center;
	gap: 1rem;
}

/* Search Box */
.search-box {
	background: var(--bg-surface);
	padding: 0 1rem;
	height: 48px;
	border-radius: var(--radius-lg);
	display: flex;
	align-items: center;
	gap: 12px;
	width: 320px;
	border: 1px solid var(--border);
	transition: var(--transition);
	box-shadow: var(--shadow-sm);
}

.search-box:focus-within {
	border-color: var(--primary);
	box-shadow: 0 0 0 3px var(--primary-light);
}

.search-box svg {
	stroke: var(--text-light);
	width: 18px;
	height: 18px;
}

.search-box input {
	border: none;
	background: transparent;
	outline: none;
	width: 100%;
	font-family: inherit;
	font-size: 0.95rem;
	color: var(--text-main);
}

.search-box input::placeholder {
	color: var(--text-light);
}

.mobile-menu-btn {
	display: none;
	/* Desktop hidden */
}

.mobile-only {
	display: none !important;
}

@media (max-width: 1024px) {
	.top-bar {
		flex-direction: column;
		align-items: flex-start;
		gap: 1.5rem;
		margin-bottom: 1.5rem;
	}

	.header-actions {
		width: 100%;
		justify-content: space-between;
	}

	.search-box {
		width: 100%;
		max-width: none;
	}

	.welcome-section h1 {
		font-size: 1.5rem;
	}

	.mobile-only {
		display: flex !important;
	}

	.mobile-menu-btn {
		display: flex !important;
		align-items: center;
		justify-content: center;
		background: var(--bg-surface);
		border: 1px solid var(--border);
		width: 44px;
		height: 44px;
		border-radius: 10px;
		color: var(--text-main);
		cursor: pointer;
	}
}

/* Category Filters */
.category-tabs {
	display: flex;
	gap: 0.75rem;
	padding: 5px 5px 15px 5px;
	/* Added padding to prevent hover clip */
	width: 100%;
	overflow-x: auto;
	scrollbar-width: none;
	/* Firefox */
	margin-bottom: 0.5rem;
	-webkit-overflow-scrolling: touch;
	flex-shrink: 0;
}

.category-tabs::-webkit-scrollbar {
	display: none;
}

.cat-pill {
	padding: 0.5rem 1.25rem;
	height: 40px;
	border-radius: 100px;
	background: var(--bg-surface);
	border: 1px solid var(--border);
	font-family: inherit;
	font-size: 0.9rem;
	font-weight: 500;
	color: var(--text-muted);
	cursor: pointer;
	transition: var(--transition);
	white-space: nowrap;
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	box-shadow: var(--shadow-sm);
	flex-shrink: 0;
	/* CRITICAL: Prevent squashing */
}

.cat-pill:hover {
	border-color: var(--primary);
	color: var(--primary);
	transform: translateY(-1px);
}

.cat-pill.active {
	background: var(--primary);
	color: white;
	border-color: var(--primary);
	box-shadow: 0 4px 10px rgba(234, 88, 12, 0.3);
}

/* Services Grid */
.services-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
	gap: 1.5rem;
	padding-bottom: 2rem;
	/* Desktop Scroll Settings */
	flex: 1;
	overflow-y: auto;
	min-height: 0;
	align-content: start;
	padding-right: 5px;
}

.service-card {
	background: var(--bg-surface);
	border-radius: var(--radius-lg);
	padding: 1rem;
	display: flex;
	flex-direction: column;
	border: 1px solid var(--border);
	box-shadow: var(--shadow-sm);
	transition: all 0.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
	cursor: pointer;
	position: relative;
	/* overflow: hidden; */
}

.service-card:hover {
	transform: translateY(-4px);
	box-shadow: var(--shadow-lg);
	border-color: var(--primary-light);
}

.card-img-placeholder {
	width: 100%;
	aspect-ratio: 4/3;
	background: var(--bg-subtle);
	border-radius: var(--radius-md);
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 3rem;
	margin-bottom: 1rem;
	transition: var(--transition);
}

.service-card:hover .card-img-placeholder {
	background: #f1f5f9;
	/* slightly darker on hover */
	transform: scale(1.02);
}

.card-info {
	width: 100%;
	margin-bottom: 0.75rem;
}

.card-cat {
	font-size: 0.75rem;
	font-weight: 600;
	text-transform: uppercase;
	color: var(--text-light);
	margin-bottom: 0.25rem;
	display: block;
	letter-spacing: 0.05em;
}

.card-title {
	font-weight: 600;
	font-size: 1rem;
	color: var(--text-main);
	line-height: 1.4;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.card-footer {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-top: auto;
}

.card-price {
	font-weight: 700;
	font-size: 1.1rem;
	color: var(--primary);
}

/* New Add Button */
.btn-add {
	background: var(--primary);
	color: white;
	border: none;
	padding: 0.4rem 1rem;
	border-radius: var(--radius-sm);
	font-size: 0.9rem;
	font-weight: 500;
	cursor: pointer;
	transition: var(--transition);
	box-shadow: var(--shadow-sm);
}

.btn-add:hover {
	background: var(--primary-hover);
	transform: translateY(-1px);
}

.card-stepper {
	display: flex;
	align-items: center;
	background: var(--bg-subtle);
	border-radius: var(--radius-sm);
	padding: 2px;
}

.card-step-btn {
	width: 24px;
	height: 24px;
	display: flex;
	align-items: center;
	justify-content: center;
	border: none;
	border-radius: 4px;
	background: white;
	box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
	cursor: pointer;
	color: var(--text-main);
	font-weight: bold;
	font-size: 0.9rem;
	transition: var(--transition);
}

.card-step-btn:hover {
	background: var(--primary);
	color: white;
}

.card-step-val {
	font-size: 0.8rem;
	font-weight: 600;
	padding: 0 8px;
	color: var(--text-main);
}

/* 3. RIGHT PANEL (Cart/Billing) */
.right-panel {
	width: var(--right-panel-width);
	background: var(--bg-surface);
	border-left: 1px solid var(--border);
	display: flex;
	flex-direction: column;
	padding: 2rem;
	flex-shrink: 0;
	z-index: 40;
	box-shadow: -4px 0 20px rgba(0, 0, 0, 0.02);
}

.order-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 1.5rem;
}

.order-header h2 {
	font-size: 1.25rem;
	font-weight: 700;
	color: var(--text-main);
}

.order-id {
	background: var(--primary-light);
	color: var(--primary);
	padding: 6px 12px;
	border-radius: var(--radius-sm);
	font-weight: 600;
	font-size: 0.85rem;
	letter-spacing: 0.5px;
}

/* Customer Section */
.customer-section {
	margin-bottom: 2rem;
	background: var(--bg-subtle);
	padding: 1rem;
	border-radius: var(--radius-lg);
	border: 1px dashed var(--border);
}

.customer-section label {
	display: block;
	font-size: 0.75rem;
	font-weight: 700;
	text-transform: uppercase;
	color: var(--text-muted);
	margin-bottom: 0.5rem;
	letter-spacing: 0.05em;
}

.customer-input-row {
	display: flex;
	gap: 0.5rem;
}

.customer-input-row input {
	flex: 1;
	padding: 0.75rem;
	border: 1px solid var(--border);
	border-radius: var(--radius-md);
	background: var(--bg-surface);
	outline: none;
	font-size: 0.95rem;
	font-family: inherit;
	transition: var(--transition);
}

.customer-input-row input:focus {
	border-color: var(--primary);
	box-shadow: 0 0 0 3px rgba(234, 88, 12, 0.1);
}

.add-user-btn {
	width: 44px;
	height: 44px;
	background: var(--primary);
	color: white;
	border: none;
	border-radius: var(--radius-md);
	font-size: 1.5rem;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	transition: var(--transition);
}

.add-user-btn:hover {
	background: var(--primary-hover);
	transform: scale(1.05);
}

/* Cart List */
.order-details-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 1rem;
}

.order-details-header h3 {
	font-size: 1rem;
	font-weight: 600;
	color: var(--text-main);
}

.text-danger {
	color: var(--danger);
	background: none;
	border: none;
	cursor: pointer;
	font-size: 0.8rem;
	font-weight: 600;
	transition: opacity 0.2s;
}

.text-danger:hover {
	opacity: 0.8;
}

.cart-list-container {
	flex: 1;
	overflow-y: auto;
	margin-bottom: 1.5rem;
	padding-right: 4px;
	/* for scrollbar spacing */
}

/* Custom Scrollbar for cart */
.cart-list-container::-webkit-scrollbar {
	width: 6px;
}

.cart-list-container::-webkit-scrollbar-thumb {
	background: var(--border);
	border-radius: 4px;
}

.cart-item {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 1rem;
	padding: 1rem;
	border: 1px solid var(--border);
	border-radius: var(--radius-md);
	background: white;
	transition: var(--transition);
}

.cart-item:hover {
	border-color: var(--primary-light);
	box-shadow: var(--shadow-sm);
}

.cart-item-info {
	display: flex;
	align-items: center;
	gap: 12px;
}

.cart-item-del {
	color: var(--text-light);
	cursor: pointer;
	font-size: 1rem;
	transition: color 0.2s;
	padding: 4px;
}

.cart-item-del:hover {
	color: var(--danger);
}

.cart-item-details h4 {
	font-size: 0.9rem;
	font-weight: 600;
	color: var(--text-main);
	margin-bottom: 2px;
}

/* Menu Item (Vertical Stack) */
.menu-item {
	width: 72px;
	/* Wider for text */
	height: auto;
	min-height: 64px;
	border-radius: var(--radius-md);
	background: transparent;
	border: none;
	cursor: pointer;
	display: flex;
	flex-direction: column;
	/* Stack Icon & Text */
	align-items: center;
	justify-content: center;
	gap: 4px;
	/* Space between icon/text */
	padding: 10px 0;
	font-size: 1.25rem;
	color: var(--text-muted);
	transition: var(--transition);
	position: relative;
}

.menu-item .icon {
	font-size: 1.4rem;
	transition: var(--transition);
	margin-bottom: 2px;
}

.menu-item:hover {
	background: var(--bg-subtle);
	color: var(--primary);
}

.menu-item:hover .icon {
	transform: translateY(-2px);
}

.menu-item.active {
	background: var(--primary-light);
	color: var(--primary);
}

/* Active indicator strip */
.menu-item.active::before {
	content: '';
	position: absolute;
	left: 0;
	top: 50%;
	transform: translateY(-50%);
	height: 60%;
	width: 3px;
	background: var(--primary);
	border-radius: 0 4px 4px 0;
}

/* Tooltip -> Label (Visible Text) */
.tooltip {
	position: static;
	background: transparent;
	color: inherit;
	/* Follow parent color */
	padding: 0;
	font-size: 0.7rem;
	font-weight: 500;
	opacity: 1;
	visibility: visible;
	pointer-events: auto;
	transform: none;
	box-shadow: none;
	white-space: nowrap;
}

.tooltip::before {
	display: none;
}

/* Remove hover effect since it's always visible */
.menu-item:hover .tooltip {
	transform: none;
}

/* Submenu adjustment */
.submenu {
	position: absolute;
	left: 80px;
	/* Push out further */
	top: 10px;
	width: 180px;
	background: var(--bg-surface);
	border: 1px solid var(--border);
	border-radius: var(--radius-md);
	box-shadow: var(--shadow-lg);
	padding: 0.5rem;
	display: none;
	z-index: 110;
	animation: slideIn 0.2s ease-out;
}

.cart-item-details p {
	font-size: 0.8rem;
	color: var(--text-muted);
	display: flex;
	align-items: center;
	gap: 6px;
}

.edit-icon {
	cursor: pointer;
	font-size: 0.75rem;
	color: var(--primary);
	background: var(--primary-light);
	width: 20px;
	height: 20px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border-radius: 4px;
	transition: var(--transition);
}

.edit-icon:hover {
	transform: scale(1.1);
}

.cart-controls {
	display: flex;
	flex-direction: column;
	align-items: flex-end;
	gap: 0.5rem;
}

.cart-stepper {
	display: flex;
	align-items: center;
	background: var(--bg-subtle);
	border-radius: 6px;
	padding: 2px;
}

.cart-btn {
	width: 22px;
	height: 22px;
	border: none;
	background: white;
	border-radius: 4px;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 10px;
	box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.cart-btn:hover {
	color: var(--primary);
}

.cart-val {
	font-size: 0.85rem;
	width: 24px;
	text-align: center;
	font-weight: 600;
}

.cart-price {
	font-weight: 700;
	font-size: 0.95rem;
	color: var(--text-main);
}

/* Empty Cart */
.empty-cart-msg {
	display: flex;
	align-items: center;
	justify-content: center;
	height: 100%;
	color: var(--text-light);
	font-style: italic;
	border: 2px dashed var(--border);
	border-radius: var(--radius-md);
	background: var(--bg-subtle);
}

/* Checkout Section */
.checkout-section {
	border-top: 1px solid var(--border);
	padding-top: 1.5rem;
	flex-shrink: 0;
	/* Ensure it stays fixed at bottom */
	background: var(--bg-surface);
	/* Ensure background covers content behind it */
}

.discount-box {
	background: var(--primary-light);
	border: 1px solid transparent;
	border-radius: var(--radius-md);
	padding: 0.75rem;
	display: flex;
	align-items: center;
	gap: 12px;
	margin-bottom: 1.5rem;
	transition: var(--transition);
}

.discount-box:focus-within {
	border-color: var(--primary);
	background: white;
}

.discount-icon {
	width: 32px;
	height: 32px;
	background: white;
	color: var(--primary);
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	font-weight: bold;
	font-size: 0.9rem;
	box-shadow: var(--shadow-sm);
}

.disc-title {
	display: block;
	font-size: 0.7rem;
	color: var(--primary);
	font-weight: 700;
	text-transform: uppercase;
}

.disc-input {
	background: transparent;
	border: none;
	outline: none;
	font-size: 0.95rem;
	width: 100%;
	color: var(--primary);
	font-weight: 600;
}

.disc-input::placeholder {
	color: rgba(234, 88, 12, 0.5);
	font-weight: 400;
}

.delete-icon {
	cursor: pointer;
	font-size: 1rem;
	color: var(--text-light);
}

.payment-summary .row {
	display: flex;
	justify-content: space-between;
	margin-bottom: 0.75rem;
	font-size: 0.95rem;
	color: var(--text-muted);
}

.payment-summary .total {
	color: var(--text-main);
	font-weight: 800;
	font-size: 1.25rem;
	margin-top: 1rem;
	border-top: 2px dashed var(--border);
	padding-top: 1rem;
	align-items: center;
}

.checkout-btn {
	width: 100%;
	background: var(--primary);
	color: white;
	border: none;
	padding: 1rem;
	border-radius: var(--radius-lg);
	font-size: 1.1rem;
	font-weight: 600;
	margin-top: 1.5rem;
	cursor: pointer;
	box-shadow: 0 4px 12px rgba(234, 88, 12, 0.3);
	transition: var(--transition);
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
}

.checkout-btn:hover {
	background: var(--primary-hover);
	transform: translateY(-2px);
	box-shadow: 0 6px 16px rgba(234, 88, 12, 0.4);
}

/* Modal */
.modal {
	position: fixed;
	top: 0;
	left: 0;
	width: 100vw;
	height: 100vh;
	background: rgba(15, 23, 42, 0.6);
	backdrop-filter: blur(4px);
	display: flex;
	align-items: center;
	justify-content: center;
	z-index: 2000;
	opacity: 1;
	transition: opacity 0.3s;
}

.modal.hidden {
	opacity: 0;
	pointer-events: none;
	display: none !important;
}

.modal-content {
	background: white;
	padding: 2rem;
	border-radius: var(--radius-xl);
	box-shadow: var(--shadow-lg);
	position: relative;
	max-width: 90%;
	animation: popUp 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes popUp {
	from {
		transform: scale(0.9);
		opacity: 0;
	}

	to {
		transform: scale(1);
		opacity: 1;
	}
}

.close-btn {
	position: absolute;
	top: 1rem;
	right: 1.5rem;
	background: none;
	border: none;
	font-size: 2rem;
	line-height: 1;
	cursor: pointer;
	color: var(--text-muted);
}

/* Invoice Modal Styling */
.invoice-container {
	width: 600px;
	max-width: 100%;
	color: var(--text-main);
}

.invoice-container h1 {
	font-size: 1.5rem;
	color: var(--primary);
	margin-bottom: 0.5rem;
	text-transform: uppercase;
	letter-spacing: 1px;
	text-align: center;
}

.invoice-container p {
	text-align: center;
	color: var(--text-muted);
	font-size: 0.9rem;
	margin-bottom: 1.5rem;
	padding-bottom: 1rem;
	border-bottom: 2px dashed var(--border);
}

.invoice-table {
	width: 100%;
	border-collapse: collapse;
	margin-bottom: 1.5rem;
}

.invoice-table th {
	text-align: left;
	color: var(--text-light);
	font-size: 0.75rem;
	text-transform: uppercase;
	font-weight: 600;
	padding-bottom: 0.75rem;
	border-bottom: 1px solid var(--border);
}

.invoice-table th:last-child {
	text-align: right;
}

.invoice-table td {
	padding: 0.75rem 0;
	border-bottom: 1px dashed var(--border);
	font-size: 0.9rem;
	color: var(--text-main);
}

.invoice-table td:last-child {
	text-align: right;
	font-weight: 600;
}

.invoice-container h3 {
	text-align: right;
	font-size: 1.25rem;
	color: var(--text-main);
	padding-top: 1rem;
	border-top: 2px solid var(--text-main);
}

/* Modal Actions (Print Button) */
.modal-actions {
	margin-top: 1.5rem;
	display: flex;
	justify-content: center;
	width: 100%;
}

.modal-actions .btn {
	background: var(--primary);
	color: white;
	border: none;
	padding: 0.8rem 3rem;
	border-radius: var(--radius-lg);
	font-size: 1rem;
	font-weight: 500;
	cursor: pointer;
	box-shadow: 0 4px 10px rgba(234, 88, 12, 0.3);
	transition: var(--transition);
}

.modal-actions .btn:hover {
	background: var(--primary-hover);
	transform: translateY(-2px);
	box-shadow: 0 6px 15px rgba(234, 88, 12, 0.4);
}

/* Sheet Handle (Desktop Hidden) */
.sheet-handle {
	display: none;
}

/* VIEW UTILS */
.view-section {
	display: block;
	width: 100%;
	animation: fadeIn 0.3s ease-out;
}

.hidden {
	display: none !important;
}

@keyframes fadeIn {
	from {
		opacity: 0;
		transform: translateY(5px);
	}

	to {
		opacity: 1;
		transform: translateY(0);
	}
}

/* DASHBOARD STYLES */
.stats-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
	gap: 1.5rem;
	margin-bottom: 2rem;
}

.stat-card {
	background: white;
	padding: 1.5rem;
	border-radius: var(--radius-lg);
	box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
	border: 1px solid var(--border);
	display: flex;
	flex-direction: column;
	justify-content: space-between;
	transition: transform 0.2s;
}

.stat-card:hover {
	transform: translateY(-2px);
	box-shadow: var(--shadow-md);
}

.stat-header {
	display: flex;
	justify-content: space-between;
	align-items: flex-start;
	margin-bottom: 1rem;
}

.stat-value {
	font-size: 1.5rem;
	font-weight: 700;
	color: var(--text-main);
	margin-bottom: 0.25rem;
}

.stat-label {
	color: var(--text-light);
	font-size: 0.85rem;
	font-weight: 500;
}

.stat-icon {
	width: 48px;
	height: 48px;
	border-radius: 12px;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 1.5rem;
}

.icon-blue {
	background: #e0f2fe;
	color: #0ea5e9;
}

.icon-green {
	background: #dcfce7;
	color: #10b981;
}

.icon-orange {
	background: #ffedd5;
	color: #f97316;
}

.icon-purple {
	background: #f3e8ff;
	color: #a855f7;
}

.icon-blue-sm {
	font-size: 1.2rem;
	margin-right: 0.5rem;
	color: #ea580c;
	background: #ffedd5;
	width: 32px;
	height: 32px;
	border-radius: 8px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
}

.stat-trend {
	display: flex;
	justify-content: space-between;
	align-items: center;
	font-size: 0.85rem;
}

.trend-up span {
	color: var(--success);
	font-weight: 600;
}

.trend-down span {
	color: var(--danger);
	font-weight: 600;
}

.view-link {
	color: var(--text-light);
	text-decoration: underline;
	font-size: 0.8rem;
	cursor: pointer;
}

/* Charts Layout */
.charts-row {
	display: flex;
	gap: 1.5rem;
	flex-wrap: wrap;
}

.chart-container {
	flex: 2;
	min-width: 400px;
	background: white;
	border-radius: var(--radius-lg);
	padding: 1.5rem;
	border: 1px solid var(--border);
	box-shadow: var(--shadow-sm);
}

.side-widgets {
	flex: 1;
	min-width: 250px;
	display: flex;
	flex-direction: column;
	gap: 1.5rem;
}

.widget-card {
	background: white;
	border-radius: var(--radius-lg);
	padding: 1.5rem;
	border: 1px solid var(--border);
	box-shadow: var(--shadow-sm);
	display: flex;
	flex-direction: column;
}

.chart-header,
.widget-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 1.5rem;
}

.chart-header h3,
.widget-header h3 {
	font-size: 1.1rem;
	font-weight: 700;
	color: var(--text-main);
	display: flex;
	align-items: center;
}

.chart-filters button {
	background: transparent;
	border: none;
	padding: 0.25rem 0.5rem;
	color: var(--text-light);
	font-weight: 500;
	cursor: pointer;
	border-radius: 4px;
	font-size: 0.85rem;
}

.chart-filters button.active {
	background: var(--primary);
	color: white;
}

.chart-summaries {
	display: flex;
	gap: 2rem;
	margin-bottom: 1.5rem;
}

.sum-item {
	display: flex;
	align-items: center;
	gap: 0.5rem;
}

.sum-item .dot {
	width: 8px;
	height: 8px;
	border-radius: 50%;
}

.sum-item .dot.orange {
	background: #fdba74;
}

.sum-item .dot.orange-dark {
	background: #f97316;
}

.sum-item .lbl {
	font-size: 0.8rem;
	color: var(--text-light);
	display: block;
}

.sum-item .val {
	font-size: 1.1rem;
	font-weight: 700;
	color: var(--text-main);
}

/* Info Grid */
.info-grid {
	display: flex;
	justify-content: space-between;
}

.info-item {
	text-align: center;
	padding: 0.5rem;
	background: var(--bg-subtle);
	border-radius: var(--radius-md);
	flex: 1;
	margin: 0 0.25rem;
}

.info-item .icon {
	font-size: 1.2rem;
	margin-bottom: 4px;
}

.info-item .lbl {
	font-size: 0.75rem;
	color: var(--text-muted);
	margin-bottom: 2px;
}

.info-item .val {
	font-size: 1rem;
	font-weight: 700;
	color: var(--text-main);
}

.donut-wrapper {
	display: flex;
	align-items: center;
	justify-content: space-between;
}

.donut-legend {
	display: flex;
	flex-direction: column;
	gap: 1rem;
}

.leg-item .val {
	font-size: 1.1rem;
	font-weight: 700;
}

.leg-item .lbl {
	font-size: 0.8rem;
	color: var(--text-light);
}

.leg-item .badge {
	font-size: 0.7rem;
	padding: 2px 6px;
	border-radius: 4px;
	margin-top: 2px;
	display: inline-block;
}

.badge.green {
	background: #dcfce7;
	color: #16a34a;
}

/* ... Mobile Media Query ... */
@media (max-width: 1024px) {
	.app-layout {
		flex-direction: column;
		height: 100vh;
		width: 100vw;
	}

	/* Sidebar Drawer */
	.mobile-menu-btn {
		display: flex;
		background: white;
		border: 1px solid var(--border);
		padding: 8px;
		border-radius: var(--radius-md);
		margin-left: 10px;
		cursor: pointer;
	}

	.sidebar {
		position: fixed;
		top: 0;
		left: -100%;
		/* Hidden */
		height: 100%;
		width: 280px;
		align-items: flex-start;
		padding: 2rem;
		transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
		box-shadow: 10px 0 30px rgba(0, 0, 0, 0.1);
		background: white;
		/* Ensure bg is opaque */
	}

	.sidebar.active {
		left: 0;
	}

	.nav-items {
		align-items: flex-start;
		margin-top: 1rem;
		width: 100%;

	}

	.menu-item {
		width: 100%;
		justify-content: flex-start;
		padding-left: 1rem;
		gap: 1rem;
		height: 54px;
		flex-direction: row;
		/* Mobile: Side-by-side */
	}

	.menu-item .icon {
		margin-bottom: 0;
	}

	.menu-item .tooltip {
		position: static;
		opacity: 1;
		visibility: visible;
		background: transparent;
		color: var(--text-main);
		font-size: 1rem;
		padding: 0;
		box-shadow: none;
		transform: none;
	}

	.tooltip::before {
		display: none;
	}

	.menu-item.active::before {
		left: 0;
		height: 100%;
		width: 4px;
		border-radius: 0 4px 4px 0;
	}

	/* Center Panel */
	.center-panel {
		width: 100%;
		height: 100vh;
		overflow-y: auto;
		padding: 0;
		padding-bottom: 420px;
		display: block;
	}

	.top-bar {
		position: sticky;
		top: 0;
		z-index: 30;
		background: var(--bg-body);
		border-bottom: 1px solid var(--border);
		padding: 1rem;
		flex-direction: column;
		align-items: flex-start;
		gap: 1rem;
		margin-bottom: 1rem;
		box-shadow: var(--shadow-sm);
	}

	.welcome-section {
		display: none;
	}

	.header-actions {
		width: 100%;
		margin-top: 0;
	}

	.search-box {
		width: 100%;
	}

	/* Move categories padding to inside content */
	.category-tabs {
		padding-left: 1rem;
		padding-right: 1rem;
	}

	.services-grid {
		padding-left: 1rem;
		padding-right: 1rem;
		grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
		gap: 1rem;
		/* Mobile Reset */
		overflow: visible;
		height: auto;
		flex: none;
		display: grid;
	}

	/* Right Panel (Bottom Sheet) */
	.right-panel {
		position: fixed;
		bottom: 0;
		left: 0;
		width: 100%;
		height: auto;
		/* Remove min/max constraint for natural flow based on content */
		border-left: none;
		border-top: 1px solid var(--border);
		border-radius: 20px 20px 0 0;
		box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.1);
		padding: 0 1rem 1.5rem 1rem;
		/* Removed top padding, handle has it */
		z-index: 50;
		/* Higher than floaty bits */
		display: flex;
		flex-direction: column;
		transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
		background: white;
	}

	.sheet-handle {
		display: flex;
		justify-content: center;
		padding: 12px 0;
		width: 100%;
		cursor: pointer;
		flex-shrink: 0;
	}

	.handle-bar {
		width: 40px;
		height: 5px;
		background: var(--border);
		border-radius: 10px;
	}

	/* Collapsed State (Default) */
	.right-panel:not(.expanded) .cart-list-container,
	.right-panel:not(.expanded) .discount-box,
	.right-panel:not(.expanded) .customer-section {
		display: none;
	}

	/* Expanded State */
	.right-panel.expanded {
		height: 85vh;
	}

	.order-header {
		margin-bottom: 0.5rem;
		flex-shrink: 0;
		/* Ensure header stays when list is hidden */
	}

	.cart-list-container {
		flex: 1;
		height: auto;
		min-height: 0;
		overflow-y: auto;
		margin-bottom: 0.5rem;
		border-bottom: 1px dashed var(--border);
	}

	/* ... rest of existing mobile styles ... */
}

/* TABLE STYLES */
.recent-grid {
	margin-top: 2rem;
	display: grid;
	grid-template-columns: 2fr 1fr;
	gap: 1.5rem;
}

.table-card {
	background: white;
	border-radius: var(--radius-lg);
	box-shadow: var(--shadow-sm);
	padding: 1.5rem;
	border: 1px solid var(--border);
}

.recent-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 1.5rem;
}

.recent-header h2 {
	font-size: 1.1rem;
	font-weight: 700;
	color: var(--text-main);
}

.recent-header button {
	background: var(--primary);
	color: white;
	border: none;
	padding: 0.5rem 1rem;
	border-radius: var(--radius-md);
	font-size: 0.85rem;
	cursor: pointer;
}

.table-responsive {
	width: 100%;
	overflow-x: auto;
}

table {
	width: 100%;
	border-collapse: collapse;
}

thead tr {
	border-top: 1px solid var(--border);
	border-bottom: 1px solid var(--border);
	text-align: left;
}

thead th {
	padding: 1rem 0;
	font-size: 0.85rem;
	color: var(--text-light);
	font-weight: 600;
}

tbody tr {
	border-bottom: 1px dashed var(--border);
	transition: background 0.2s;
}

tbody tr:last-child {
	border-bottom: none;
}

tbody tr:hover {
	background: var(--bg-subtle);
}

tbody td {
	padding: 1rem 0;
	font-size: 0.9rem;
	color: var(--text-main);
}

.td-team {
	display: flex;
	align-items: center;
	gap: 0.5rem;
}

.td-team .img-circle {
	width: 32px;
	height: 32px;
	border-radius: 50%;
	background: #e2e8f0;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 0.7rem;
	font-weight: 700;
	color: var(--text-muted);
}

/* Status Badges */
.status {
	padding: 4px 8px;
	border-radius: 12px;
	font-size: 0.75rem;
	font-weight: 600;
}

.status.paid {
	background: #dcfce7;
	color: #10b981;
}

.status.pending {
	background: #fff7ed;
	color: #f97316;
}

.status.failed {
	background: #fee2e2;
	color: #ef4444;
}

/* Products List (Right Side) */
.product-list {
	display: flex;
	flex-direction: column;
	gap: 1rem;
}

.product-item {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding-bottom: 1rem;
	border-bottom: 1px solid var(--bg-subtle);
}

.product-item:last-child {
	border-bottom: none;
	padding-bottom: 0;
}

.product-info {
	display: flex;
	align-items: center;
	gap: 1rem;
}

.product-img {
	width: 48px;
	height: 48px;
	background: var(--bg-subtle);
	border-radius: 8px;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 1.5rem;
}

.product-desc h4 {
	font-size: 0.95rem;
	font-weight: 600;
	color: var(--text-main);
	margin: 0 0 2px 0;
}

.product-desc span {
	font-size: 0.8rem;
	color: var(--text-light);
}

.product-price {
	font-weight: 700;
	color: var(--text-main);
}

@media (max-width: 1024px) {
	.recent-grid {
		grid-template-columns: 1fr;
	}
}

/* Dashboard specific scroll fix */
.dashboard-layout .center-panel {
	overflow-y: auto;
	height: 100vh;
	padding-bottom: 2rem;
	/* Add some bottom padding */
}
 / *   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
       N E W   U I   A D D I T I O N S   ( S i d e b a r   F o o t e r   &   C o n t e n t ) 
       = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =   * / 
 
 . s i d e b a r - f o o t e r   { 
         m a r g i n - t o p :   a u t o ; 
         w i d t h :   1 0 0 % ; 
         p a d d i n g :   1 r e m   0 ; 
         b o r d e r - t o p :   1 p x   s o l i d   v a r ( - - b o r d e r ) ; 
         d i s p l a y :   f l e x ; 
         f l e x - d i r e c t i o n :   c o l u m n ; 
         a l i g n - i t e m s :   c e n t e r ; 
         g a p :   1 r e m ; 
 } 
 
 . u s e r - b l o c k   { 
         d i s p l a y :   f l e x ; 
         f l e x - d i r e c t i o n :   c o l u m n ; 
         a l i g n - i t e m s :   c e n t e r ; 
         g a p :   0 . 7 5 r e m ; 
 } 
 
 . a v a t a r   { 
         w i d t h :   4 4 p x ; 
         h e i g h t :   4 4 p x ; 
         b o r d e r - r a d i u s :   1 2 p x ; 
         b a c k g r o u n d :   l i n e a r - g r a d i e n t ( 1 3 5 d e g ,   v a r ( - - p r i m a r y ) ,   v a r ( - - s e c o n d a r y ) ) ; 
         c o l o r :   w h i t e ; 
         d i s p l a y :   f l e x ; 
         a l i g n - i t e m s :   c e n t e r ; 
         j u s t i f y - c o n t e n t :   c e n t e r ; 
         f o n t - w e i g h t :   7 0 0 ; 
         f o n t - s i z e :   1 . 1 r e m ; 
         b o x - s h a d o w :   0   4 p x   1 2 p x   r g b a ( 2 3 4 ,   8 8 ,   1 2 ,   0 . 2 ) ; 
 } 
 
 . l o g o u t - b t n   { 
         b a c k g r o u n d :   t r a n s p a r e n t ; 
         b o r d e r :   n o n e ; 
         c o l o r :   v a r ( - - t e x t - l i g h t ) ; 
         f o n t - s i z e :   1 . 2 5 r e m ; 
         c u r s o r :   p o i n t e r ; 
         t r a n s i t i o n :   v a r ( - - t r a n s i t i o n ) ; 
         p a d d i n g :   8 p x ; 
         b o r d e r - r a d i u s :   8 p x ; 
 } 
 
 . l o g o u t - b t n : h o v e r   { 
         c o l o r :   v a r ( - - d a n g e r ) ; 
         b a c k g r o u n d :   # f e e 2 e 2 ; 
 } 
 
 . c e n t e r - p a n e l   { 
         p a d d i n g :   0   ! i m p o r t a n t ;   / *   R e s e t   p a d d i n g   f o r   h e a d e r   h a n d l i n g   * / 
 } 
 
 . t o p - b a r   { 
         p a d d i n g :   1 . 5 r e m   2 . 5 r e m ; 
         b a c k g r o u n d :   v a r ( - - b g - s u r f a c e ) ; 
         b o r d e r - b o t t o m :   1 p x   s o l i d   v a r ( - - b o r d e r ) ; 
         m a r g i n - b o t t o m :   0   ! i m p o r t a n t ; 
         p o s i t i o n :   s t i c k y ; 
         t o p :   0 ; 
         z - i n d e x :   9 0 ; 
 } 
 
 . b r e a d c r u m b - a r e a   { 
         m a r g i n - b o t t o m :   0 . 5 r e m ; 
 } 
 
 . b c   { 
         d i s p l a y :   f l e x ; 
         a l i g n - i t e m s :   c e n t e r ; 
         g a p :   8 p x ; 
         f o n t - s i z e :   0 . 8 5 r e m ; 
         c o l o r :   v a r ( - - t e x t - m u t e d ) ; 
 } 
 
 . b c   a   { 
         c o l o r :   v a r ( - - t e x t - m u t e d ) ; 
 } 
 
 . b c   a : h o v e r   { 
         c o l o r :   v a r ( - - p r i m a r y ) ; 
 } 
 
 . b c   . s e p   { 
         c o l o r :   v a r ( - - t e x t - l i g h t ) ; 
 } 
 
 . b c   . c u r   { 
         c o l o r :   v a r ( - - t e x t - m a i n ) ; 
         f o n t - w e i g h t :   6 0 0 ; 
 } 
 
 . m a i n - c o n t e n t - w r a p p e r   { 
         p a d d i n g :   2 . 5 r e m ; 
         f l e x :   1 ; 
         o v e r f l o w - y :   a u t o ; 
 } 
 
 . t i t l e - a r e a   h 1   { 
         f o n t - s i z e :   1 . 8 5 r e m   ! i m p o r t a n t ; 
 } 
 
 @ m e d i a   ( m a x - w i d t h :   1 0 2 4 p x )   { 
         . t o p - b a r   { 
                 p a d d i n g :   1 . 2 5 r e m ; 
         } 
         . m a i n - c o n t e n t - w r a p p e r   { 
                 p a d d i n g :   1 . 2 5 r e m ; 
         } 
 } 
  
 