@import url("https://fonts.googleapis.com/css2?family=Geist:wght@400;500;600;700&family=Geist+Mono:wght@400;500;600&display=swap");

:root {
	/* Light Mode Defaults */
	--background: 220 14% 96%; /* rgb(243 244 246) */
	--foreground: 224 71.4% 4.1%;
	--card: 0 0% 100%;
	--card-foreground: 224 71.4% 4.1%;
	--popover: 0 0% 100%;
	--popover-foreground: 224 71.4% 4.1%;

	/* Primary matching the active menu color requested */
	--primary: 248 100% 72%;
	--primary-foreground: 210 40% 98%;

	--secondary: 220 14.3% 95.9%;
	--secondary-foreground: 220.9 39.3% 11%;
	--muted: 220 13% 91.1%;
	--muted-foreground: 220 8.9% 46.1%;
	--success: 142 56.1% 52.1%;
	--success-foreground: 110 40% 98%;
	--danger: 0 100% 67.1%;
	--danger-foreground: 210 40% 98%;
	--info: 205 100% 70%;
	--info-foreground: 0 0 100%;
	--accent: 220 14.3% 95.9%;
	--accent-foreground: 220.9 39.3% 11%;
	--destructive: 0 84.2% 60.2%;
	--destructive-foreground: 210 40% 98%;
	--border: 220 13% 91%;
	--border-foreground: 220 8.9% 46.1%;
	--input: 0 0 100%;
	--input-foreground: 0 0 100%;
	--ring: 248 100% 77%;
	--ring-foreground: 210 40% 98%;

	/* Sidebar Variables Light */
	--sidebar-background: 0 0% 100%;
	--sidebar-foreground: 240 5.3% 26.1%;
	--sidebar-active: 248 100% 77%;
	--sidebar-active-foreground: 210 40% 98%;
	--sidebar-border: 220 13% 91%;
	--sidebar-border-foreground: 220 8.9% 46.1%;
}

.dark {
	/* Dark Mode Defaults */
	--background: 222 47% 11%; /* rgb(17 24 39) */
	--foreground: 210 40% 98%;
	--card: 215 28% 17%; /* rgb(31 41 55) */
	--card-foreground: 210 40% 98%;
	--popover: 222 47% 11%;
	--popover-foreground: 210 40% 98%;

	/* Primary */
	--primary: 248 100% 72%;
	--primary-foreground: 210 40% 98%;

	--secondary: 217 22% 29.1%;
	--secondary-foreground: 210 40% 98%;
	--muted: 222 19% 27%;
	--muted-foreground: 215 20.2% 65.1%;
	--success: 142 56.1% 52.1%;
	--success-foreground: 110 40% 98%;
	--danger: 0 100% 67.1%;
	--danger-foreground: 210 40% 98%;
	--info: 205 100% 70%;
	--info-foreground: 0 0 100%;
	--accent: 217.2 32.6% 17.5%;
	--accent-foreground: 210 40% 98%;
	--destructive: 0 84.2% 60.2%;
	--destructive-foreground: 210 40% 98%;
	--border: 216 18% 28.1%;
	--border-foreground: 216 18% 28.1%;
	--input: 221 39% 12.3%;
	--input-foreground: 210 40% 98%;
	--ring: 263.4 70% 50.4%;
	--ring-foreground: 210 40% 98%;

	/* Sidebar Variables Dark */
	--sidebar-background: 215 28% 17%; /* rgb(31 41 55) */
	--sidebar-foreground: 220 14.29% 95.88%;
	--sidebar-active: 263.4 70% 50.4%;
	--sidebar-active-foreground: 210 40% 98%;
	--sidebar-border: 217.2 32.6% 17.5%;
	--sidebar-border-foreground: 215 20.2% 65.1%;
}

/* // rgb(17 24 39/0.3) */
body {
	font-family:
		"Geist",
		ui-sans-serif,
		system-ui,
		-apple-system,
		BlinkMacSystemFont,
		"Segoe UI",
		sans-serif;
	background-color: hsl(var(--background));
	color: hsl(var(--foreground));
	transition:
		background-color 0.3s ease,
		color 0.3s ease;
	position: relative;
	min-height: 100vh;
}

body::before {
	content: "";
	position: fixed;
	inset: 0;
	pointer-events: none;
	background:
		radial-gradient(circle at top left, rgba(14, 165, 233, 0.14), transparent 30%),
		radial-gradient(circle at top right, rgba(16, 185, 129, 0.1), transparent 24%),
		linear-gradient(180deg, rgba(255, 255, 255, 0.02), rgba(15, 23, 42, 0.02));
	z-index: 0;
}

body.app-ui-loading #app-content {
	opacity: 0;
	pointer-events: none;
}

body.app-ui-loading #app-content,
body.app-ui-loading #app-header-shell,
body.app-ui-loading #app-sidebar-shell {
	transition: opacity 0.12s ease;
}

.bg-primary {
	background-color: hsl(var(--primary));
	color: hsl(var(--primary-foreground));
}

/* Daterangepicker theme and placement */
.daterangepicker {
	z-index: 9999;
	border: 1px solid hsl(var(--border));
	border-radius: 18px;
	background:
		linear-gradient(180deg, rgba(255, 255, 255, 0.02), rgba(255, 255, 255, 0)),
		hsl(var(--card));
	color: hsl(var(--card-foreground));
	box-shadow:
		0 24px 60px rgba(15, 23, 42, 0.24),
		0 1px 0 rgba(255, 255, 255, 0.03) inset;
	overflow: hidden;
}

.daterangepicker.sales-report-range-picker {
	box-sizing: border-box;
	overflow-y: auto !important;
	overflow-x: hidden !important;
	overscroll-behavior: contain;
}

.daterangepicker.sales-report-range-picker .ranges {
	width: 178px;
}

.daterangepicker.sales-report-range-picker .drp-calendar {
	max-width: 260px;
}

.daterangepicker.sales-report-range-picker .drp-buttons {
	position: sticky;
	bottom: 0;
	clear: both;
	z-index: 2;
	display: flex;
	align-items: center;
	justify-content: flex-end;
	gap: 0.5rem;
}

.daterangepicker.sales-report-range-picker-compact .ranges,
.daterangepicker.sales-report-range-picker-compact .drp-calendar {
	float: none !important;
	width: 100% !important;
	max-width: none;
	border-right: 0;
}

.daterangepicker.sales-report-range-picker-compact .ranges {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 0.5rem;
	border-bottom: 1px solid hsl(var(--border));
	border-right: 0;
	padding: 0.75rem;
}

.daterangepicker.sales-report-range-picker-compact .ranges li {
	margin: 0;
	text-align: center;
}

.daterangepicker.sales-report-range-picker-compact .drp-calendar.left {
	border-right: 0;
	border-bottom: 1px solid hsl(var(--border));
}

.daterangepicker.sales-report-range-picker-compact .calendar-table table {
	width: 100%;
}

.daterangepicker.sales-report-range-picker-compact .drp-buttons {
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto auto;
}

.daterangepicker.sales-report-range-picker-compact .drp-selected {
	min-width: 0;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

@media (max-width: 767px) {
	.daterangepicker.sales-report-range-picker {
		width: calc(100vw - 24px) !important;
	}

	.daterangepicker.sales-report-range-picker .ranges {
		grid-template-columns: minmax(0, 1fr);
	}

	.daterangepicker.sales-report-range-picker .drp-buttons {
		display: grid;
		grid-template-columns: 1fr 1fr;
		gap: 0.5rem;
	}

	.daterangepicker.sales-report-range-picker .drp-selected {
		grid-column: 1 / -1;
		text-align: center;
	}

	.daterangepicker.sales-report-range-picker .btn {
		width: 100%;
	}
}

.sales-report-date-range .daterangepicker {
	left: auto !important;
	right: 0 !important;
	top: calc(100% + 10px) !important;
}

.sales-report-date-range .daterangepicker:before,
.sales-report-date-range .daterangepicker:after {
	left: 28px !important;
	right: auto !important;
}

.dark .daterangepicker,
.dark .daterangepicker .drp-calendar,
.dark .daterangepicker .calendar-table,
.dark .daterangepicker .ranges,
.dark .daterangepicker .drp-buttons {
	background-color: hsl(var(--card)) !important;
	color: hsl(var(--card-foreground)) !important;
}

.daterangepicker:before,
.daterangepicker:after {
	border-bottom-color: hsl(var(--border));
}

.daterangepicker .calendar-table,
.daterangepicker .drp-calendar,
.daterangepicker .drp-buttons,
.daterangepicker .ranges {
	background: hsl(var(--card));
}

.sales-report-date-range {
	background:
		linear-gradient(180deg, rgba(255, 255, 255, 0.02), rgba(255, 255, 255, 0)),
		hsl(var(--card));
	border-color: hsl(var(--border));
	box-shadow:
		0 1px 0 rgba(255, 255, 255, 0.03) inset,
		0 1px 3px rgba(15, 23, 42, 0.06);
	transition:
		border-color 0.2s ease,
		box-shadow 0.2s ease,
		background-color 0.2s ease;
}

.sales-report-date-range:hover {
	border-color: hsla(var(--primary), 0.45);
}

.sales-report-date-range:focus-within {
	border-color: hsl(var(--primary));
	box-shadow:
		0 0 0 3px hsla(var(--primary), 0.14),
		0 1px 0 rgba(255, 255, 255, 0.03) inset,
		0 1px 3px rgba(15, 23, 42, 0.08);
}

.sales-report-date-range input {
	color: hsl(var(--foreground));
	caret-color: transparent;
}

.sales-report-date-range input::placeholder {
	color: hsl(var(--muted-foreground));
}

.daterangepicker .ranges {
	border-right: 1px solid hsl(var(--border));
	padding: 10px 12px 10px 10px;
}

.daterangepicker .ranges li {
	color: hsl(var(--foreground));
	background: hsl(var(--muted));
	border: 1px solid transparent;
	border-radius: 8px;
	margin: 0 0 8px;
	padding: 7px 10px;
}

.dark .daterangepicker .ranges li,
.dark .daterangepicker .calendar-table th,
.dark .daterangepicker .calendar-table td,
.dark .daterangepicker .drp-calendar th,
.dark .daterangepicker .drp-calendar td,
.dark .daterangepicker .drp-selected {
	color: hsl(var(--foreground)) !important;
}

.dark .daterangepicker .ranges li {
	background: hsl(var(--muted)) !important;
}

.dark .daterangepicker .ranges li:hover {
	background: hsla(var(--primary), 0.16) !important;
}

.dark .daterangepicker .ranges li.active {
	background: hsl(var(--primary)) !important;
	color: hsl(var(--primary-foreground)) !important;
}

.daterangepicker .ranges li:hover {
	background: hsla(var(--primary), 0.12);
	color: hsl(var(--foreground));
}

.daterangepicker .ranges li.active {
	background: hsl(var(--primary));
	color: hsl(var(--primary-foreground));
}

.daterangepicker .calendar-table {
	border: 0;
	background: transparent;
}

.daterangepicker .calendar-table table {
	border-collapse: separate;
	border-spacing: 4px;
}

.daterangepicker .calendar-table th,
.daterangepicker .calendar-table td {
	background: transparent !important;
	box-shadow: none !important;
	border: 0 !important;
	border-radius: 10px;
}

.daterangepicker .calendar-table th,
.daterangepicker .calendar-table td,
.daterangepicker .drp-calendar th,
.daterangepicker .drp-calendar td {
	color: hsl(var(--foreground));
}

.daterangepicker .calendar-table th {
	font-size: 12px;
	font-weight: 700;
	color: hsl(var(--muted-foreground));
	letter-spacing: 0.02em;
}

.daterangepicker .calendar-table td {
	min-width: 2rem;
	height: 2rem;
	line-height: 2rem;
}

.daterangepicker .drp-calendar {
	padding: 10px;
}

.daterangepicker .drp-calendar.left {
	border-right: 1px solid hsl(var(--border));
}

.daterangepicker .drp-calendar.left .calendar-table,
.daterangepicker .drp-calendar.right .calendar-table {
	padding: 0;
	border-radius: 0;
}

.daterangepicker .drp-calendar.left .calendar-table thead tr:first-child th,
.daterangepicker .drp-calendar.right .calendar-table thead tr:first-child th {
	padding: 10px 6px 8px;
	font-size: 14px;
	font-weight: 700;
	color: hsl(var(--foreground));
}

.daterangepicker .drp-calendar.left .calendar-table thead tr:last-child th,
.daterangepicker .drp-calendar.right .calendar-table thead tr:last-child th {
	padding-top: 8px;
	padding-bottom: 8px;
}

.daterangepicker .input-mini,
.daterangepicker .calendar-time .input-mini,
.daterangepicker .calendar-time select {
	width: 100%;
	background: hsl(var(--background)) !important;
	border: 1px solid hsl(var(--border)) !important;
	border-radius: 10px !important;
	color: hsl(var(--foreground)) !important;
	box-shadow: none !important;
	outline: none !important;
	padding: 9px 12px !important;
	font-size: 13px !important;
}

.daterangepicker .input-mini::placeholder,
.daterangepicker .calendar-time .input-mini::placeholder {
	color: hsl(var(--muted-foreground)) !important;
}

.daterangepicker .input-mini:focus,
.daterangepicker .calendar-time .input-mini:focus,
.daterangepicker .calendar-time select:focus {
	border-color: hsl(var(--primary)) !important;
	box-shadow: 0 0 0 3px hsla(var(--primary), 0.14) !important;
}

.daterangepicker .calendar-time {
	padding: 8px 10px 0;
}

.daterangepicker .calendar-time .input-group {
	width: 100%;
}

.daterangepicker .calendar-time .input-group .input-mini,
.daterangepicker .calendar-time .input-group select {
	min-height: 38px;
}

.daterangepicker .calendar-time label {
	color: hsl(var(--muted-foreground));
	font-size: 12px;
	font-weight: 600;
	margin-bottom: 6px;
}

.daterangepicker td.off,
.daterangepicker td.off:hover,
.daterangepicker td.off.in-range,
.daterangepicker td.available,
.daterangepicker td.available:hover,
.daterangepicker td.in-range,
.daterangepicker td.start-date,
.daterangepicker td.end-date,
.daterangepicker td.active,
.daterangepicker td.active:hover {
	background-image: none !important;
}

.daterangepicker td.available:hover,
.daterangepicker th.available:hover,
.daterangepicker td.in-range {
	background: hsla(var(--primary), 0.14);
	color: hsl(var(--foreground));
}

.dark .daterangepicker td.available:hover,
.dark .daterangepicker th.available:hover,
.dark .daterangepicker td.in-range {
	background: hsla(var(--primary), 0.18) !important;
	color: hsl(var(--foreground)) !important;
}

.daterangepicker td.active,
.daterangepicker td.active:hover {
	background: hsl(var(--primary));
	color: hsl(var(--primary-foreground));
	box-shadow: 0 0 0 1px hsla(var(--primary), 0.35) inset;
}

.daterangepicker td.start-date,
.daterangepicker td.end-date {
	background: hsl(var(--primary));
	color: hsl(var(--primary-foreground));
	border-radius: 10px;
	box-shadow: 0 0 0 1px hsla(var(--primary), 0.35) inset;
}

.dark .daterangepicker td.active,
.dark .daterangepicker td.active:hover,
.dark .daterangepicker td.start-date,
.dark .daterangepicker td.end-date,
.dark .daterangepicker td.active.start-date,
.dark .daterangepicker td.active.end-date {
	background: hsl(var(--primary)) !important;
	color: hsl(var(--primary-foreground)) !important;
	box-shadow: 0 0 0 1px hsla(var(--primary), 0.38) inset !important;
}

.dark .daterangepicker td.available,
.dark .daterangepicker td.available:hover,
.dark .daterangepicker td.in-range,
.dark .daterangepicker td.off,
.dark .daterangepicker td.off:hover {
	background-color: transparent !important;
}

.daterangepicker td.disabled,
.daterangepicker td.off {
	opacity: 0.45;
}

.daterangepicker .calendar-table .off,
.daterangepicker .calendar-table .weekend.off,
.daterangepicker .calendar-table td.off,
.daterangepicker .calendar-table th.off {
	color: hsl(var(--muted-foreground));
}

.dark .daterangepicker .calendar-table .off,
.dark .daterangepicker .calendar-table .weekend.off,
.dark .daterangepicker .calendar-table td.off,
.dark .daterangepicker .calendar-table th.off {
	color: hsl(var(--muted-foreground)) !important;
}

.daterangepicker .calendar-table .next span,
.daterangepicker .calendar-table .prev span {
	border-color: hsl(var(--foreground));
}

.daterangepicker .drp-calendar.left .calendar-table,
.daterangepicker .drp-calendar.right .calendar-table {
	padding: 6px;
	border-radius: 14px;
}

.daterangepicker .drp-calendar.left .calendar-table thead tr:first-child th,
.daterangepicker .drp-calendar.right .calendar-table thead tr:first-child th {
	padding-top: 0.5rem;
	padding-bottom: 0.5rem;
}

.daterangepicker .drp-buttons {
	border-top: 1px solid hsl(var(--border));
	padding: 12px;
	background: hsl(var(--card));
}

.dark .daterangepicker .drp-buttons {
	border-top-color: hsl(var(--border)) !important;
}

.daterangepicker .drp-selected {
	color: hsl(var(--muted-foreground));
}

.daterangepicker .btn {
	border-radius: 10px;
	font-weight: 600;
	padding: 8px 14px;
}

.daterangepicker .btn-default {
	background: hsl(var(--muted));
	border-color: hsl(var(--border));
	color: hsl(var(--foreground));
}

.daterangepicker .btn-default:hover {
	background: hsla(var(--primary), 0.12);
}

.daterangepicker .btn-primary {
	background: hsl(var(--primary));
	border-color: hsl(var(--primary));
	color: hsl(var(--primary-foreground));
}

.daterangepicker .btn-primary:hover {
	filter: brightness(1.03);
}

/* Sidebar Gradient for Dark Mode */
.sidebar-wrapper {
	background-color: hsl(var(--sidebar-background));
	border-top-right-radius: 1rem;
	border-bottom-right-radius: 1rem;
	box-shadow:
		0 18px 44px rgba(15, 23, 42, 0.08),
		0 2px 10px rgba(15, 23, 42, 0.05);
}

.dark .sidebar-wrapper {
	background: linear-gradient(
		180deg,
		hsl(var(--sidebar-background)) 0%,
		hsl(var(--sidebar-background)) 60%,
		hsl(var(--card)) 100%
	);
}

#sidebar.client-sidebar {
	width: 15rem;
	min-width: 15rem;
}

.sidebar-nav-link {
	transition:
		background-color 0.2s ease,
		color 0.2s ease,
		transform 0.2s ease,
		box-shadow 0.2s ease;
}

.sidebar-nav-link:hover {
	transform: translateX(2px);
}

.nav-item-active > .sidebar-nav-link {
	background:
		linear-gradient(135deg, rgba(14, 165, 233, 0.12), rgba(99, 102, 241, 0.16));
	box-shadow: inset 0 0 0 1px rgba(99, 102, 241, 0.12);
}

.nav-item-active > .sidebar-nav-link .sidebar-nav-text {
	color: hsl(var(--foreground));
	font-weight: 700;
}

.nav-item-active > .sidebar-nav-link .sidebar-nav-icon {
	color: rgb(79, 70, 229) !important;
}

/* Ensure icon clicks trigger parent action buttons/links */
a i[data-lucide],
button i[data-lucide],
.btn i[data-lucide],
a svg.lucide,
button svg.lucide,
svg.lucide,
.btn svg.lucide {
	pointer-events: none;
}

.sidebar-profile-menu {
	backdrop-filter: blur(6px);
}

.sidebar-brand-copy,
.sidebar-profile-meta {
	min-width: 0;
}

header.sticky {
	box-shadow: 0 10px 32px rgba(15, 23, 42, 0.06);
}

#app-content {
	background:
		linear-gradient(180deg, rgba(255, 255, 255, 0.48), rgba(255, 255, 255, 0)),
		transparent;
}

@media (min-width: 768px) {
	body > #app-sidebar-shell {
		flex: 0 0 15rem;
		width: 15rem;
		min-width: 15rem;
		transition: width 0.2s ease, min-width 0.2s ease, flex-basis 0.2s ease;
	}

	body.sidebar-collapsed > #app-sidebar-shell {
		flex-basis: 5.25rem;
		width: 5.25rem;
		min-width: 5.25rem;
	}

	body > #app-sidebar-shell + main {
		flex: 1 1 auto;
		min-width: 0;
		width: auto;
		margin-left: 0;
	}
}

.dark #app-content {
	background:
		linear-gradient(180deg, rgba(15, 23, 42, 0.28), rgba(15, 23, 42, 0)),
		transparent;
}

body:not(.sidebar-collapsed) #sidebar .sidebar-profile-meta,
body:not(.sidebar-collapsed) #sidebar .sidebar-profile-chevron,
body:not(.sidebar-collapsed) #sidebar .sidebar-profile-actions {
	display: block !important;
}

body:not(.sidebar-collapsed) #sidebar .sidebar-profile-actions {
	display: grid !important;
}

body:not(.sidebar-collapsed) #sidebar .sidebar-action-text {
	display: inline !important;
}

body:not(.sidebar-collapsed) #sidebar .sidebar-profile-main {
	justify-content: flex-start;
}

body:not(.sidebar-collapsed) #sidebar .sidebar-profile-wrap {
	padding: 0.75rem;
}

@media (min-width: 768px) {
	body.sidebar-collapsed #sidebar.client-sidebar {
		width: 5.25rem;
		min-width: 5.25rem;
	}

	body.sidebar-collapsed #sidebar .sidebar-brand-text,
	body.sidebar-collapsed #sidebar .sidebar-brand-sub,
	body.sidebar-collapsed #sidebar .sidebar-search-wrap,
	body.sidebar-collapsed #sidebar .sidebar-menu-heading,
	body.sidebar-collapsed #sidebar .sidebar-nav-text,
	body.sidebar-collapsed #sidebar .sidebar-nav-chevron,
	body.sidebar-collapsed #sidebar .sidebar-profile-meta,
	body.sidebar-collapsed #sidebar .sidebar-profile-chevron,
	body.sidebar-collapsed #sidebar .sidebar-action-text {
		display: none !important;
	}

	body.sidebar-collapsed #sidebar .sidebar-nav-link {
		justify-content: center;
		padding: 0.15rem;
		min-height: 2.75rem;
		border-radius: 0;
		background-color: transparent;
		/* border: 1px solid rgba(99, 102, 241, 0.32); */
	}

	body.sidebar-collapsed #sidebar .sidebar-nav-icon {
		margin-right: 0 !important;
		width: 1.35rem;
		height: 1.35rem;
		color: rgba(100, 116, 139, 0.95);
	}

	body.sidebar-collapsed #sidebar .nav-item-active .sidebar-nav-link {
		background: linear-gradient(
			180deg,
			rgba(99, 102, 241, 0.2),
			rgba(99, 102, 241, 0.08)
		);
	}

	body.sidebar-collapsed #sidebar .nav-item-active .sidebar-nav-icon {
		color: rgb(67, 56, 202) !important;
	}

	body.sidebar-collapsed #sidebar .sidebar-submenu {
		display: none !important;
	}

	body.sidebar-collapsed #sidebar .h-20 {
		justify-content: center;
		padding-left: 0.5rem;
		padding-right: 0.5rem;
		position: relative;
	}

	body.sidebar-collapsed #sidebar .sidebar-logo-badge {
		width: 2.85rem;
		height: 2.85rem;
		border-radius: 0.95rem;
	}

	body.sidebar-collapsed #sidebar .sidebar-collapse-btn {
		position: absolute;
		right: 0.45rem;
		top: 0.55rem;
		width: 1.95rem;
		height: 1.95rem;
		padding: 0;
		border-radius: 0.55rem;
	}

	body.sidebar-collapsed #sidebar #nav-container {
		padding-left: 0rem;
		padding-right: 0rem;
	}

	body.sidebar-collapsed #sidebar .sidebar-profile-wrap {
		position: relative;
		padding: 0.6rem 0.5rem 0.75rem;
	}

	body.sidebar-collapsed #sidebar .sidebar-profile-main {
		justify-content: center;
		padding: 0.45rem;
		min-height: 3.25rem;
		border-radius: 0.95rem;
		background: rgba(148, 163, 184, 0.1);
		border: 1px solid rgba(148, 163, 184, 0.22);
	}

	body.sidebar-collapsed #sidebar .sidebar-profile-avatar {
		width: 2.25rem;
		height: 2.25rem;
	}

	body.sidebar-collapsed #sidebar .sidebar-profile-actions {
		grid-template-columns: 1fr;
		gap: 0.45rem;
		margin-top: 0.45rem;
	}

	body.sidebar-collapsed #sidebar .sidebar-action-btn {
		padding: 0.55rem;
		min-height: 2.7rem;
		border-radius: 0.9rem;
	}

	body.sidebar-collapsed #sidebar .sidebar-action-btn i {
		width: 1.2rem;
		height: 1.2rem;
	}

	body.sidebar-collapsed #sidebar .sidebar-profile-menu {
		position: absolute;
		left: calc(100% + 0.65rem);
		bottom: 0.5rem;
		width: 13rem;
		z-index: 60;
	}

	body.sidebar-collapsed #sidebar .sidebar-profile-main {
		box-shadow: 0 4px 14px rgba(2, 6, 23, 0.08);
	}

	body.sidebar-collapsed #sidebar .sidebar-action-btn {
		box-shadow: 0 2px 8px rgba(2, 6, 23, 0.08);
	}
}
.text-menu {
	font-size: 13px; /* Adjusted font size for menu items */
}

/* Active Menu Item Styling */
.nav-item-active {
	--tw-gradient-to: rgb(132 112 255 / 0.04) var(--tw-gradient-to-position);
	--tw-gradient-from: rgb(132 112 255 / 0.12) var(--tw-gradient-from-position);
	--tw-gradient-to: rgb(132 112 255 / 0) var(--tw-gradient-to-position);
	--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to);
	background-image: linear-gradient(135deg, var(--tw-gradient-stops));
}

.text-violet-500 {
	--tw-text-opacity: 1;
	color: rgb(132 112 255 / var(--tw-text-opacity));
}
.text-gray-500 {
	--tw-text-opacity: 1;
	color: rgb(107 114 128 / var(--tw-text-opacity));
}

/* Utilities */
::-webkit-scrollbar {
	width: 6px;
	height: 6px;
}
::-webkit-scrollbar-track {
	background: transparent;
}
::-webkit-scrollbar-thumb {
	background: hsl(var(--border));
	border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
	background: hsl(var(--muted-foreground));
}
input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
	-webkit-appearance: none;
	margin: 0;
}

/* Button Styles */
.btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	font-weight: 600;
	border-radius: 8px;
	text-decoration: none;
	transition:
		background-color 0.2s ease,
		filter 0.2s ease;
}
.btn-xs {
	padding: 6px 12px;
	font-size: 12px;
}
.btn-sm {
	padding: 8px 16px;
	font-size: 14px;
}
.btn-md {
	padding: 10px 20px;
	font-size: 16px;
}
.btn-lg {
	padding: 12px 24px;
	font-size: 18px;
}

.btn-primary {
	background-color: hsl(var(--primary));
	color: hsl(var(--primary-foreground));
}
.btn-primary:hover {
	background-color: hsl(var(--primary));
	filter: brightness(0.95);
}
.btn-secondary {
	background-color: hsl(var(--secondary));
	color: hsl(var(--secondary-foreground));
}
.btn-secondary:hover {
	background-color: hsl(var(--secondary));
	filter: brightness(0.95);
}
.btn-success {
	background-color: hsl(var(--success));
	color: hsl(var(--success-foreground));
}
.btn-success:hover {
	background-color: hsl(var(--success));
	filter: brightness(0.95);
}
.btn-danger {
	background-color: hsl(var(--destructive));
	color: hsl(var(--destructive-foreground));
}
.btn-danger:hover {
	background-color: hsl(var(--destructive));
	filter: brightness(0.95);
}

.btn-info {
	background-color: hsl(var(--info));
	color: hsl(var(--info-foreground));
}
.btn-info:hover {
	background-color: hsl(var(--info));
	filter: brightness(0.95);
}

.btn-popover {
	background-color: hsl(var(--popover));
	color: hsl(var(--popover-foreground));
	border: 1px solid hsl(var(--border));
}
.btn-popover:hover {
	background-color: hsl(var(--popover));
	filter: brightness(0.95);
}

.btn-outline {
	background-color: transparent;
	border: 1px solid hsl(var(--border));
	color: hsl(var(--foreground));
}
.btn-outline:hover {
	background-color: hsl(var(--muted));
}

.btn-default,
.btn-default:hover {
	background-color: hsl(var(--card));
	color: hsl(var(--card-foreground));
	border: 1px solid hsl(var(--border));
}

/* Sidebar scrollbar: hidden by default, shown on hover */
.custom-scrollbar {
	scrollbar-width: thin;
	scrollbar-color: transparent transparent;
}
.custom-scrollbar::-webkit-scrollbar {
	width: 8px;
}
.custom-scrollbar::-webkit-scrollbar-thumb {
	background: transparent;
	transition: background 0.2s ease;
}
.custom-scrollbar.show-scrollbar {
	scrollbar-color: hsl(var(--border)) transparent;
}
.custom-scrollbar.show-scrollbar::-webkit-scrollbar-thumb {
	background: hsl(var(--border));
}
.custom-scrollbar:hover {
	scrollbar-color: hsl(var(--border)) transparent;
}
.custom-scrollbar:hover::-webkit-scrollbar-thumb {
	background: hsl(var(--border));
}
.dark .custom-scrollbar::-webkit-scrollbar-track {
	background: #1e293b;
}
.dark .custom-scrollbar::-webkit-scrollbar-thumb {
	background: #475569;
}
/* DataTables Tailwind-ish refinements */
.dataTable {
	color: hsl(var(--foreground));
}
.dataTables_wrapper .dataTables_paginate .paginate_button {
	padding: 6px 10px;
	margin: 0 2px;
	border-radius: 8px;
	border: 1px solid transparent;
	color: hsl(var(--foreground)) !important;
	cursor: pointer;
}
.dataTables_wrapper .dataTables_paginate .paginate_button.current,
.dataTables_wrapper .dataTables_paginate .paginate_button:hover {
	background: hsl(var(--muted));
	border-color: hsl(var(--border));
}
.dt-buttons .dt-button:hover {
	background: hsl(var(--primary));
	filter: brightness(0.95);
}
.dataTables_filter label,
.dataTables_length label {
	font-size: 13px;
	color: hsl(var(--muted-foreground));
}
.dataTables_info {
	color: hsl(var(--muted-foreground));
	font-size: 12px;
}
.dataTables_wrapper .dataTables_paginate {
	margin-top: 12px;
}
.dt-toolbar .dataTables_length label {
	display: none;
}
.dt-search-box {
	position: relative;
}
.dt-search-input {
	width: 220px;
	border-radius: 12px;
	border: 1px solid hsl(var(--border));
	background: hsl(var(--card));
	color: hsl(var(--foreground));
	padding: 10px 12px 10px 36px;
	font-size: 14px;
}

.dt-search-box::before {
	content: "\\1F50D";
	position: absolute;
	left: 12px;
	top: 50%;
	transform: translateY(-50%);
	font-size: 14px;
	color: hsl(var(--muted-foreground));
}
.dt-export-wrap .dt-button-collection,
.dt-export-wrap .dt-bulk-delete {
	background: hsl(var(--card));
	border: 1px solid hsl(var(--border));
	color: hsl(var(--foreground));
	padding: 8px 12px;
	border-radius: 10px;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}
.dt-export-wrap .dt-button-collection .dt-down-arrow {
	display: none;
}
.dt-export-wrap .dt-buttons .dt-button-collection span {
	vertical-align: middle;
}
.dt-export-wrap .dt-button-collection .dt-button-down-arrow {
	display: none;
}
.dt-export-wrap .dt-button-collection .dt-button-down-arrow span {
	display: none;
}
/* DataTables Tailwind-ish refinements */
.dataTable {
	color: hsl(var(--foreground));
}
.dataTables_wrapper .dataTables_paginate .paginate_button {
	padding: 6px 10px;
	margin: 0 2px;
	border-radius: 8px;
	border: 1px solid transparent;
	color: hsl(var(--foreground)) !important;
}
.dataTables_wrapper .dataTables_paginate .paginate_button.current,
.dataTables_wrapper .dataTables_paginate .paginate_button:hover {
	background: hsl(var(--muted));
	border-color: hsl(var(--border));
}
.dt-buttons .dt-button {
	background: hsl(var(--primary));
	color: hsl(var(--primary-foreground));
	border: none;
	padding: 6px 12px;
	border-radius: 10px;
	margin-right: 6px;
	font-weight: 600;
	font-size: 12px;
}
.dt-buttons .dt-button:hover {
	background: hsl(var(--primary));
	filter: brightness(0.95);
}
.dataTables_length select,
.dataTables_filter input {
	border-radius: 10px;
	border: 1px solid hsl(var(--border));
	background: hsl(var(--card));
	color: hsl(var(--foreground));
	padding: 6px 10px;
	margin-bottom: 0.333em;
}
button.dt-button.dt-reload {
	padding-top: 5px !important;
	padding-bottom: 5px !important;
}
.dataTables_filter label,
.dataTables_length label {
	font-size: 13px;
	color: hsl(var(--muted-foreground));
}
.dataTables_info {
	color: hsl(var(--muted-foreground));
	font-size: 12px;
}
.dataTables_wrapper .dataTables_paginate {
	margin-top: 12px;
}
.dt-reload {
	cursor: pointer;
	margin-top: 5px;
}

#nav-container {
	max-height: none;
	overflow-y: auto;
	overflow-x: hidden;
}

/* DataTables clean card layout (light theme look) */
/* .dataTables_wrapper {
	background: hsl(var(--card));
	border: 1px solid hsl(var(--border));
	border-radius: 14px;
	padding: 14px;
	box-shadow: 0 8px 30px rgba(15, 23, 42, 0.06);
} */
.dt-toolbar {
	border-bottom: 1px solid hsl(var(--border));
	padding-bottom: 10px;
}
.dt-left .dt-buttons {
	display: inline-flex;
	align-items: center;
	gap: 0;
}
.dataTables_length select.dt-length-select {
	border-radius: 10px;
	padding: 8px 10px;
	border: 1px solid hsl(var(--border));
	background: #fff;
	font-weight: 600;
	color: #0f172a;
}
.dataTables_filter {
	display: none;
}
.dt-search-box {
	position: relative;
}
.dt-search-box::before {
	content: "🔍";
	position: absolute;
	left: 12px;
	top: 50%;
	transform: translateY(-50%);
	color: #94a3b8;
	font-size: 14px;
}
.dt-search-input {
	width: 260px;
	border: 1px solid hsl(var(--border));
	border-radius: 12px;
	padding: 10px 12px 10px 34px;
	background: #fff;
	color: #0f172a;
	box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.02);
}
.dt-buttons {
	display: flex;
	align-items: center;
	gap: 0;
}
.dataTables_wrapper .dt-buttons .dt-button {
	background: #fff;
	border: 1px solid hsl(var(--border));
	color: #0f172a;
	padding: 4px 12px;
	border-radius: 10px;
	font-weight: 600;
	box-shadow: 0 3px 8px rgba(15, 23, 42, 0.06);
	margin-top: 0;
}
.dataTables_wrapper .dt-buttons .dt-button:hover {
	background: #f8fafc;
}
.dataTables_wrapper .dataTables_length label,
.dataTables_wrapper .dataTables_info {
	color: #475569;
	font-weight: 500;
}
.dataTable th {
	padding-top: 0.5rem;
	font-size: 13px;
	padding-bottom: 0.5rem;
	background: rgb(249 250 251);
	white-space: nowrap;
	color: rgb(107 114 128);
	border-bottom: 1px solid hsl(var(--border));
}
.dataTable th::before,
.dataTable th::after {
	display: none !important;
}

.dataTable td {
	border-bottom: 1px solid hsl(var(--border));
	color: #334155;
	padding: 8px 8px;
	font-size: 14px;
}


/* .dataTable th.col-options,
.dataTable th.text-right,
.DataTables th.col-options,
.DataTables th.text-right {
	text-align: right;
} */ 
.dataTable th,
.DataTables th{
	text-align: left;
	padding: 12px 16px;
	


}

.dataTable td:last-child,
.DataTables td:last-child
{
	text-align: center;
	vertical-align: middle;
}
.dataTable th:last-child,
.DataTables th:last-child
{
	text-align: right;
}

.dataTable tbody tr.child > td,
.DataTables tbody tr.child > td {
	text-align: left;
	padding: 0.75rem 1rem;
}

.dataTable tbody tr.child ul.dtr-details,
.DataTables tbody tr.child ul.dtr-details {
	display: grid !important;
	width: 100%;
	grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
	gap: 0.75rem;
}

.dataTable tbody tr.child ul.dtr-details > li,
.DataTables tbody tr.child ul.dtr-details > li {
	display: flex;
	min-width: 0;
	flex-direction: column;
	align-items: flex-start;
	gap: 0.35rem;
	border-bottom: 0 !important;
	border-radius: 0.75rem;
	background: hsl(var(--muted) / 0.45);
	padding: 0.75rem;
}

.dataTable tbody tr.child span.dtr-title,
.DataTables tbody tr.child span.dtr-title {
	min-width: 0 !important;
	font-size: 0.75rem;
	font-weight: 700;
	color: hsl(var(--muted-foreground));
}

.dataTable tbody tr.child span.dtr-data,
.DataTables tbody tr.child span.dtr-data {
	width: 100%;
	min-width: 0;
	color: hsl(var(--foreground));
}

.dataTable tbody tr.child span.dtr-data > .flex,
.DataTables tbody tr.child span.dtr-data > .flex,
.dataTable tbody tr.child .erp-table-actions,
.DataTables tbody tr.child .erp-table-actions {
	justify-content: flex-start;
}

@media (max-width: 640px) {
	.dataTable tbody tr.child ul.dtr-details,
	.DataTables tbody tr.child ul.dtr-details {
		grid-template-columns: minmax(0, 1fr);
	}
}

.erp-table-actions,
.item-actions-cell {
	display: flex;
	width: 100%;
	flex-wrap: wrap;
	align-items: center;
	justify-content: flex-end;
	gap: 0.5rem;
}
.dataTable tbody tr:hover {
	background: rgb(249 250 251);
}
.dataTables_wrapper .dataTables_paginate .paginate_button {
	background: #fff;
	border: 1px solid hsl(var(--border));
	border-radius: 8px;
	margin: 0 3px;
	color: #0f172a !important;
	padding: 6px 10px;
}
.dataTables_wrapper .dataTables_paginate .paginate_button.current,
.dataTables_wrapper .dataTables_paginate .paginate_button:hover {
	background: #e2e8f0;
}

/* DataTables clean card layout (dark theme look) */
/* .dark .dataTables_wrapper {
	background: hsl(var(--card));
	border: 1px solid hsl(var(--border));
} */
.dark .dt-toolbar {
	border-bottom: 1px solid hsl(var(--border));
}
.dark .dataTables_length select.dt-length-select {
	background: hsl(var(--card));
	color: hsl(var(--foreground));
	border: 1px solid hsl(var(--border));
}
.dark .dt-search-input {
	background: hsl(var(--card));
	color: hsl(var(--foreground));
	border: 1px solid hsl(var(--border));
	box-shadow: none;
}
.dark .dataTables_wrapper .dt-buttons .dt-button {
	background: hsl(var(--card));
	color: hsl(var(--foreground));
	border: 1px solid hsl(var(--border));
	box-shadow: none;
}
.dt-buttons {
	display: flex;
}
.dark .dataTables_wrapper .dataTables_length label,
.dark .dataTables_wrapper .dataTables_info {
	color: hsl(var(--muted-foreground));
}
.dark .dataTable th {
	background-color: rgb(17 24 39 / 0.2);
	color: hsl(var(--foreground));
	border-bottom: 1px solid hsl(var(--border-foreground));
}
.dark .dataTable td {
	border-bottom: 1px solid hsl(var(--border-foreground));
	color: hsl(var(--foreground));
}
.dark .dataTable tbody tr:hover {
	background: rgb(17 24 39 / 0.2);
}
.dark .dataTables_wrapper .dataTables_paginate .paginate_button {
	background: hsl(var(--card));
	border: 1px solid hsl(var(--border));
	color: hsl(var(--foreground)) !important;
}
.dark .dataTables_wrapper .dataTables_paginate .paginate_button.current,
.dark .dataTables_wrapper .dataTables_paginate .paginate_button:hover {
	background: hsl(var(--popover));
	border-color: hsl(var(--border));
}

/* Final override: DataTables export dropdown menu */
div.dataTables_wrapper div.dt-button-collection {
	min-width: 200px !important;
	padding: 6px !important;
	border-radius: 10px !important;
	border: 1px solid hsl(var(--border)) !important;
	background: #ffffff !important;
	box-shadow: 0 12px 28px rgba(15, 23, 42, 0.22) !important;
}
div.dataTables_wrapper div.dt-button-collection > .dt-button,
div.dataTables_wrapper div.dt-button-collection > button.dt-button,
div.dataTables_wrapper div.dt-button-collection > a.dt-button {
	display: block !important;
	width: 100% !important;
	margin: 0 !important;
	padding: 9px 10px !important;
	height: auto !important;
	background: transparent !important;
	border: 0 !important;
	border-radius: 6px !important;
	box-shadow: none !important;
	color: #1e293b !important;
	font-size: 14px !important;
	font-weight: 600 !important;
	line-height: 1.25 !important;
	text-align: left !important;
	text-transform: none !important;
}
div.dataTables_wrapper div.dt-button-collection > .dt-button + .dt-button,
div.dataTables_wrapper
	div.dt-button-collection
	> button.dt-button
	+ button.dt-button,
div.dataTables_wrapper div.dt-button-collection > a.dt-button + a.dt-button {
	border-top: 1px solid rgba(148, 163, 184, 0.35) !important;
}
div.dataTables_wrapper div.dt-button-collection > .dt-button:hover,
div.dataTables_wrapper div.dt-button-collection > button.dt-button:hover,
div.dataTables_wrapper div.dt-button-collection > a.dt-button:hover {
	background: #f1f5f9 !important;
}
.dark div.dataTables_wrapper div.dt-button-collection {
	border-color: hsl(var(--border)) !important;
	background: hsl(var(--card)) !important;
	box-shadow: 0 14px 30px rgba(0, 0, 0, 0.48) !important;
}
.dark div.dataTables_wrapper div.dt-button-collection > .dt-button,
.dark div.dataTables_wrapper div.dt-button-collection > button.dt-button,
.dark div.dataTables_wrapper div.dt-button-collection > a.dt-button {
	color: hsl(var(--foreground)) !important;
}
.dark div.dataTables_wrapper div.dt-button-collection > .dt-button + .dt-button,
.dark
	div.dataTables_wrapper
	div.dt-button-collection
	> button.dt-button
	+ button.dt-button,
.dark
	div.dataTables_wrapper
	div.dt-button-collection
	> a.dt-button
	+ a.dt-button {
	border-top-color: rgba(71, 85, 105, 0.7) !important;
}
.dark div.dataTables_wrapper div.dt-button-collection > .dt-button:hover,
.dark div.dataTables_wrapper div.dt-button-collection > button.dt-button:hover,
.dark div.dataTables_wrapper div.dt-button-collection > a.dt-button:hover {
	background: rgba(51, 65, 85, 0.55) !important;
}

/* Modal Animation */
.modal-enter {
	opacity: 0;
	transform: scale(0.95);
}
.modal-enter-active {
	opacity: 1;
	transform: scale(1);
	transition:
		opacity 0.2s,
		transform 0.2s;
}
.modal-exit {
	opacity: 1;
	transform: scale(1);
}
.modal-exit-active {
	opacity: 0;
	transform: scale(0.95);
	transition:
		opacity 0.2s,
		transform 0.2s;
}

.pos-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
	gap: 1rem;
}
.pos-grid-item {
	background-color: hsl(var(--card));
	color: hsl(var(--card-foreground));
	padding: 1rem;
	border-radius: 0.5rem;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
	text-align: center;
	transition:
		background-color 0.3s ease,
		color 0.3s ease;
}
.pos-grid-item:hover {
	background-color: hsl(var(--primary));
	color: hsl(var(--primary-foreground));
	cursor: pointer;
}

/* Fade animation */
.fade-enter {
	opacity: 0;
	transform: translateY(-10px);
}
.fade-enter-active {
	opacity: 1;
	transform: translateY(0);
	transition:
		opacity 200ms,
		transform 200ms;
}
.fade-exit {
	opacity: 1;
	transform: translateY(0);
}
.fade-exit-active {
	opacity: 0;
	transform: translateY(-10px);
	transition:
		opacity 200ms,
		transform 200ms;
}

/* Editor content defaults */
.editor-content ul {
	list-style-type: disc;
	margin-left: 1.5rem;
}
.editor-content ol {
	list-style-type: decimal;
	margin-left: 1.5rem;
}
.editor-content b,
.editor-content strong {
	font-weight: bold;
}
.editor-content i,
.editor-content em {
	font-style: italic;
}
.editor-content u {
	text-decoration: underline;
}
.editor-content h1 {
	font-size: 2em;
	font-weight: bold;
	margin-bottom: 0.5em;
}
.editor-content h2 {
	font-size: 1.5em;
	font-weight: bold;
	margin-bottom: 0.5em;
}
.editor-content a {
	color: #2563eb;
	text-decoration: underline;
}
.editor-content blockquote {
	border-left: 4px solid #cbd5e1;
	padding-left: 1rem;
	color: #64748b;
}

/* Editor Content Styles - Dark Mode Overrides */
.dark .editor-content a {
	color: #60a5fa;
}
.dark .editor-content blockquote {
	border-left-color: #475569;
	color: #94a3b8;
}

/* Compact ERP UI */
.erp-page {
	display: flex;
	flex-direction: column;
	gap: 0.85rem;
}

.erp-page-header {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-start;
	justify-content: space-between;
	gap: 0.65rem;
	padding-bottom: 0.15rem;
}

.erp-page-header-copy {
	display: flex;
	flex-direction: column;
	gap: 0.2rem;
}

.erp-page-meta,
.erp-page-actions,
.erp-section-actions,
.erp-toolbar-actions,
.erp-modal-actions {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.45rem;
}

.erp-page-eyebrow,
.erp-section-eyebrow,
.erp-toolbar-title {
	font-size: 0.6875rem;
	font-weight: 700;
	line-height: 1rem;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: hsl(var(--muted-foreground));
}

.erp-page-title {
	font-size: 1.5rem;
	line-height: 1.85rem;
	font-weight: 600;
	color: hsl(var(--foreground));
	margin: 0;
}

.erp-page-subtitle,
.erp-section-subtitle,
.erp-toolbar-description,
.erp-stat-hint,
.erp-empty-message,
.erp-modal-subtitle {
	margin-top: 0.1rem;
	font-size: 0.8125rem;
	line-height: 1.2rem;
	color: hsl(var(--muted-foreground));
}

.erp-section-title,
.erp-modal-title {
	font-size: 1rem;
	line-height: 1.5rem;
	font-weight: 600;
	color: hsl(var(--foreground));
	margin: 0;
}

.erp-panel {
	position: relative;
	z-index: 0;
	overflow: hidden;
	border: 1px solid hsl(var(--border));
	border-radius: 0.875rem;
	background: hsl(var(--card));
	box-shadow: 0 10px 24px -22px rgba(15, 23, 42, 0.9);
}

.erp-panel:focus-within {
	z-index: 20;
	overflow: visible;
}

.erp-panel-body {
	padding: 0.8rem 0.9rem;
}

.erp-section-header,
.erp-modal-header {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-start;
	justify-content: space-between;
	gap: 0.65rem;
	padding: 0.7rem 0.9rem;
	border-bottom: 1px solid hsl(var(--border));
}

.erp-toolbar,
.erp-modal-footer {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-start;
	justify-content: space-between;
	gap: 0.65rem;
	padding: 0.7rem 0.9rem;
	border-bottom: 1px solid hsl(var(--border));
	background: hsl(var(--card));
}

.erp-toolbar--compact {
	row-gap: 0.55rem;
}

.erp-toolbar-copy {
	display: flex;
	flex-direction: column;
	gap: 0.125rem;
}

.erp-page-actions,
.erp-section-actions,
.erp-toolbar-actions--right {
	justify-content: flex-end;
}

.erp-page-actions .erp-btn,
.erp-section-actions .erp-btn,
.erp-toolbar-actions .erp-btn,
.erp-modal-actions .erp-btn {
	min-height: 2.2rem;
}

.erp-toolbar-actions--right {
	justify-content: flex-end;
}

.erp-grid-stats {
	display: grid;
	grid-template-columns: repeat(1, minmax(0, 1fr));
	gap: 0.75rem;
}

.erp-stat-card {
	display: flex;
	flex-direction: column;
	height: 100%;
	border: 1px solid hsl(var(--border));
	border-radius: 0.875rem;
	padding: 0.7rem;
	background: hsl(var(--background) / 0.48);
}

.h-full {
	height: 100%;
}

.erp-stat-card--primary {
	border-color: rgb(99 102 241 / 0.28);
	background: rgb(99 102 241 / 0.08);
}

.erp-stat-card--success {
	border-color: rgb(16 185 129 / 0.28);
	background: rgb(16 185 129 / 0.08);
}

.erp-stat-card--warning {
	border-color: rgb(245 158 11 / 0.28);
	background: rgb(245 158 11 / 0.08);
}

.erp-stat-card--danger {
	border-color: rgb(244 63 94 / 0.28);
	background: rgb(244 63 94 / 0.08);
}

.erp-stat-label {
	font-size: 0.6875rem;
	font-weight: 700;
	line-height: 1rem;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: hsl(var(--muted-foreground));
}

.erp-stat-value {
	margin-top: 0.3rem;
	font-size: 1.35rem;
	line-height: 1.7rem;
	font-weight: 600;
	color: hsl(var(--foreground));
}

.erp-stat-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 1.875rem;
	height: 1.875rem;
	border-radius: 0.625rem;
	border: 1px solid hsl(var(--border));
	background: hsl(var(--card));
	color: hsl(var(--muted-foreground));
}

.erp-tabs {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	padding-bottom: 0.125rem;
	scrollbar-width: none;
	flex-wrap: wrap;
}


.erp-tab {
	display: inline-flex;
	align-items: center;
	gap: 0.45rem;
	white-space: nowrap;
	border: 1px solid hsl(var(--border));
	border-radius: 0.75rem;
	padding: 0.42rem 0.68rem;
	font-size: 0.75rem;
	font-weight: 600;
	color: hsl(var(--muted-foreground));
	background: hsl(var(--card));
	transition:
		background-color 0.2s ease,
		border-color 0.2s ease,
		color 0.2s ease;
}

.erp-tab:hover,
.erp-tab:focus-visible {
	color: hsl(var(--foreground));
	background: hsl(var(--muted) / 0.32);
	border-color: hsl(var(--border));
	outline: none;
	box-shadow: 0 0 0 3px hsl(var(--primary) / 0.12);
}

.erp-tab--active {
	color: hsl(var(--foreground));
	border-color: rgb(99 102 241 / 0.4);
	background: rgb(99 102 241 / 0.12);
}

.erp-tab-count {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 1.25rem;
	height: 1.25rem;
	padding: 0 0.375rem;
	border-radius: 999px;
	background: hsl(var(--background));
	font-size: 0.6875rem;
	color: hsl(var(--foreground));
}

.erp-table-wrap {
	padding: 0 0.9rem 0.85rem;
	overflow-x: auto;
}

.erp-table-wrap--standard {
	padding-top: 0.15rem;
}

.erp-table-wrap .dataTables_wrapper {
	padding-top: 0.45rem;
}

.erp-table {
	width: 100% !important;
	min-width: 100%;
	font-size: 0.875rem;
	border-collapse: separate;
	border-spacing: 0;
}

.erp-table.dataTable th {
	padding: 0.62rem 0.7rem;
	font-size: 0.6875rem;
	line-height: 1rem;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	background: hsl(var(--muted) / 0.28);
	color: hsl(var(--muted-foreground));
	border-bottom: 1px solid hsl(var(--border));
	white-space: nowrap;
}

.erp-table.dataTable td {
	padding: 0.58rem 0.7rem;
	font-size: 0.875rem;
	line-height: 1.25rem;
	color: hsl(var(--foreground));
	border-top: 1px solid hsl(var(--border) / 0.7);
	vertical-align: middle;
}

.erp-table.dataTable tbody tr {
	transition:
		background-color 0.18s ease,
		box-shadow 0.18s ease;
}

.erp-table.dataTable tbody tr:hover {
	background: hsl(var(--muted) / 0.26);
}

.erp-table .sorting,
.erp-table .sorting_asc,
.erp-table .sorting_desc {
	background-image: none !important;
}

.erp-table thead th:first-child,
.erp-table tbody td:first-child {
	padding-left: 0.7rem;
}

.erp-table thead th:last-child,
.erp-table tbody td:last-child {
	padding-right: 0.7rem;
}

.erp-table-cell--muted {
	font-size: 0.75rem;
	color: hsl(var(--muted-foreground));
}

.erp-table-cell--amount {
	text-align: right;
	font-variant-numeric: tabular-nums;
}

.erp-table-cell--date {
	font-variant-numeric: tabular-nums;
	color: hsl(var(--muted-foreground));
}

.erp-table-cell--action {
	text-align: right;
	white-space: nowrap;
}

.erp-table-actions {
	display: inline-flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: flex-end;
	gap: 0.35rem;
}

.erp-table-empty {
	padding: 0.85rem 0;
}

.erp-badge {
	display: inline-flex;
	align-items: center;
	gap: 0.35rem;
	min-height: 1.45rem;
	padding: 0.15rem 0.5rem;
	border-radius: 999px;
	border: 1px solid hsl(var(--border));
	background: hsl(var(--background) / 0.42);
	font-size: 0.6875rem;
	line-height: 1rem;
	font-weight: 600;
	white-space: nowrap;
	color: hsl(var(--foreground));
}

.erp-badge-dot {
	width: 0.425rem;
	height: 0.425rem;
	border-radius: 999px;
	background: currentColor;
}

.erp-badge--neutral {
	color: hsl(var(--muted-foreground));
}

.erp-badge--primary {
	border-color: rgb(99 102 241 / 0.3);
	background: rgb(99 102 241 / 0.12);
	color: rgb(165 180 252);
}

.erp-badge--success {
	border-color: rgb(16 185 129 / 0.3);
	background: rgb(16 185 129 / 0.12);
	color: rgb(110 231 183);
}

.erp-badge--warning {
	border-color: rgb(245 158 11 / 0.3);
	background: rgb(245 158 11 / 0.12);
	color: rgb(252 211 77);
}

.erp-badge--danger {
	border-color: rgb(244 63 94 / 0.3);
	background: rgb(244 63 94 / 0.12);
	color: rgb(253 164 175);
}

.erp-badge--info {
	border-color: rgb(56 189 248 / 0.3);
	background: rgb(56 189 248 / 0.12);
	color: rgb(125 211 252);
}

.erp-field {
	display: flex;
	flex-direction: column;
	gap: 0.35rem;
	min-width: 0;
}

.erp-field--toggle {
	gap: 0;
}

.erp-label {
	margin: 0;
	font-size: 0.75rem;
	line-height: 1rem;
	font-weight: 600;
	color: hsl(var(--foreground));
}

.erp-help {
	margin: 0;
	font-size: 0.6875rem;
	line-height: 1rem;
	color: hsl(var(--muted-foreground));
}

.erp-control,
.erp-panel .form-control,
.erp-toolbar .form-control,
.erp-modal-body .form-control,
.erp-page .form-control,
.erp-field .select2-selection,
.erp-panel .select2-selection,
.erp-toolbar .select2-selection,
.erp-modal-body .select2-selection {
	width: 100%;
	min-height: 2.25rem;
	border: 1px solid hsl(var(--border));
	border-radius: 0.75rem;
	background: hsl(var(--input));
	color: hsl(var(--foreground));
	padding: 0.45rem 0.7rem;
	font-size: 0.8125rem;
	line-height: 1.2rem;
	transition:
		border-color 0.18s ease,
		box-shadow 0.18s ease,
		background-color 0.18s ease;
}

.erp-panel select.form-control,
.erp-toolbar select.form-control,
.erp-modal-body select.form-control,
.erp-page select.form-control,
.erp-select {
	padding-right: 2rem;
}

.erp-textarea,
.erp-panel textarea.form-control,
.erp-modal-body textarea.form-control,
.erp-page textarea.form-control {
	min-height: 5rem;
	resize: vertical;
}

.erp-page .select2-container,
.erp-panel .select2-container,
.erp-toolbar .select2-container,
.erp-modal-body .select2-container {
	width: 100% !important;
}

.erp-page .select2-selection__rendered,
.erp-panel .select2-selection__rendered,
.erp-toolbar .select2-selection__rendered,
.erp-modal-body .select2-selection__rendered {
	line-height: 1.2rem !important;
	padding-left: 0 !important;
	padding-right: 1.15rem !important;
	font-size: 0.8125rem;
}

.erp-page .select2-selection__arrow,
.erp-panel .select2-selection__arrow,
.erp-toolbar .select2-selection__arrow,
.erp-modal-body .select2-selection__arrow {
	height: 100% !important;
	right: 0.45rem !important;
}

.erp-control:focus,
.erp-panel .form-control:focus,
.erp-toolbar .form-control:focus,
.erp-modal-body .form-control:focus,
.erp-page .form-control:focus,
.erp-field .select2-selection:focus,
.erp-panel .select2-selection:focus,
.erp-toolbar .select2-selection:focus,
.erp-modal-body .select2-selection:focus,
.erp-panel .select2-container--focus .select2-selection,
.erp-toolbar .select2-container--focus .select2-selection,
.erp-modal-body .select2-container--focus .select2-selection,
.erp-page .select2-container--focus .select2-selection {
	outline: none;
	border-color: hsl(var(--primary));
	box-shadow: 0 0 0 3px hsl(var(--primary) / 0.16);
}

.erp-toggle {
	display: flex;
	align-items: flex-start;
	gap: 0.65rem;
	cursor: pointer;
}

.erp-toggle-input {
	position: absolute;
	opacity: 0;
	pointer-events: none;
}

.erp-check-ui,
.erp-switch-ui {
	position: relative;
	flex: 0 0 auto;
}

.erp-check-ui {
	width: 1rem;
	height: 1rem;
	margin-top: 0.05rem;
	border: 1px solid hsl(var(--border));
	border-radius: 0.3rem;
	background: hsl(var(--input));
}

.erp-toggle-input:checked + .erp-check-ui {
	border-color: hsl(var(--primary));
	background: hsl(var(--primary));
}

.erp-toggle-input:checked + .erp-check-ui::after {
	content: "";
	position: absolute;
	left: 0.3rem;
	top: 0.1rem;
	width: 0.25rem;
	height: 0.5rem;
	border: solid hsl(var(--primary-foreground));
	border-width: 0 2px 2px 0;
	transform: rotate(45deg);
}

.erp-switch-ui {
	width: 2rem;
	height: 1.15rem;
	border: 1px solid hsl(var(--border));
	border-radius: 999px;
	background: hsl(var(--muted) / 0.8);
	transition:
		background-color 0.18s ease,
		border-color 0.18s ease;
}

.erp-switch-ui::after {
	content: "";
	position: absolute;
	top: 0.08rem;
	left: 0.1rem;
	width: 0.85rem;
	height: 0.85rem;
	border-radius: 999px;
	background: hsl(var(--card));
	transition: transform 0.18s ease;
}

.erp-toggle-input:checked + .erp-switch-ui {
	border-color: hsl(var(--primary));
	background: hsl(var(--primary));
}

.erp-toggle-input:checked + .erp-switch-ui::after {
	transform: translateX(0.82rem);
}

.erp-toggle-copy {
	display: flex;
	flex-direction: column;
	gap: 0.2rem;
	min-width: 0;
}

.erp-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.45rem;
	min-height: 2.2rem;
	border-radius: 0.75rem;
	border: 1px solid hsl(var(--border));
	padding: 0.42rem 0.75rem;
	font-size: 0.75rem;
	line-height: 1rem;
	font-weight: 600;
	background: hsl(var(--card));
	color: hsl(var(--foreground));
	white-space: nowrap;
	transition:
		background-color 0.18s ease,
		border-color 0.18s ease,
		color 0.18s ease,
		filter 0.18s ease,
		transform 0.18s ease;
}

.erp-btn:hover,
.erp-btn:focus-visible {
	background: hsl(var(--muted) / 0.32);
	outline: none;
	text-decoration: none;
	box-shadow: 0 0 0 3px hsl(var(--primary) / 0.12);
}

.erp-btn i,
.erp-btn svg {
	width: 0.95rem;
	height: 0.95rem;
}

.erp-btn--sm {
	min-height: 1.95rem;
	padding: 0.3rem 0.6rem;
	border-radius: 0.65rem;
}

.erp-btn--lg {
	min-height: 2.4rem;
	padding: 0.5rem 0.9rem;
}

.erp-btn-primary {
	border-color: hsl(var(--primary));
	background: hsl(var(--primary));
	color: hsl(var(--primary-foreground));
}

.erp-btn-primary:hover,
.erp-btn-primary:focus-visible {
	background: hsl(var(--primary));
	filter: brightness(1.06);
}

.erp-btn-secondary {
	background: hsl(var(--card));
	color: hsl(var(--foreground));
}

.erp-btn-ghost {
	background: transparent;
	color: hsl(var(--muted-foreground));
}

.erp-btn-ghost:hover,
.erp-btn-ghost:focus-visible {
	color: hsl(var(--foreground));
	background: hsl(var(--muted) / 0.24);
}

.erp-btn-toolbar {
	background: hsl(var(--background) / 0.4);
}

.erp-btn-success {
	border-color: rgb(16 185 129 / 0.35);
	background: rgb(16 185 129 / 0.12);
	color: rgb(110 231 183);
}

.erp-btn-danger {
	border-color: rgb(244 63 94 / 0.35);
	background: rgb(244 63 94 / 0.12);
	color: rgb(253 164 175);
}

.erp-btn-icon {
	width: 2.2rem;
	padding-left: 0;
	padding-right: 0;
}

.erp-btn[disabled],
.erp-btn.disabled {
	opacity: 0.6;
	pointer-events: none;
}

.erp-panel .dataTables_wrapper .dt-buttons .dt-button,
.erp-panel .dataTables_wrapper .dt-search-input,
.erp-panel .dataTables_wrapper .dataTables_paginate .paginate_button {
	border-radius: 0.75rem;
}

.erp-panel .dataTables_wrapper .dataTables_filter,
.erp-panel .dataTables_wrapper .dataTables_length,
.erp-panel .dataTables_wrapper .dt-buttons {
	margin-bottom: 0;
}

.erp-panel .dataTables_wrapper .dataTables_length label,
.erp-panel .dataTables_wrapper .dataTables_filter label {
	display: inline-flex;
	align-items: center;
	gap: 0.45rem;
	margin: 0;
	font-size: 0.75rem;
	color: hsl(var(--muted-foreground));
}

.erp-panel .dataTables_wrapper .dt-buttons .dt-button {
	padding: 0.45rem 0.75rem;
	font-size: 0.75rem;
	box-shadow: none;
	border: 1px solid hsl(var(--border));
	background: hsl(var(--card));
	color: hsl(var(--foreground));
}

.erp-panel .dataTables_wrapper .dt-search-input {
	height: 2.2rem;
	padding-top: 0.45rem;
	padding-bottom: 0.45rem;
	font-size: 0.8125rem;
	border: 1px solid hsl(var(--border));
	background: hsl(var(--input));
	color: hsl(var(--foreground));
}

.erp-panel .dataTables_wrapper .dataTables_info,
.erp-panel .dataTables_wrapper .dataTables_paginate {
	font-size: 0.75rem;
	padding-top: 0.6rem;
}

.erp-panel .dataTables_wrapper .dataTables_paginate .paginate_button {
	min-width: 2rem;
	height: 2rem;
	margin-left: 0.25rem;
	border: 1px solid hsl(var(--border));
	background: hsl(var(--card));
	color: hsl(var(--foreground)) !important;
}

.erp-panel .dataTables_wrapper .dataTables_paginate .paginate_button.current,
.erp-panel .dataTables_wrapper .dataTables_paginate .paginate_button:hover {
	border-color: hsl(var(--primary));
	background: hsl(var(--primary));
	color: hsl(var(--primary-foreground)) !important;
}

.erp-panel .dataTables_wrapper .dataTables_empty {
	padding: 1.25rem 0.75rem;
	font-size: 0.8125rem;
	color: hsl(var(--muted-foreground));
}

.erp-empty-action {
	display: flex;
	flex-wrap: wrap;
	gap: 0.45rem;
}

.erp-empty {
	display: flex;
	flex-direction: column;
	gap: 0.75rem;
	padding: 0.9rem 1rem;
	border: 1px dashed hsl(var(--border));
	border-radius: 0.875rem;
	background: hsl(var(--background) / 0.34);
}

.erp-empty-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 1.9rem;
	height: 1.9rem;
	border-radius: 0.65rem;
	background: hsl(var(--muted) / 0.4);
	color: hsl(var(--muted-foreground));
}

.erp-empty-title {
	font-size: 0.875rem;
	line-height: 1.25rem;
	font-weight: 600;
	color: hsl(var(--foreground));
}

.erp-modal-layout {
	display: flex;
	flex-direction: column;
	max-height: 100%;
	background: hsl(var(--card));
}

.erp-modal-body {
	display: flex;
	flex-direction: column;
	gap: 0.75rem;
	padding: 0.9rem;
}

@media (min-width: 768px) {
	.erp-grid-stats {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (min-width: 1280px) {
	.erp-grid-stats {
		grid-template-columns: repeat(4, minmax(0, 1fr));
	}
}

.erp-task-table-shell .erp-section-title {
	margin-bottom: 0;
}

.erp-task-toolbar {
	gap: 0.625rem;
}

.erp-task-toolbar-main,
.erp-task-toolbar-slot {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.5rem;
}

.erp-task-toolbar-slot--search {
	min-width: min(100%, 16rem);
}

.erp-task-toolbar .dataTables_length label {
	display: inline-flex;
	align-items: center;
	gap: 0.45rem;
	margin: 0;
	font-size: 0.75rem;
	font-weight: 600;
	color: hsl(var(--muted-foreground));
}

.erp-task-toolbar .dataTables_length select,
.erp-task-toolbar .dt-buttons .dt-button,
.erp-task-toolbar .dt-search-input,
.erp-task-toolbar [data-dropdown-toggle] {
	min-height: 2.25rem;
	border-radius: 0.75rem;
}

.erp-task-toolbar .dataTables_length select {
	padding: 0.4rem 2rem 0.4rem 0.75rem;
	border: 1px solid hsl(var(--border));
	background: hsl(var(--card));
	color: hsl(var(--foreground));
}

.erp-task-toolbar .dt-buttons {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.5rem;
}

.erp-task-toolbar .dt-buttons .dt-button {
	margin: 0;
	padding: 0.5rem 0.8rem;
	font-size: 0.75rem;
	line-height: 1rem;
	font-weight: 600;
}

.erp-task-toolbar .dt-buttons .buttons-collection,
.erp-task-toolbar .dt-buttons .dt-reload {
	border: 1px solid hsl(var(--border));
	background: hsl(var(--card));
	color: hsl(var(--foreground));
	box-shadow: none;
}

.erp-task-toolbar .dt-search-box {
	width: 100%;
}

.erp-task-toolbar .dt-search-input {
	height: 2.25rem;
	width: 100%;
	min-width: 14rem;
}

.erp-task-toolbar [data-dropdown-toggle] {
	padding: 0.5rem 0.75rem;
	font-size: 0.75rem;
	line-height: 1rem;
}

.erp-task-toolbar [data-dropdown-menu] {
	width: min(20rem, calc(100vw - 2rem));
}



.erp-task-name-cell {
	display: flex;
	min-width: 18rem;
	flex-direction: column;
	gap: 0.45rem;
}

.erp-task-title-row {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-start;
	gap: 0.45rem;
}

.erp-task-name-link {
	font-size: 0.875rem;
	font-weight: 600;
	line-height: 1.25rem;
	color: hsl(var(--foreground));
}

.erp-task-name-link:hover {
	color: hsl(var(--primary));
}

.erp-task-progress {
	height: 0.375rem;
	overflow: hidden;
	border-radius: 999px;
	background: hsl(var(--muted) / 0.55);
}

.erp-task-progress-bar {
	height: 100%;
	border-radius: inherit;
	background: hsl(var(--primary));
}

.erp-task-progress-bar--done {
	background: rgb(16 185 129);
}

.erp-task-meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.5rem;
	font-size: 0.75rem;
	line-height: 1rem;
	color: hsl(var(--muted-foreground));
}

.erp-task-category,
.erp-task-everyone {
	display: inline-flex;
	align-items: center;
	gap: 0.35rem;
	padding: 0.25rem 0.6rem;
	border-radius: 999px;
	border: 1px solid hsl(var(--border));
	background: hsl(var(--background) / 0.48);
	font-size: 0.6875rem;
	font-weight: 600;
	line-height: 1rem;
	color: hsl(var(--foreground));
}

.erp-task-tags {
	display: flex;
	min-width: 8rem;
	flex-wrap: wrap;
	gap: 0.35rem;
}

.erp-task-tags .label.tags {
	display: inline-flex;
	align-items: center;
	padding: 0.22rem 0.55rem;
	border-radius: 999px;
	font-size: 0.6875rem;
	line-height: 1rem;
	font-weight: 600;
}

.erp-task-due {
	display: flex;
	min-width: 6.5rem;
	flex-direction: column;
	gap: 0.15rem;
}

.erp-task-status-cell {
	display: flex;
	align-items: center;
	gap: 0.35rem;
}

.erp-task-status-menu {
	position: relative;
}

.erp-task-status-trigger {
	display: inline-flex;
	cursor: pointer;
	list-style: none;
	align-items: center;
	justify-content: center;
	width: 1.75rem;
	height: 1.75rem;
	border: 1px solid hsl(var(--border));
	border-radius: 0.6rem;
	background: hsl(var(--card));
	color: hsl(var(--muted-foreground));
}

.erp-task-status-trigger::-webkit-details-marker {
	display: none;
}

.erp-task-status-list {
	position: absolute;
	right: 0;
	top: calc(100% + 0.35rem);
	z-index: 30;
	min-width: 10rem;
	overflow: hidden;
	border: 1px solid hsl(var(--border));
	border-radius: 0.75rem;
	background: hsl(var(--card));
	box-shadow: 0 18px 32px -24px rgba(15, 23, 42, 0.95);
}

.erp-task-status-list li + li {
	border-top: 1px solid hsl(var(--border));
}

.erp-task-status-list a {
	display: block;
	padding: 0.55rem 0.75rem;
	font-size: 0.75rem;
	line-height: 1rem;
	color: hsl(var(--foreground));
}

.erp-task-status-list a:hover,
.erp-task-status-list a.is-active {
	background: hsl(var(--muted) / 0.35);
}

.erp-task-assignees {
	display: flex;
	min-width: 8rem;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.4rem;
}

.erp-task-avatars {
	display: flex;
	align-items: center;
}

.erp-task-avatar {
	position: relative;
	display: inline-flex;
	margin-left: -0.35rem;
	border: 2px solid hsl(var(--card));
	border-radius: 999px;
	overflow: hidden;
}

.erp-task-avatar:first-child {
	margin-left: 0;
}

.erp-task-inline-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 1.75rem;
	height: 1.75rem;
	margin-left: 0;
	border-radius: 0.6rem;
}

.erp-task-actions {
	display: flex;
	min-width: 7rem;
	flex-wrap: wrap;
	justify-content: flex-end;
	gap: 0.25rem;
}

.erp-task-actions .btn {
	margin: 0;
}

@media (max-width: 767px) {
	.erp-task-toolbar-main {
		width: 100%;
	}

	.erp-task-toolbar-slot--search {
		min-width: 100%;
	}

	.erp-task-name-cell {
		min-width: 14rem;
	}
}

.invoice-workspace {
	display: flex;
	flex-direction: column;
	gap: 1.1rem;
}

.invoice-workspace__masthead,
.invoice-workspace__surface,
.invoice-cockpit {
	border: 1px solid rgba(226, 232, 240, 0.98);
	border-radius: 1.05rem;
	background: #fff;
	box-shadow:
		0 1px 2px rgba(15, 23, 42, 0.04),
		0 10px 24px -24px rgba(15, 23, 42, 0.14);
}

.invoice-workspace__masthead {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-start;
	justify-content: space-between;
	gap: 1rem;
	padding: 1.15rem 1.2rem;
}

.invoice-workspace__masthead-copy {
	display: flex;
	flex-direction: column;
	gap: 0.45rem;
}

.invoice-workspace__eyebrow-row,
.invoice-workspace__surface-meta,
.invoice-cockpit__meta,
.invoice-workspace__masthead-actions {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.5rem;
}

.invoice-workspace__period,
.invoice-workspace__meta-pill {
	display: inline-flex;
	align-items: center;
	min-height: 1.85rem;
	padding: 0.2rem 0.68rem;
	border: 1px solid rgba(226, 232, 240, 0.95);
	border-radius: 999px;
	background: #fff;
	font-size: 0.72rem;
	font-weight: 600;
	line-height: 1rem;
	color: rgba(71, 85, 105, 0.92);
}

.invoice-workspace__period-select {
	min-width: 5.25rem;
	min-height: 1.85rem;
	padding: 0.2rem 2rem 0.2rem 0.7rem;
	border: 1px solid rgba(226, 232, 240, 0.95);
	border-radius: 999px;
	background-color: #fff;
	font-size: 0.72rem;
	font-weight: 600;
	line-height: 1rem;
	color: rgba(71, 85, 105, 0.92);
	appearance: none;
	-webkit-appearance: none;
	-moz-appearance: none;
	background-image:
		linear-gradient(45deg, transparent 50%, rgba(71, 85, 105, 0.85) 50%),
		linear-gradient(135deg, rgba(71, 85, 105, 0.85) 50%, transparent 50%);
	background-position:
		calc(100% - 0.95rem) calc(50% - 1px),
		calc(100% - 0.7rem) calc(50% - 1px);
	background-size:
		0.38rem 0.38rem,
		0.38rem 0.38rem;
	background-repeat: no-repeat;
}

.invoice-workspace__period-select:focus {
	outline: none;
	border-color: rgba(99, 102, 241, 0.42);
	box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.08);
}

.invoice-workspace__meta-pill--active {
	border-color: rgba(99, 102, 241, 0.22);
	background: rgba(99, 102, 241, 0.08);
	color: #4338ca;
}

.invoice-workspace__title {
	margin: 0;
	font-size: 1.95rem;
	font-weight: 700;
	line-height: 1.1;
	color: hsl(var(--foreground));
}

.invoice-workspace__subtitle,
.invoice-workspace__surface-subtitle,
.invoice-workspace__table-hint,
.invoice-cockpit__subtitle {
	margin: 0.2rem 0 0;
	font-size: 0.92rem;
	line-height: 1.5rem;
	color: hsl(var(--muted-foreground));
}

.invoice-workspace__masthead-actions {
	justify-content: flex-end;
	align-self: flex-start;
}

.invoice-workspace__masthead--minimal {
	border: none;
	border-radius: 0;
	background: transparent;
	box-shadow: none;
	padding: 0.25rem 0 0;
}

.invoice-workspace__masthead-actions .erp-btn {
	min-height: 2.9rem;
	padding: 0.6rem 0.95rem;
	border-radius: 0.95rem;
	box-shadow: none;
}

.invoice-workspace__subnav-link {
	display: inline-flex;
	align-items: center;
	gap: 0.35rem;
	margin-top: 0.3rem;
	font-size: 0.88rem;
	font-weight: 500;
	color: #2563eb;
	text-decoration: none;
}

.invoice-workspace__subnav-link:hover {
	color: #1d4ed8;
	text-decoration: none;
}

.invoice-workspace__period--current {
	min-width: 5.25rem;
	justify-content: center;
	padding-right: 0.95rem;
	position: relative;
}

.invoice-workspace__period--current::after {
	content: "";
	position: absolute;
	right: 0.75rem;
	top: 50%;
	width: 0.45rem;
	height: 0.45rem;
	margin-top: -0.3rem;
	border-right: 1.75px solid rgba(71, 85, 105, 0.85);
	border-bottom: 1.75px solid rgba(71, 85, 105, 0.85);
	transform: rotate(45deg);
}

.invoice-workspace__snapshot {
	display: flex;
	flex-direction: column;
	gap: 0.8rem;
}

.invoice-workspace__actionbar {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 0.8rem;
}

.invoice-workspace__actionbar-main,
.invoice-workspace__actionbar-side {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.5rem;
}

.invoice-workspace__icon-btn {
	width: 2.95rem;
	min-width: 2.95rem;
	padding-inline: 0;
	justify-content: center;
}

.invoice-workspace__surface {
	padding: 1.1rem;
}

.invoice-workspace__surface-head,
.invoice-cockpit__header {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-start;
	justify-content: space-between;
	gap: 0.8rem;
}

.invoice-workspace__surface-label,
.invoice-workspace__table-label,
.invoice-cockpit__eyebrow,
.invoice-cockpit__label {
	margin: 0;
	font-size: 0.72rem;
	font-weight: 700;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: hsl(var(--muted-foreground));
}

.invoice-workspace__surface-title,
.invoice-cockpit__title {
	margin: 0.2rem 0 0;
	font-size: 1.1rem;
	font-weight: 700;
	line-height: 1.45rem;
	color: hsl(var(--foreground));
}

.invoice-workspace__surface-head--minimal {
	justify-content: flex-end;
	margin-bottom: 0.1rem;
}

.invoice-workspace__filters-shell {
	margin-top: 0.75rem;
}

.invoice-workspace__filters {
	display: grid;
	grid-template-columns: minmax(0, 1.8fr) auto;
	gap: 0.9rem;
	margin-top: 0.4rem;
	padding: 1rem 1.05rem;
	border: 1px solid rgba(226, 232, 240, 0.95);
	border-radius: 0.95rem;
	background: #fff;
	box-shadow: 0 10px 28px -30px rgba(15, 23, 42, 0.18);
}

.invoice-workspace__table-toolbar {
	border: 1px solid rgba(226, 232, 240, 0.95);
	border-radius: 0.95rem;
	background: #fff;
	box-shadow: 0 10px 28px -30px rgba(15, 23, 42, 0.18);
}
.erp-invoice-filter-grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 0.85rem;
	width: 100%;
}

.invoice-workspace__filter-actions,
.erp-invoice-filter-actions {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.5rem;
}
.erp-invoice-control-slot {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.5rem;
	justify-content: flex-end;
}
.invoice-workspace__filter-actions > *,
.erp-invoice-filter-actions > * {
	flex: 0 0 auto;
}

.invoice-workspace__lookup-item {
	flex: 0 0 auto;
	min-width: 10.5rem;
}

.invoice-workspace__lookup-item [data-dropdown] {
	width: 100%;
}

.invoice-workspace__lookup-item [data-dropdown-toggle] {
	position: relative;
	display: flex;
	width: 100%;
	align-items: center;
	justify-content: space-between;
	gap: 0.65rem;
	min-height: 3.15rem;
	padding: 0.72rem 0.85rem;
	border: 1px solid rgba(226, 232, 240, 0.96);
	border-radius: 0.9rem;
	background: #fff;
	box-shadow: none;
	font-size: 0.88rem;
	font-weight: 600;
	color: hsl(var(--foreground));
	text-align: left;
	transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.invoice-workspace__lookup-item [data-dropdown-toggle]:hover,
.invoice-workspace__lookup-item [data-dropdown-toggle][aria-expanded="true"] {
	border-color: rgba(148, 163, 184, 0.9);
	background: #f8fafc;
	box-shadow: 0 6px 16px -18px rgba(15, 23, 42, 0.18);
}

.invoice-workspace__lookup-item [data-dropdown-toggle] i[data-lucide] {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 1.55rem;
	height: 1.55rem;
	border-radius: 0;
	border: 0;
	background: transparent;
	box-shadow: none;
	color: #475569;
}

.invoice-workspace__lookup-item [data-dropdown-toggle]::after {
	content: "";
	flex: 0 0 0.45rem;
	width: 0.45rem;
	height: 0.45rem;
	margin-left: auto;
	border-right: 2px solid rgba(100, 116, 139, 0.8);
	border-bottom: 2px solid rgba(100, 116, 139, 0.8);
	transform: rotate(45deg);
}

.invoice-workspace__lookup-item--project [data-dropdown-toggle] {
	background: #fff;
}

.invoice-workspace__lookup-item--project [data-dropdown-toggle] i[data-lucide] {
	color: #475569;
}

.invoice-workspace__lookup-item--client [data-dropdown-toggle] {
	background: #fff;
}

.invoice-workspace__lookup-item--client [data-dropdown-toggle] i[data-lucide] {
	color: #475569;
}

.invoice-workspace__lookup-item--agent [data-dropdown-toggle] {
	background: #fff;
}

.invoice-workspace__lookup-item--agent [data-dropdown-toggle] i[data-lucide] {
	color: #475569;
}

.invoice-workspace__lookup-item [data-dropdown-menu] {
	width: min(100%, 22rem);
	margin-top: 0.55rem;
	border-radius: 1rem;
	border-color: rgba(226, 232, 240, 0.96);
	background: #fff;
	box-shadow: 0 28px 42px -30px rgba(15, 23, 42, 0.32);
}

.invoice-workspace__filter-actions .erp-btn {
	flex: 0 0 auto;
	min-height: 3.15rem;
	padding-inline: 1rem;
	border-radius: 0.9rem;
}

.invoice-workspace__filters .form-group,
.invoice-workspace__filter-actions .form-group {
	margin-bottom: 0;
}

.invoice-workspace__filter-actions {
	justify-content: flex-end;
	align-self: end;
}

.invoice-workspace__filters label,
.invoice-workspace__filter-actions label {
	margin-bottom: 0.35rem;
	font-size: 0.7rem;
	font-weight: 600;
	letter-spacing: 0.02em;
	color: hsl(var(--muted-foreground));
}

.invoice-workspace__filters .form-control,
.invoice-workspace__filters .select2-selection,
.invoice-workspace__filter-actions .form-control,
.invoice-workspace__filter-actions .select2-selection {
	min-height: 2.85rem;
	border-radius: 0.85rem;
	background: #fff;
	border-color: rgba(203, 213, 225, 0.9);
	box-shadow: none;
}

.invoice-workspace__table-bar {
	margin-top: 0.95rem;
	padding: 0.15rem 0 0.35rem;
	border-bottom: none;
}

.invoice-workspace__table-bar--minimal {
	padding-top: 0;
}

.invoice-workspace__table-toolbar {
	display: flex;
	/* flex-wrap: wrap; */
	align-items: center;
	justify-content: space-between;
	gap: 0.85rem;
	margin-top: 0;
	padding: 0.8rem 0.9rem;
}

.invoice-workspace__table-controls,
.erp-invoice-dt-controls {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: flex-end;
	gap: 0.5rem;
}

.invoice-workspace__table-controls {
	flex: 1 1 32rem;
	justify-content: flex-start;
}

.invoice-workspace__table-search {
	flex: 0 1 22rem;
	margin-left: auto;
}

.invoice-workspace__table-controls .dataTables_length label,
.erp-invoice-toolbar .dataTables_length label {
	display: inline-flex;
	align-items: center;
	gap: 0.45rem;
	margin: 0;
	font-size: 0.78rem;
	font-weight: 600;
	color: hsl(var(--muted-foreground));
}

.invoice-workspace__table-controls .dataTables_length select,
.invoice-workspace__table-controls .dt-buttons .dt-button,
.invoice-workspace__table-controls .dt-search-input,
.erp-invoice-toolbar .dataTables_length select,
.erp-invoice-toolbar .dt-buttons .dt-button,
.erp-invoice-toolbar .dt-search-input {
	min-height: 2.6rem;
	border-radius: 0.8rem;
}

.invoice-workspace__table-controls .dataTables_length select,
.erp-invoice-toolbar .dataTables_length select {
	padding: 0.4rem 2rem 0.4rem 0.75rem;
	border: 1px solid hsl(var(--border));
	background: hsl(var(--card));
	color: hsl(var(--foreground));
}

.invoice-workspace__table-controls .dt-buttons,
.erp-invoice-toolbar .dt-buttons {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
}

.invoice-workspace__table-controls .dt-buttons .dt-button,
.erp-invoice-toolbar .dt-buttons .dt-button {
	margin: 0;
	padding: 0.5rem 0.85rem;
	font-size: 0.78rem;
	line-height: 1rem;
	font-weight: 600;
	border: 1px solid hsl(var(--border));
	background: hsl(var(--card));
	color: hsl(var(--foreground));
	box-shadow: none;
}

.invoice-workspace__table-controls .dt-search-box,
.erp-invoice-toolbar .dt-search-box {
	width: 100%;
}

.invoice-workspace__table-controls .dt-search-input,
.erp-invoice-toolbar .dt-search-input {
	height: 2.6rem;
	width: 100%;
	min-width: 15rem;
}

.invoice-workspace__table-wrap {
	margin-top: 0.65rem;
	overflow: hidden;
	border: 1px solid rgba(226, 232, 240, 0.95);
	border-radius: 1rem;
	background: #fff;
}

.invoice-workspace__table-wrap .dataTables_wrapper {
	padding: 0;
}

.erp-invoice-control-slot--search {
	min-width: 100%;
}

.invoice-cockpit {
	padding: 1rem 1.1rem;
}

.invoice-cockpit--simple {
	padding: 0.95rem 1rem;
}

.invoice-cockpit__summary-strip {
	display: flex;
	justify-content: flex-end;
}

.invoice-cockpit__summary-chips {
	display: flex;
	flex-wrap: wrap;
	justify-content: flex-end;
	gap: 0.5rem;
}

.invoice-cockpit__summary-chip {
	display: inline-flex;
	align-items: center;
	gap: 0.6rem;
	padding: 0.36rem 0.7rem;
	border: 1px solid rgba(203, 213, 225, 0.95);
	border-radius: 0.8rem;
	background: #fff;
	font-size: 0.82rem;
	line-height: 1.1rem;
	color: #475569;
}

.invoice-cockpit__summary-chip strong {
	font-size: 0.88rem;
	font-weight: 700;
	color: #0f172a;
}

.invoice-cockpit__summary-chip--success {
	color: #16a34a;
}

.invoice-cockpit__summary-chip--danger {
	color: #ef4444;
}

.invoice-cockpit__summary-chip--warning {
	color: #d97706;
}

.invoice-status-grid {
	display: grid;
	grid-template-columns: repeat(5, minmax(0, 1fr));
	gap: 0.85rem;
	margin-top: 0.95rem;
}

.invoice-status-card {
	display: block;
	padding: 0.8rem 0.95rem;
	border: 1px solid rgba(226, 232, 240, 0.95);
	border-radius: 0.95rem;
	background: #fff;
	text-decoration: none;
	transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.invoice-status-card:hover {
	border-color: rgba(148, 163, 184, 0.95);
	background: #fff;
	box-shadow: 0 8px 18px -18px rgba(15, 23, 42, 0.12);
	text-decoration: none;
}

.invoice-status-grid--simple {
	grid-template-columns: repeat(5, minmax(0, 1fr));
}

.invoice-status-card__head {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 0.45rem;
}

.invoice-status-card__title-wrap {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 0.35rem;
}

.invoice-status-card__title {
	font-size: 0.9rem;
	font-weight: 500;
	color: #475569;
}

.invoice-status-card__percent {
	font-size: 0.78rem;
	font-weight: 500;
	color: #64748b;
}

.invoice-status-card__metric {
	margin-top: 0.4rem;
	font-size: 0.9rem;
	font-weight: 700;
	color: #334155;
}

.invoice-status-card--danger .invoice-status-card__title {
	color: #ef4444;
}

.invoice-status-card--success .invoice-status-card__title {
	color: #16a34a;
}

.invoice-status-card--warning .invoice-status-card__title {
	color: #d97706;
}

.erp-invoice-table.dataTable thead th {
	position: sticky;
	top: 0;
	z-index: 2;
	background: #f8fafc;
	color: #64748b;
	font-size: 0.72rem;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	text-align: left;
	vertical-align: middle;
	padding: 0.9rem 1.1rem !important;
	border-bottom: 1px solid rgba(226, 232, 240, 0.95);
	white-space: nowrap;
}

.erp-invoice-table.dataTable tbody td {
	background: #fff;
	border-top: 1px solid rgba(226, 232, 240, 0.9);
	padding: 1rem 1.1rem !important;
	vertical-align: middle;
}

.erp-invoice-table.dataTable tbody tr:hover td {
	background: #f8fbff;
}

.erp-invoice-table.dataTable td:first-child,
.erp-invoice-table.dataTable th:first-child {
	width: 2.5rem;
	text-align: center;
}

.erp-invoice-table.dataTable td:last-child,
.erp-invoice-table.dataTable th:last-child {
	text-align: center;
}

.erp-invoice-number-cell,
.erp-invoice-client-cell,
.erp-invoice-project-cell,
.erp-invoice-date-cell,
.erp-invoice-amount-cell {
	display: flex;
	flex-direction: column;
	gap: 0.2rem;
}

.erp-invoice-number-cell {
	min-width: 11rem;
}

.erp-invoice-number-row {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.35rem;
}

.erp-invoice-number-link {
	font-size: 0.95rem;
	font-weight: 600;
	line-height: 1.25rem;
	color: hsl(var(--foreground));
}

.erp-invoice-number-link:hover {
	color: hsl(var(--primary));
}

.erp-invoice-meta-row {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.45rem;
	font-size: 0.78rem;
	line-height: 1rem;
	color: hsl(var(--muted-foreground));
}

.erp-invoice-status-cell {
	display: flex;
	align-items: center;
}

.erp-invoice-agent-cell {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	min-width: 9rem;
}

.erp-invoice-agent-avatar {
	display: inline-flex;
	width: 2rem;
	height: 2rem;
	border-radius: 999px;
	overflow: hidden;
	border: 1px solid hsl(var(--border));
}

.erp-invoice-actions {
	display: flex;
	min-width: 8rem;
	flex-wrap: wrap;
	justify-content: flex-end;
	gap: 0.25rem;
}

.erp-invoice-actions .btn {
	margin: 0;
}

.erp-invoice-inline-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 2rem;
	height: 2rem;
	margin-left: 0;
	border-radius: 0.7rem;
}

.erp-invoice-action-menu {
	position: relative;
}

.erp-invoice-action-trigger {
	display: inline-flex;
	cursor: pointer;
	list-style: none;
	align-items: center;
	justify-content: center;
	width: 2rem;
	height: 2rem;
	border: 1px solid hsl(var(--border));
	border-radius: 0.7rem;
	background: hsl(var(--card));
	color: hsl(var(--muted-foreground));
}

.erp-invoice-action-trigger::-webkit-details-marker {
	display: none;
}

.erp-invoice-action-list {
	position: absolute;
	right: 0;
	top: calc(100% + 0.35rem);
	z-index: 30;
	min-width: 11rem;
	overflow: hidden;
	border: 1px solid hsl(var(--border));
	border-radius: 0.75rem;
	background: hsl(var(--card));
	box-shadow: 0 18px 32px -24px rgba(15, 23, 42, 0.95);
}

.erp-invoice-action-list li + li {
	border-top: 1px solid hsl(var(--border));
}

.erp-invoice-action-list a {
	display: block;
	padding: 0.55rem 0.75rem;
	font-size: 0.75rem;
	line-height: 1rem;
	color: hsl(var(--foreground));
}

.erp-invoice-action-list a:hover {
	background: hsl(var(--muted) / 0.35);
}

.dark .invoice-workspace__masthead,
.dark .invoice-workspace__surface,
.dark .invoice-cockpit {
	border-color: rgba(148, 163, 184, 0.18);
	background:
		linear-gradient(180deg, rgba(15, 23, 42, 0.92), rgba(15, 23, 42, 0.88)),
		radial-gradient(circle at top right, rgba(99, 102, 241, 0.16), transparent 32%);
	box-shadow: 0 18px 42px -32px rgba(2, 6, 23, 0.95);
}

.dark .invoice-workspace__period,
.dark .invoice-workspace__meta-pill {
	border-color: rgba(148, 163, 184, 0.18);
	background: rgba(15, 23, 42, 0.46);
	color: rgba(226, 232, 240, 0.82);
}

.dark .invoice-workspace__period-select {
	border-color: rgba(148, 163, 184, 0.18);
	background-color: rgba(15, 23, 42, 0.46);
	color: rgba(226, 232, 240, 0.82);
	background-image: linear-gradient(45deg, transparent 50%, rgba(226, 232, 240, 0.82) 50%), linear-gradient(135deg, rgba(226, 232, 240, 0.82) 50%, transparent 50%);
}

.dark .invoice-workspace__masthead--minimal {
	background: transparent;
	box-shadow: none;
}

.dark .invoice-workspace__meta-pill--active {
	border-color: rgba(99, 102, 241, 0.32);
	background: rgba(79, 70, 229, 0.16);
	color: #c7d2fe;
}

.dark .invoice-workspace__title,
.dark .invoice-workspace__surface-title,
.dark .invoice-cockpit__title,
.dark .invoice-cockpit__value {
	color: #f8fafc;
}

.dark .invoice-workspace__subtitle,
.dark .invoice-workspace__surface-subtitle,
.dark .invoice-workspace__table-hint,
.dark .invoice-cockpit__subtitle,
.dark .invoice-workspace__surface-label,
.dark .invoice-workspace__table-label,
.dark .invoice-cockpit__eyebrow,
.dark .invoice-cockpit__label,
.dark .invoice-workspace__filters label,
.dark .invoice-workspace__filter-actions label,
.dark .invoice-cockpit__hint {
	color: rgba(148, 163, 184, 0.9);
}

.dark .invoice-workspace__filters {
	background: transparent;
}

.dark .invoice-workspace__filters,
.dark .invoice-workspace__table-toolbar {
.dark .invoice-workspace__filters {
	border-color: rgba(148, 163, 184, 0.18);
	background: rgba(15, 23, 42, 0.86);
}

.dark .invoice-workspace__lookup-item [data-dropdown-toggle] {
	border-color: rgba(148, 163, 184, 0.18);
	background: rgba(15, 23, 42, 0.58);
	color: #f8fafc;
}

.dark .invoice-workspace__lookup-item [data-dropdown-toggle]::after {
	border-right-color: rgba(203, 213, 225, 0.85);
	border-bottom-color: rgba(203, 213, 225, 0.85);
}

.dark .invoice-workspace__lookup-item [data-dropdown-toggle] i[data-lucide],
.dark .invoice-workspace__lookup-item--project [data-dropdown-toggle] i[data-lucide],
.dark .invoice-workspace__lookup-item--client [data-dropdown-toggle] i[data-lucide],
.dark .invoice-workspace__lookup-item--agent [data-dropdown-toggle] i[data-lucide] {
.dark
	.invoice-workspace__lookup-item--project
	[data-dropdown-toggle]
	i[data-lucide],
.dark
	.invoice-workspace__lookup-item--client
	[data-dropdown-toggle]
	i[data-lucide],
.dark
	.invoice-workspace__lookup-item--agent
	[data-dropdown-toggle]
	i[data-lucide] {
	color: rgba(226, 232, 240, 0.88);
}

.dark .invoice-workspace__lookup-item [data-dropdown-menu] {
	border-color: rgba(148, 163, 184, 0.18);
	background: rgba(15, 23, 42, 0.96);
}

.dark .invoice-cockpit__summary-chip {
	border-color: rgba(148, 163, 184, 0.18);
	background: rgba(15, 23, 42, 0.72);
	color: rgba(203, 213, 225, 0.85);
}

.dark .invoice-cockpit__summary-chip strong {
	color: #f8fafc;
}

.dark .invoice-status-card__title {
	color: rgba(226, 232, 240, 0.88);
}

.dark .invoice-status-card__percent,
.dark .invoice-status-card__metric {
	color: rgba(203, 213, 225, 0.8);
}

.dark .invoice-workspace__filters .form-control,
.dark .invoice-workspace__filters .select2-selection,
.dark .invoice-workspace__filter-actions .form-control,
.dark .invoice-workspace__filter-actions .select2-selection {
	background: hsl(var(--card));
}

.dark .invoice-workspace__table-wrap {
	background: rgba(15, 23, 42, 0.38);
}

.dark .invoice-cockpit__stat {
	background: rgba(15, 23, 42, 0.42);
}

.dark .invoice-cockpit__stat--primary {
	border-color: rgba(99, 102, 241, 0.3);
	background: linear-gradient(180deg, rgba(49, 46, 129, 0.34), rgba(15, 23, 42, 0.52));
}

.dark .invoice-cockpit__stat--success {
	border-color: rgba(16, 185, 129, 0.28);
	background: linear-gradient(180deg, rgba(6, 95, 70, 0.32), rgba(15, 23, 42, 0.52));
}

.dark .invoice-cockpit__stat--warning {
	border-color: rgba(245, 158, 11, 0.28);
	background: linear-gradient(180deg, rgba(120, 53, 15, 0.3), rgba(15, 23, 42, 0.52));
}

.dark .invoice-cockpit__stat--danger {
	border-color: rgba(244, 63, 94, 0.24);
	background: linear-gradient(180deg, rgba(127, 29, 29, 0.3), rgba(15, 23, 42, 0.52));
}

.dark .invoice-cockpit__icon {
	background: rgba(255, 255, 255, 0.04);
	color: rgba(226, 232, 240, 0.9);
}

.dark .invoice-status-card {
	background: rgba(15, 23, 42, 0.38);
}

.dark .invoice-status-card:hover {
	background: rgba(30, 41, 59, 0.72);
}

.dark .erp-invoice-table.dataTable thead th {
	background: rgba(15, 23, 42, 0.96);
	color: rgba(203, 213, 225, 0.82);
}

.dark .erp-invoice-table.dataTable tbody td {
	background: transparent;
	border-top-color: rgba(51, 65, 85, 0.82);
}

.dark .erp-invoice-table.dataTable tbody tr:hover td {
	background: rgba(30, 41, 59, 0.42);
}

@media (min-width: 1024px) {
	.erp-invoice-filter-grid {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}
}

@media (max-width: 1279px) {
	.invoice-cockpit__stats {
		grid-template-columns: repeat(4, minmax(0, 1fr));
	}

	.invoice-status-grid {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}
}

@media (max-width: 991px) {
	.invoice-workspace__filters {
		grid-template-columns: minmax(0, 1fr);
	}

	.invoice-workspace__filter-actions {
		justify-content: flex-start;
	}

	.invoice-workspace__actionbar {
		flex-direction: column;
		align-items: stretch;
	}

	.invoice-workspace__actionbar-main,
	.invoice-workspace__actionbar-side {
		width: 100%;
	}

	.invoice-workspace__table-toolbar {
		flex-direction: column;
		align-items: stretch;
	}

	.invoice-workspace__table-search {
		flex-basis: 100%;
		margin-left: 0;
	}

	.invoice-cockpit__stats {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (max-width: 767px) {
	.invoice-workspace__masthead,
	.invoice-workspace__surface,
	.invoice-cockpit {
		padding-left: 0.85rem;
		padding-right: 0.85rem;
	}

	.invoice-workspace__masthead-actions,
	.invoice-workspace__surface-meta,
	.invoice-workspace__table-controls {
		width: 100%;
		justify-content: flex-start;
	}

	.invoice-workspace__actionbar-main > *,
	.invoice-workspace__actionbar-side > * {
		flex: 1 1 100%;
	}

	.erp-invoice-filter-grid {
		grid-template-columns: repeat(1, minmax(0, 1fr));
	}

	.invoice-status-grid,
	.invoice-cockpit__stats {
		grid-template-columns: repeat(1, minmax(0, 1fr));
	}

	.invoice-workspace__table-controls > * {
		width: 100%;
	}

	.erp-invoice-filter-actions,
	.erp-invoice-dt-controls {
		width: 100%;
	}

	.erp-invoice-control-slot--search {
		min-width: 100%;
	}
}

/* Tags input */
.tw-tags-wrapper {
	transition:
		border-color 0.15s ease,
		box-shadow 0.15s ease;
}
.tw-tags-wrapper .tag-item {
	animation: fadeInTag 140ms ease;
}
@keyframes fadeInTag {
	from {
		opacity: 0;
		transform: translateY(-4px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

/* Range slider */
input[type="range"] {
	-webkit-appearance: none;
	background: transparent;
}
input[type="range"]::-webkit-slider-thumb {
	-webkit-appearance: none;
	height: 20px;
	width: 20px;
	border-radius: 9999px;
	background: #2563eb;
	cursor: pointer;
	margin-top: -8px;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}
input[type="range"]::-webkit-slider-runnable-track {
	width: 100%;
	height: 4px;
	cursor: pointer;
	background: #e2e8f0;
	border-radius: 2px;
}
.dark input[type="range"]::-webkit-slider-runnable-track {
	background: #475569;
}
input[type="range"]:focus::-webkit-slider-thumb {
	box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.3);
}

/* Disabled form controls */
input:disabled,
select:disabled,
textarea:disabled,
button:disabled {
	cursor: not-allowed;
	opacity: 0.7;
	background-color: hsl(var(--muted));
	border-color: hsl(var(--border));
	color: hsl(var(--muted-foreground));
}
.dark input:disabled,
.dark select:disabled,
.dark textarea:disabled,
.dark button:disabled {
	background-color: hsl(var(--accent));
	border-color: hsl(var(--border));
	color: hsl(var(--muted-foreground));
}

input[type="range"]:disabled {
	cursor: not-allowed;
}
input[type="range"]:disabled::-webkit-slider-thumb {
	background: #94a3b8;
	box-shadow: none;
}
input[type="range"]:disabled::-webkit-slider-runnable-track {
	background: #e5e7eb;
}
.dark input[type="range"]:disabled::-webkit-slider-thumb {
	background: #64748b;
}
.dark input[type="range"]:disabled::-webkit-slider-runnable-track {
	background: #334155;
}

/* Toaster */
.toast-enter {
	animation: slideInRight 0.3s ease-out forwards;
}
.toast-timer {
	animation: timerBar 4s linear forwards;
}
@keyframes slideInRight {
	from {
		transform: translateX(100%);
		opacity: 0;
	}
	to {
		transform: translateX(0);
		opacity: 1;
	}
}
@keyframes timerBar {
	from {
		width: 100%;
	}
	to {
		width: 0%;
	}
}

/* Dropzone */
.dropzone-active {
	border-color: #2563eb !important;
	background: rgba(37, 99, 235, 0.04);
}
.upload-row {
	position: relative;
}

.tag-item {
	animation: fadeIn 0.2s ease-in-out forwards;
}
.tags {
	display: inline-flex;
	align-items: center;
	gap: 0.25rem;
	padding: 0.25rem 0.625rem;
	font-size: 0.75rem;
	font-weight: 600;
	line-height: 1;
	white-space: nowrap;
	border-radius: 9999px;
	border: 1px solid rgba(148, 163, 184, 0.35);
	background: rgba(148, 163, 184, 0.12);
	color: #334155;
	cursor: default;
	transition:
		background-color 0.2s ease,
		border-color 0.2s ease,
		color 0.2s ease;
}
.dark .tags {
	border-color: rgba(148, 163, 184, 0.3);
	background: rgba(100, 116, 139, 0.22);
	color: #e2e8f0;
}

/* Invoice module modern skin (scoped) */
.invoice-modern .panel,
.invoice-modern .panel-custom,
.invoice-modern .panel.panel-custom,
.invoice-modern .panel.widget {
	background: hsl(var(--card));
	border: 1px solid hsl(var(--border));
	border-radius: 1rem;
	box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
	overflow: visible;
}
.invoice-modern .panel-heading {
	padding: 1rem 1.25rem;
	border-bottom: 1px solid hsl(var(--border));
	background: transparent;
}
.invoice-modern .panel-title {
	font-size: 1rem;
	font-weight: 600;
	color: hsl(var(--foreground));
}
.invoice-modern .panel-body {
	padding: 1.25rem;
}
.invoice-modern .panel-footer {
	padding: 1rem 1.25rem;
	border-top: 1px solid hsl(var(--border));
	background: hsl(var(--card));
}
.invoice-modern > * + * {
	margin-top: 1.5rem;
}

.invoice-modern .form-control,
.invoice-modern select.form-control,
.invoice-modern textarea.form-control {
	border-radius: 0.5rem;
	border: 1px solid hsl(var(--border));
	background: hsl(var(--input));
	color: hsl(var(--foreground));
	padding: 0.5rem 0.75rem;
	font-size: 0.875rem;
}
.invoice-modern .form-control:focus {
	border-color: hsl(var(--ring));
	box-shadow: 0 0 0 3px hsla(var(--ring), 0.25);
	outline: none;
}

.invoice-modern .table {
	margin-bottom: 0;
}
.invoice-modern .table thead th {
	background: hsl(var(--muted));
	color: hsl(var(--muted-foreground));
	font-size: 0.75rem;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	border-bottom: 1px solid hsl(var(--border));
}
.invoice-modern .table th,
.invoice-modern .table td {
	padding: 0.75rem;
	vertical-align: middle;
	border-top: 1px solid hsl(var(--border));
}

.invoice-modern .nav-tabs {
	border-bottom: 1px solid hsl(var(--border));
}
.invoice-modern .nav-tabs > li > a {
	border: none;
	border-radius: 0.75rem 0.75rem 0 0;
	padding: 0.6rem 1rem;
	font-weight: 600;
	font-size: 0.8rem;
	color: hsl(var(--muted-foreground));
}
.invoice-modern .nav-tabs > li.active > a,
.invoice-modern .nav-tabs > li > a:hover {
	color: hsl(var(--foreground));
	background: hsl(var(--card));
	box-shadow:
		0 -1px 0 0 hsl(var(--card)),
		0 -2px 0 0 hsl(var(--border));
}

.invoice-modern .dropdown-menu {
	border-radius: 0.75rem;
	border: 1px solid hsl(var(--border));
	box-shadow: 0 12px 24px rgba(15, 23, 42, 0.12);
	padding: 0.5rem;
	min-width: 12rem;
}
.invoice-modern .dropdown-menu > li > a {
	border-radius: 0.5rem;
	padding: 0.45rem 0.75rem;
	font-size: 0.8rem;
	font-weight: 500;
	color: hsl(var(--foreground));
	white-space: nowrap;
}
.invoice-modern .dropdown-menu > li > a:hover {
	background: hsl(var(--muted));
}

.invoice-modern .label,
.invoice-modern .badge {
	border-radius: 9999px;
	padding: 0.25rem 0.6rem;
	font-size: 0.7rem;
	font-weight: 600;
	display: block;
}

.invoice-modern .progress {
	height: 0.45rem;
	border-radius: 9999px;
	background: hsl(var(--muted));
	box-shadow: none;
}
.invoice-modern .progress-bar {
	border-radius: 9999px;
}

/* Proposals list table spacing/layout */
.proposal-table-wrap {
	/* overflow-x: auto;
	overflow-y: visible !important; */
}
.proposals-table thead th {
	white-space: nowrap;
	padding: 12px 16px !important;
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.02em;
}
.proposals-table tbody td {
	padding: 12px 16px !important;
	vertical-align: middle;
}
.proposals-table tbody td:last-child {
	min-width: 170px;
}
.proposals-table.dataTable th {
	background: transparent !important;
	border-bottom: 1px solid hsl(var(--border));
}
.dark .proposals-table.dataTable th {
	border-bottom: 1px solid hsl(var(--border-foreground));
}
.proposals-table.dataTable td {
	border-bottom: 1px solid hsl(var(--border));
}
.dark .proposals-table.dataTable td {
	border-bottom: 1px solid hsl(var(--border-foreground));
}

/* Selectpicker icon alignment fix (without modifying core plugin behavior) */
[data-selectpicker-wrapper="true"] button span:last-child svg,
[data-selectpicker-wrapper="true"] ul li span.ml-2 svg {
	position: static !important;
	top: auto !important;
	right: auto !important;
}
[data-selectpicker-wrapper="true"] ul li span.ml-2 svg {
	color: #6366f1;
}
.dark [data-selectpicker-wrapper="true"] ul li span.ml-2 svg {
	color: #818cf8;
}

.invoice-batch-modal {
	color: #0f172a;
}

.invoice-batch-modal__form {
	display: flex;
	flex-direction: column;
	gap: 1rem;
}

.invoice-batch-modal__intro {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 1rem;
	padding-bottom: 0.25rem;
}

.invoice-batch-modal__title {
	margin: 0;
	font-size: 1.25rem;
	font-weight: 700;
	letter-spacing: -0.02em;
	color: #0f172a;
}

.invoice-batch-modal__subtitle {
	margin: 0.35rem 0 0;
	font-size: 0.82rem;
	color: #64748b;
}

.invoice-batch-modal__meta {
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem;
}

.invoice-batch-modal__meta-pill {
	display: inline-flex;
	align-items: center;
	gap: 0.55rem;
	padding: 0.55rem 0.8rem;
	border: 1px solid #dbe2ea;
	border-radius: 999px;
	background: #f8fafc;
	font-size: 0.76rem;
	color: #64748b;
}

.invoice-batch-modal__meta-pill strong {
	font-size: 0.84rem;
	font-weight: 700;
	color: #0f172a;
}

.invoice-batch-modal__toolbar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 0.9rem;
	padding: 0.85rem 1rem;
	border: 1px solid #e2e8f0;
	border-radius: 1rem;
	background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
}

.invoice-batch-modal__filter {
	flex: 1 1 20rem;
	max-width: 28rem;
}

.invoice-batch-modal__toolbar-actions,
.invoice-batch-modal__footer-actions {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.75rem;
}

.invoice-batch-modal__select,
.invoice-batch-modal__input {
	width: 100%;
	height: 2.55rem;
	padding: 0.55rem 0.8rem;
	border: 1px solid #cfd8e3;
	border-radius: 0.85rem;
	background: #ffffff;
	font-size: 0.84rem;
	color: #0f172a;
	box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.03);
	transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.invoice-batch-modal__select:focus,
.invoice-batch-modal__input:focus {
	outline: none;
	border-color: #8b5cf6;
	box-shadow: 0 0 0 4px rgba(139, 92, 246, 0.12);
}

.invoice-batch-modal__input--amount {
	text-align: right;
}

.invoice-batch-modal__ghost-btn,
.invoice-batch-modal__primary-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.45rem;
	height: 2.45rem;
	padding: 0 0.9rem;
	border-radius: 0.9rem;
	font-size: 0.82rem;
	font-weight: 600;
	transition: all 0.2s ease;
}

.invoice-batch-modal__ghost-btn {
	border: 1px solid #d7dee8;
	background: #ffffff;
	color: #334155;
}

.invoice-batch-modal__ghost-btn:hover {
	background: #f8fafc;
	border-color: #c4ced9;
}

.invoice-batch-modal__primary-btn {
	border: 1px solid #111827;
	background: #111827;
	color: #ffffff;
	box-shadow: 0 10px 20px rgba(15, 23, 42, 0.12);
}

.invoice-batch-modal__primary-btn:hover {
	background: #0f172a;
	border-color: #0f172a;
}

.invoice-batch-modal__table-wrap {
	border: 1px solid #e2e8f0;
	border-radius: 1.1rem;
	overflow: auto;
	background: #ffffff;
}

.invoice-batch-modal__table {
	width: 100%;
	min-width: 980px;
	border-collapse: separate;
	border-spacing: 0;
}

.invoice-batch-modal__table thead th {
	position: sticky;
	top: 0;
	z-index: 1;
	padding: 0.8rem 0.85rem;
	border-bottom: 1px solid #e2e8f0;
	background: #f8fafc;
	font-size: 0.72rem;
	font-weight: 700;
	letter-spacing: 0.05em;
	text-transform: uppercase;
	color: #475569;
	text-align: left;
}

.invoice-batch-modal__table tbody td {
	padding: 0.85rem;
	border-bottom: 1px solid #eef2f7;
	vertical-align: middle;
	background: #ffffff;
	font-size: 0.82rem;
}

.invoice-batch-modal__table tbody tr:nth-child(even) td {
	background: #fcfdff;
}

.invoice-batch-modal__table tbody tr:hover td {
	background: #f8fbff;
}

.invoice-batch-modal__table tbody tr:last-child td {
	border-bottom: 0;
}

.invoice-batch-modal__table tbody tr.hidden {
	display: none;
}

.invoice-batch-modal__invoice {
	display: flex;
	flex-direction: column;
	gap: 0.2rem;
}

.invoice-batch-modal__invoice-ref {
	font-size: 0.95rem;
	font-weight: 700;
	color: #2563eb;
	text-decoration: none;
	line-height: 1.25;
}

.invoice-batch-modal__invoice-ref:hover {
	text-decoration: underline;
}

.invoice-batch-modal__invoice-client {
	font-size: 0.76rem;
	color: #64748b;
}

.invoice-batch-modal__due {
	display: inline-flex;
	align-items: center;
	justify-content: flex-end;
	min-width: 100%;
	font-size: 0.9rem;
	font-weight: 700;
	color: #334155;
}

.invoice-batch-modal__footer {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	padding-top: 0.35rem;
}

.invoice-batch-modal__checkbox {
	display: inline-flex;
	align-items: center;
	gap: 0.7rem;
	font-size: 0.82rem;
	font-weight: 500;
	color: #475569;
}

.invoice-batch-modal__checkbox input {
	width: 1rem;
	height: 1rem;
	border-radius: 0.35rem;
}

.invoice-batch-modal__empty {
	padding: 2.5rem 1.5rem;
	border: 1px dashed #d8e1eb;
	border-radius: 1.1rem;
	background: #f8fafc;
	text-align: center;
}

.invoice-batch-modal__empty h4 {
	margin: 0;
	font-size: 1rem;
	font-weight: 700;
	color: #0f172a;
}

.invoice-batch-modal__empty p {
	margin: 0.5rem 0 0;
	font-size: 0.92rem;
	color: #64748b;
}

.dark .invoice-batch-modal {
	color: #e2e8f0;
}

.dark .invoice-batch-modal__title,
.dark .invoice-batch-modal__meta-pill strong,
.dark .invoice-batch-modal__due,
.dark .invoice-batch-modal__empty h4 {
	color: #f8fafc;
}

.dark .invoice-batch-modal__subtitle,
.dark .invoice-batch-modal__invoice-client,
.dark .invoice-batch-modal__checkbox,
.dark .invoice-batch-modal__empty p {
	color: #94a3b8;
}

.dark .invoice-batch-modal__meta-pill,
.dark .invoice-batch-modal__toolbar,
.dark .invoice-batch-modal__table-wrap,
.dark .invoice-batch-modal__empty {
	border-color: rgba(148, 163, 184, 0.18);
	background: #0f172a;
}

.dark .invoice-batch-modal__select,
.dark .invoice-batch-modal__input {
	border-color: rgba(148, 163, 184, 0.24);
	background: #111827;
	color: #f8fafc;
}

.dark .invoice-batch-modal__ghost-btn {
	border-color: rgba(148, 163, 184, 0.2);
	background: #111827;
	color: #e2e8f0;
}

.dark .invoice-batch-modal__ghost-btn:hover {
	background: #1e293b;
}

.dark .invoice-batch-modal__table thead th {
	border-bottom-color: rgba(148, 163, 184, 0.16);
	background: #111827;
	color: #cbd5e1;
}

.dark .invoice-batch-modal__table tbody td {
	border-bottom-color: rgba(148, 163, 184, 0.08);
	background: #0f172a;
}

.dark .invoice-batch-modal__table tbody tr:nth-child(even) td {
	background: #111827;
}

.dark .invoice-batch-modal__table tbody tr:hover td {
	background: #172033;
}

@media (max-width: 991px) {
	.invoice-batch-modal__intro,
	.invoice-batch-modal__toolbar,
	.invoice-batch-modal__footer {
		flex-direction: column;
		align-items: stretch;
	}

	.invoice-batch-modal__filter {
		max-width: none;
	}

	.invoice-batch-modal__meta,
	.invoice-batch-modal__toolbar-actions,
	.invoice-batch-modal__footer-actions {
		justify-content: flex-start;
	}
}

/* Invoice workspace compact refinement */
.invoice-workspace {
	gap: 0.75rem;
}

.invoice-workspace__masthead--minimal {
	padding-top: 0;
}

.invoice-workspace__masthead {
	padding: 0.8rem 0.95rem;
	gap: 0.65rem;
}

.invoice-workspace__masthead-copy {
	gap: 0.15rem;
}

.invoice-workspace__title {
	font-size: 1.68rem;
	letter-spacing: -0.025em;
}

.invoice-workspace__subnav-link {
	margin-top: 0.15rem;
	font-size: 0.79rem;
	font-weight: 600;
}

.invoice-workspace__period-select {
	min-height: 1.95rem;
	padding: 0.16rem 1.85rem 0.16rem 0.68rem;
	font-size: 0.7rem;
}

.invoice-workspace__actionbar {
	gap: 0.55rem;
}

.invoice-workspace__actionbar-main,
.invoice-workspace__actionbar-side {
	gap: 0.4rem;
}

.invoice-workspace__actionbar .erp-btn {
	min-height: 2.35rem;
	padding: 0.42rem 0.78rem;
	border-radius: 0.75rem;
	font-size: 0.76rem;
	box-shadow: none;
}

.invoice-workspace__icon-btn {
	width: 2.35rem;
	min-width: 2.35rem;
}

.invoice-workspace__surface {
	padding: 0.8rem;
}

.invoice-workspace__filters-shell {
	margin-top: 0.45rem;
}

.invoice-workspace__filters {
	gap: 0.7rem;
	padding: 0.75rem 0.8rem;
	border-radius: 0.8rem;
	background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
	box-shadow: 0 8px 20px -26px rgba(15, 23, 42, 0.14);
}

.erp-invoice-filter-grid {
	gap: 0.6rem;
}

.invoice-workspace__lookup-item {
	min-width: 9rem;
}

.invoice-workspace__lookup-item [data-dropdown-toggle] {
	min-height: 2.5rem;
	padding: 0.46rem 0.7rem;
	border-radius: 0.75rem;
	font-size: 0.79rem;
}

.invoice-workspace__filter-actions .erp-btn {
	min-height: 2.5rem;
	padding-inline: 0.82rem;
	border-radius: 0.75rem;
}

.invoice-workspace__filters label,
.invoice-workspace__filter-actions label {
	margin-bottom: 0.28rem;
	font-size: 0.65rem;
}

.invoice-workspace__filters .form-control,
.invoice-workspace__filters .select2-selection,
.invoice-workspace__filter-actions .form-control,
.invoice-workspace__filter-actions .select2-selection {
	min-height: 2.45rem;
	border-radius: 0.72rem;
	font-size: 0.8rem;
}

.invoice-workspace__table-bar {
	margin-top: 0.5rem;
	padding-bottom: 0.15rem;
}

.invoice-workspace__table-toolbar {
	gap: 0.65rem;
	padding: 0.6rem 0.72rem;
	border: 1px solid rgba(226, 232, 240, 0.92);
	border-radius: 0.82rem;
	background: #f8fafc;
}

.invoice-workspace__table-controls,
.erp-invoice-dt-controls,
.erp-invoice-control-slot {
	gap: 0.38rem;
}

.invoice-workspace__table-search {
	flex-basis: 17rem;
}

.invoice-workspace__table-controls .dataTables_length label,
.erp-invoice-toolbar .dataTables_length label {
	font-size: 0.71rem;
}

.invoice-workspace__table-controls .dataTables_length select,
.invoice-workspace__table-controls .dt-buttons .dt-button,
.invoice-workspace__table-controls .dt-search-input,
.erp-invoice-toolbar .dataTables_length select,
.erp-invoice-toolbar .dt-buttons .dt-button,
.erp-invoice-toolbar .dt-search-input {
	min-height: 2.24rem;
	border-radius: 0.68rem;
}

.invoice-workspace__table-controls .dataTables_length select,
.erp-invoice-toolbar .dataTables_length select {
	padding: 0.3rem 1.65rem 0.3rem 0.62rem;
	font-size: 0.76rem;
}

.invoice-workspace__table-controls .dt-buttons .dt-button,
.erp-invoice-toolbar .dt-buttons .dt-button {
	padding: 0.4rem 0.68rem;
	font-size: 0.72rem;
}

.invoice-workspace__table-controls .dt-search-input,
.erp-invoice-toolbar .dt-search-input {
	height: 2.24rem;
	min-width: 12rem;
	font-size: 0.79rem;
}

.invoice-workspace__table-wrap {
	margin-top: 0.38rem;
	border-radius: 0.82rem;
}

.invoice-cockpit,
.invoice-cockpit--simple {
	padding: 0.72rem 0.8rem;
}

.invoice-cockpit__summary-chips {
	gap: 0.38rem;
}

.invoice-cockpit__summary-chip {
	gap: 0.42rem;
	padding: 0.25rem 0.55rem;
	border-radius: 0.68rem;
	font-size: 0.73rem;
}

.invoice-cockpit__summary-chip strong {
	font-size: 0.77rem;
}

.invoice-status-grid {
	gap: 0.6rem;
	margin-top: 0.62rem;
}

.invoice-status-card {
	padding: 0.62rem 0.74rem;
	border-radius: 0.78rem;
}

.invoice-status-card__title {
	font-size: 0.8rem;
}

.invoice-status-card__percent {
	font-size: 0.7rem;
}

.invoice-status-card__metric {
	margin-top: 0.28rem;
	font-size: 0.8rem;
}

.erp-invoice-table.dataTable thead th {
	font-size: 0.67rem;
	letter-spacing: 0.09em;
	padding: 0.72rem 0.88rem !important;
	text-align: left;
	vertical-align: middle;
	line-height: 1.1rem;
}

.erp-invoice-table.dataTable tbody td {
	padding: 0.82rem 0.88rem !important;
	vertical-align: middle;
	line-height: 1.35;
}

.erp-invoice-number-link {
	font-size: 0.87rem;
}



.erp-invoice-meta-row {
	font-size: 0.71rem;
}

.erp-invoice-agent-cell {
	gap: 0.38rem;
}

.erp-invoice-agent-avatar {
	width: 1.78rem;
	height: 1.78rem;
}

.erp-invoice-actions {
	min-width: 7.2rem;
	gap: 0.18rem;
}

.erp-invoice-inline-btn,
.erp-invoice-action-trigger {
	width: 1.82rem;
	height: 1.82rem;
	border-radius: 0.58rem;
}

.dark .invoice-workspace__table-toolbar {
	border-color: rgba(148, 163, 184, 0.18);
	background: rgba(15, 23, 42, 0.44);
}

.invoice-detail-sharebar {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-end;
	justify-content: space-between;
	gap: 0.85rem;
}

.invoice-detail-sharebar__field {
	flex: 1 1 42rem;
	min-width: 18rem;
}

.invoice-detail-sharebar__label {
	display: block;
	margin-bottom: 0.35rem;
	font-size: 0.72rem;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: hsl(var(--muted-foreground));
}

.invoice-detail-sharebar__field-row {
	display: flex;
	align-items: center;
	gap: 0.55rem;
}

.invoice-detail-sharebar__input {
	width: 100%;
	min-height: 2.85rem;
	padding: 0.55rem 0.9rem;
	border: 1px solid hsl(var(--border));
	border-radius: 0.78rem;
	background: hsl(var(--input));
	font-size: 0.92rem;
	color: hsl(var(--foreground));
}

.sales-items-modern {
	box-shadow:
		0 1px 2px rgba(15, 23, 42, 0.03),
		0 10px 30px rgba(15, 23, 42, 0.04);
}

.sales-items-modern__header {
	background: #fff;
}

.sales-items-modern__headline,
.sales-items-modern__controlbar {
	gap: 1rem;
}

.sales-items-modern__modebar {
	display: flex;
	align-items: center;
	justify-content: flex-end;
}

.sales-items-modern__toggle {
	box-shadow: inset 0 0 0 1px rgba(226, 232, 240, 0.85);
	gap: 0.125rem;
}

.sales-items-modern__toggle label input:checked + span {
	background: #0f172a;
	color: #fff;
}

.sales-items-modern__table-wrap {
	padding: 0;
	background: #fff;
	overflow: visible;
}

.sales-items-modern__table {
	border-collapse: separate;
	border-spacing: 0;
	background: #fff;
	table-layout: fixed;
	width: 100%;
}

.sales-items-modern__table thead th {
	border-bottom: 1px solid rgba(226, 232, 240, 0.95);
	background: #f8fafc;
	font-size: 0.7rem;
	letter-spacing: 0.16em;
}

.sales-items-modern__table tbody td {
	border-top: 1px solid rgba(226, 232, 240, 0.78);
	vertical-align: top;
}

.sales-items-modern__table tbody tr {
	background: #fff;
	transition: background-color 0.16s ease;
}

.sales-items-modern__table tbody tr:hover {
	background: #fcfdff;
}

.sales-items-modern__summary {
	box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72);
	background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
	align-self: start;
	height: auto;
}

.sales-items-modern__footer-fields {
	align-items: start;
	align-content: start;
}

.sales-items-modern__footer-fields > label {
	box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
	padding: 0.95rem;
	align-self: start;
	height: auto;
	min-height: 0;
}

.sales-items-modern__discount-row {
	display: flex;
	align-items: center;
	gap: 0;
	width: 100%;
	overflow: hidden;
	border: 1px solid #cbd5e1;
	border-radius: 0.9rem;
	background: #fff;
	box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.sales-items-modern__discount-row > input {
	flex: 1 1 auto;
	min-width: 0;
}

.sales-items-modern__discount-row > select {
	flex: 0 0 124px;
	width: 124px;
}

.sales-items-modern__discount-select {
	border-right: 1px solid #e2e8f0;
}

.sales-items-modern__discount-input {
	flex: 1 1 auto;
}

.sales-items-modern__discount-addon {
	display: inline-flex;
	height: 2.25rem;
	min-width: 2.35rem;
	align-items: center;
	justify-content: center;
	border-left: 1px solid #e2e8f0;
	background: #f8fafc;
	font-size: 0.82rem;
	font-weight: 700;
	color: #64748b;
}

.sales-items-modern__taxlookup [data-lookup-chips] {
	min-height: 0;
	margin-bottom: 0.3rem;
}

.sales-items-modern__taxlookup [data-lookup-input] {
	min-height: 2rem;
	font-size: 0.82rem;
	border-radius: 0.85rem;
	padding-top: 0.45rem;
	padding-bottom: 0.45rem;
}

.sales-items-modern__taxlookup [data-lookup-results] {
	border-radius: 0.9rem;
}

.sales-items-modern__taxlookup [data-lookup-status] {
	margin-top: 0.3rem;
}

.sales-items-modern__search-results {
	scrollbar-width: thin;
}

.sales-items-modern textarea[data-field="item_desc"] {
	min-height: 3.75rem;
}

.sales-items-modern__footer-fields input[name="discount_percent"],
.sales-items-modern__footer-fields select[name="discount_type"],
.sales-items-modern__footer-fields input[data-adjustment] {
	font-size: 0.92rem;
}

.sales-items-modern__footer-fields input[name="discount_percent"] {
	min-width: 0;
}

.sales-items-modern__summary [data-total] {
	font-size: 2.35rem;
}

.sales-items-modern__summary .text-\[15px\] {
	font-size: 0.94rem;
}

@media (max-width: 767px) {
	.sales-items-modern__discount-row {
		flex-direction: row;
		align-items: center;
	}

	.sales-items-modern__discount-row > select {
		flex: 0 0 112px;
		width: 112px;
	}
}

.dark .sales-items-modern__header {
	background: rgba(2, 6, 23, 0.18);
}

.dark .sales-items-modern__modebar,
.dark .sales-items-modern__table-wrap {
	background: transparent;
}

.dark .sales-items-modern__toggle {
	box-shadow: inset 0 0 0 1px rgba(51, 65, 85, 0.72);
}

.dark .sales-items-modern__toggle label input:checked + span {
	background: rgba(248, 250, 252, 0.94);
	color: #0f172a;
}

.dark .sales-items-modern__table thead th {
	border-bottom-color: rgba(51, 65, 85, 0.9);
	background: rgba(15, 23, 42, 0.85);
}

.dark .sales-items-modern__table tbody td {
	border-top-color: rgba(30, 41, 59, 0.85);
}

.dark .sales-items-modern__table tbody tr {
	background: rgba(30, 41, 59, 0.96);
}

.dark .sales-items-modern__table tbody tr:hover {
	background: rgba(15, 23, 42, 0.92);
}

.dark .sales-items-modern__summary {
	background: linear-gradient(
		180deg,
		rgba(15, 23, 42, 0.82) 0%,
		rgba(2, 6, 23, 0.72) 100%
	);
}

.dark .sales-items-modern__discount-row {
	border-color: #334155;
	background: rgba(2, 6, 23, 0.7);
	box-shadow: none;
}

.dark .sales-items-modern__discount-select,
.dark .sales-items-modern__discount-addon {
	border-color: #334155;
}

.dark .sales-items-modern__discount-addon {
	background: rgba(15, 23, 42, 0.82);
	color: #cbd5e1;
}

.dark .sales-items-modern__taxlookup [data-lookup-chip] {
	border-color: rgba(51, 65, 85, 0.9);
	background: rgba(30, 41, 59, 0.92);
	color: #e2e8f0;
}

.invoice-detail-sharebar__copy,
.invoice-detail-sharebar__action,
.invoice-detail-sharebar__icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.5rem;
	min-height: 2.85rem;
	padding: 0.55rem 0.9rem;
	border: 1px solid hsl(var(--border));
	border-radius: 0.78rem;
	background: hsl(var(--card));
	font-size: 0.82rem;
	font-weight: 600;
	color: hsl(var(--foreground));
	white-space: nowrap;
	transition:
		background-color 0.18s ease,
		border-color 0.18s ease;
}

.invoice-detail-sharebar__copy:hover,
.invoice-detail-sharebar__action:hover,
.invoice-detail-sharebar__icon:hover {
	background: hsl(var(--muted));
	color: hsl(var(--foreground));
}

.invoice-detail-sharebar__actions {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: flex-end;
	gap: 0.55rem;
}

.invoice-detail-sharebar__icon {
	padding-inline: 0.75rem;
}

.dark .invoice-detail-sharebar__input {
	background: hsl(var(--input));
	color: hsl(var(--foreground));
}

@media (max-width: 991px) {
	.invoice-detail-sharebar {
		align-items: stretch;
	}

	.invoice-detail-sharebar__field-row {
		flex-wrap: wrap;
	}

	.invoice-detail-sharebar__copy {
		width: 100%;
	}

	.invoice-detail-sharebar__actions {
		justify-content: flex-start;
	}
}

/* Shared DataTables toolbar + bulk selection system */
.dataTables_wrapper,
.dataTables_wrapper .dt-toolbar,
.dataTables_wrapper .dt-left-toolbar,
.dataTables_wrapper .dt-right-toolbar {
	--dt-control-height: 2.35rem;
	--dt-control-radius: 0.75rem;
}

.dataTables_wrapper .dt-toolbar,
.dataTables_wrapper .dt-left-toolbar,
.dataTables_wrapper .dt-right-toolbar,
.dataTables_wrapper .dataTables_length,
.dataTables_wrapper .dataTables_filter,
.dataTables_wrapper .dt-buttons {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.5rem;
}

.dataTables_wrapper .dt-buttons {
	margin: 0;
}

.dataTables_wrapper .dt-buttons > *,
.dataTables_wrapper .dataTables_length > *,
.dataTables_wrapper .dataTables_filter > * {
	margin: 0 !important;
}

.dataTables_wrapper .dt-buttons .dt-button,
.dataTables_wrapper .dt-buttons .dt-button-collection,
.dataTables_wrapper .dt-buttons .buttons-collection,
.dataTables_wrapper .dt-buttons .dt-reload,
.dataTables_wrapper .dt-bulk-delete,
.dataTables_wrapper [id$="BulkDelete"],
.dataTables_wrapper [id*="BulkDelete"] {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.45rem;
	min-height: var(--dt-control-height);
	padding: 0.45rem 0.8rem;
	border: 1px solid hsl(var(--border));
	border-radius: var(--dt-control-radius);
	background: hsl(var(--card));
	color: hsl(var(--foreground));
	box-shadow: none;
	white-space: nowrap;
	font-size: 0.75rem;
	font-weight: 600;
	line-height: 1;
	transition:
		background-color 0.18s ease,
		border-color 0.18s ease,
		color 0.18s ease,
		transform 0.18s ease,
		box-shadow 0.18s ease;
}

.dataTables_wrapper .dt-buttons .dt-button:hover,
.dataTables_wrapper .dt-buttons .dt-button-collection:hover,
.dataTables_wrapper .dt-buttons .buttons-collection:hover,
.dataTables_wrapper .dt-buttons .dt-reload:hover,
.dataTables_wrapper .dt-bulk-delete:hover,
.dataTables_wrapper [id$="BulkDelete"]:hover,
.dataTables_wrapper [id*="BulkDelete"]:hover {
	background: hsl(var(--muted));
	border-color: hsl(var(--border));
	color: hsl(var(--foreground));
	transform: translateY(-1px);
	box-shadow: 0 6px 18px rgba(15, 23, 42, 0.08);
}

.dataTables_wrapper .dt-buttons .dt-button:focus-visible,
.dataTables_wrapper .dt-buttons .dt-button-collection:focus-visible,
.dataTables_wrapper .dt-buttons .buttons-collection:focus-visible,
.dataTables_wrapper .dt-buttons .dt-reload:focus-visible,
.dataTables_wrapper .dt-bulk-delete:focus-visible,
.dataTables_wrapper [id$="BulkDelete"]:focus-visible,
.dataTables_wrapper [id*="BulkDelete"]:focus-visible {
	outline: 2px solid hsl(var(--ring));
	outline-offset: 2px;
}

.dataTables_wrapper .dt-buttons .dt-button i,
.dataTables_wrapper .dt-buttons .dt-button svg,
.dataTables_wrapper .dt-buttons .dt-reload i,
.dataTables_wrapper .dt-buttons .dt-reload svg,
.dataTables_wrapper .dt-bulk-delete i,
.dataTables_wrapper .dt-bulk-delete svg,
.dataTables_wrapper [id$="BulkDelete"] i,
.dataTables_wrapper [id$="BulkDelete"] svg,
.dataTables_wrapper [id*="BulkDelete"] i,
.dataTables_wrapper [id*="BulkDelete"] svg {
	width: 1rem;
	height: 1rem;
	flex-shrink: 0;
}

.dataTables_wrapper .dt-buttons .dt-button-collection {
	padding-right: 0.85rem;
}

.dataTables_wrapper .dt-buttons .dt-button-collection .dt-down-arrow,
.dataTables_wrapper .dt-buttons .dt-button-collection .dt-button-down-arrow {
	display: none;
}

.dataTables_wrapper .dt-bulk-delete,
.dataTables_wrapper [id$="BulkDelete"],
.dataTables_wrapper [id*="BulkDelete"] {
	display: none !important;
}

.dataTables_wrapper .dt-bulk-delete.is-visible,
.dataTables_wrapper [id$="BulkDelete"].is-visible,
.dataTables_wrapper [id*="BulkDelete"].is-visible {
	display: inline-flex !important;
}

.dataTables_wrapper .dataTables_length label,
.dataTables_wrapper .dataTables_filter label {
	display: inline-flex;
	align-items: center;
	gap: 0.45rem;
	margin: 0;
}

.dataTables_wrapper .dataTables_length select,
.dataTables_wrapper .dataTables_filter input {
	min-height: var(--dt-control-height);
	padding: 0.45rem 0.75rem;
	border: 1px solid hsl(var(--border));
	border-radius: var(--dt-control-radius);
	background: hsl(var(--card));
	color: hsl(var(--foreground));
	box-shadow: none;
}

.dataTables_wrapper .dataTables_length select {
	padding-right: 2rem;
}

.dataTables_wrapper .dataTables_filter input {
	width: min(100%, 18rem);
}

.dataTables_wrapper .dataTables_info {
	padding-top: 0.55rem;
}

.dataTables_wrapper .dataTables_paginate {
	padding-top: 0.55rem;
}

.dark .dataTables_wrapper .dt-buttons .dt-button,
.dark .dataTables_wrapper .dt-buttons .dt-button-collection,
.dark .dataTables_wrapper .dt-buttons .buttons-collection,
.dark .dataTables_wrapper .dt-buttons .dt-reload,
.dark .dataTables_wrapper .dt-bulk-delete,
.dark .dataTables_wrapper [id$="BulkDelete"],
.dark .dataTables_wrapper [id*="BulkDelete"],
.dark .dataTables_wrapper .dataTables_length select,
.dark .dataTables_wrapper .dataTables_filter input {
	background: hsl(var(--card));
	color: hsl(var(--foreground));
	border-color: hsl(var(--border));
}

/* Finance report surfaces */
.sales-report-page > * + * {
	margin-top: 1.5rem;
}

.sales-report-content,
.sales-report-card,
.sales-report-module {
	border: 1px solid hsl(var(--border));
	background: hsl(var(--card));
	border-radius: 1rem;
	box-shadow: 0 10px 30px rgba(15, 23, 42, 0.06);
}

.sales-report-cardgrid {
	display: flex;
	gap: 0.75rem;
	flex-wrap: wrap;
}

.sales-report-card {
	flex: 1 1 220px;
	padding: 1rem;
}

.sales-report-content {
	padding: 1.5rem;
}

.sales-report-module {
	padding: 1.25rem;
	flex: 1 1 320px;
}

.sales-report-chart {
	min-height: 320px;
}

.report-print-brand {
	width: 100%;
	border-bottom: 2px solid #000;
	padding-bottom: 0.5rem;
	margin-bottom: 1rem;
}

.report-print-brand-row {
	display: flex;
	align-items: center;
	gap: 0.75rem;
}

.report-print-brand-logo {
	width: 50px;
	height: 50px;
	margin-bottom: 0.25rem;
	object-fit: contain;
	border-radius: 9999px;
}

.report-print-brand-name {
	font-size: 0.875rem;
	font-weight: 300;
	color: #000;
}

.report-meter {
	display: block;
	width: 100%;
	height: 0.5rem;
	overflow: hidden;
	border: 0;
	border-radius: 9999px;
	background: hsl(var(--muted));
}

.report-meter::-webkit-progress-bar {
	background: hsl(var(--muted));
	border-radius: 9999px;
}

.report-meter::-webkit-progress-value {
	border-radius: 9999px;
}

.report-meter::-moz-progress-bar {
	border-radius: 9999px;
}

.report-meter-income::-webkit-progress-value,
.report-meter-income::-moz-progress-bar {
	background: #10b981;
}

.report-meter-expense::-webkit-progress-value,
.report-meter-expense::-moz-progress-bar {
	background: #f43f5e;
}

.report-meter-primary::-webkit-progress-value,
.report-meter-primary::-moz-progress-bar {
	background: hsl(var(--primary));
}

.report-meter-emerald::-webkit-progress-value,
.report-meter-emerald::-moz-progress-bar {
	background: #10b981;
}

.report-meter-rose::-webkit-progress-value,
.report-meter-rose::-moz-progress-bar {
	background: #f43f5e;
}

.report-meter-sky::-webkit-progress-value,
.report-meter-sky::-moz-progress-bar {
	background: #0ea5e9;
}

.report-meter-violet::-webkit-progress-value,
.report-meter-violet::-moz-progress-bar {
	background: #8b5cf6;
}

.report-meter-amber::-webkit-progress-value,
.report-meter-amber::-moz-progress-bar {
	background: #f59e0b;
}

.report-meter-blue::-webkit-progress-value,
.report-meter-blue::-moz-progress-bar {
	background: #3b82f6;
}

.report-meter-cyan::-webkit-progress-value,
.report-meter-cyan::-moz-progress-bar {
	background: #06b6d4;
}

.report-meter-slate::-webkit-progress-value,
.report-meter-slate::-moz-progress-bar {
	background: #64748b;
}

.report-meter-neutral::-webkit-progress-value,
.report-meter-neutral::-moz-progress-bar {
	background: #737373;
}

@media (max-width: 768px) {
	.sales-report-content {
		padding: 1rem;
	}

	.sales-report-chart {
		min-height: 240px;
	}
}
