.finalise-header {
	color: white;
	padding: 8px 10px 8px;
	text-align: center;
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	z-index: 1050;
	background-color: #343a40;
	box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.sidebar-item-finalise {
	padding: 1rem;
	color: white;
	cursor: pointer;
	border-bottom: 1px solid #1c3273;
}

.sidebar-item-finalise:hover {
	background-color: #1c3273;
}

.section-header {
	background-color: #e5e7eb;
	color: #1f2937;
	/* border-bottom: 1px solid #d1d5db; */
	display: flex;
	align-items: center;
	justify-content: space-between;
}

.button-group {
	display: flex;
	gap: 1rem;
	padding: 5px;
	align-items: center;
	flex-basis: 100%;
}

.button-group button {
	flex: 1;
	/* make every button grow equally */
	display: flex;
	flex-direction: column;

	align-items: center;
	padding: 0.5rem;
	/* top/bottom & left/right padding */
	border: 1px solid #d1d5db;
	border-radius: 0.25rem;
	background-color: white;
	color: #374151;
	font-size: 14px;
	text-align: center;
	width: 100%;
	/* center text if longer */
}

.button-group button:hover {
	background-color: #ffc107;
}

.summary-input {
	width: 100px;
	padding: 0.25rem;
	border: 1px solid #d1d5db;
	border-radius: 0.25rem;
	text-align: right;
}


/* Sidebar container background and text */
.sidebar-finalise {
	color: #fff;
	min-width: 270px;
	background-color: #343a40;
	padding: 10px;
	position: fixed;
	right: 0;
	top: 65px;
	height: calc(100vh - 65px);
	overflow-y: auto;

	/* NEW */
	display: flex;
	flex-direction: column;
	justify-content: flex-end;
	/* everything moves to bottom */
}


/* Style for all the input fields in the sidebar */
.sidebar-finalise input[type="text"] {
	background-color: #243c5a;
	border: 1px solid #2563eb;
	border-radius: 0.375rem;
	padding-left: 0.5rem;
	padding-right: 0.5rem;
	padding-top: 0.25rem;
	padding-bottom: 0.25rem;
	text-align: right;
	width: 7rem;
	color: #fff;
	font-size: 1rem;
}

.invoiceAmounts {
	background-color: #243c5a;
	border: 1px solid #2563eb;
	border-radius: 0.375rem;
	padding-left: 0.5rem;
	padding-right: 0.5rem;
	padding-top: 0.25rem;
	padding-bottom: 0.25rem;
	text-align: right;
	width: 7rem;
	color: #fff;
	font-size: 12px;
}

.invoiceAmounts-grayed {
	background-color: #1a3377;
	border: 1px solid silver;
	border-radius: 0.375rem;
	padding-left: 0.5rem;
	padding-right: 0.5rem;
	padding-top: 0.25rem;
	padding-bottom: 0.25rem;
	text-align: right;
	width: 7rem;
	color: #fff;
	font-size: 12px;
}


/* Bold input for total */
.sidebar-finalise input[type="text"].invoice-total {
	background-color: white !important;
	border-color: #ffc107;
	color: #ffc107 !important;
	font-weight: bold;
}


/* Highlight red for percentages */
.highlight-red {
	font-weight: bold;
	color: white;
	padding: 0.25rem 0.5rem;
	border-radius: 0.25rem;
	text-shadow: black 2px 2px 2px;
	background-color: #1a3377;
	border: 1px solid silver;
}

.highlight-invoicenr {
	background-color: transparent;
	padding-left: 0.5rem;
	padding-right: 0.5rem;
	padding-top: 0.25rem;
	padding-bottom: 0.25rem;
	text-align: center;
	width: 100%;
	color: #fff;
	font-size: 18px;
	/* font-weight: bold; */
	text-shadow: 1px 1px 2px black;
}



/* Section heading style (optional) */
.sidebar-finalise .section-title {
	font-weight: bold;
	font-size: 1.25rem;
	margin-bottom: 0.5rem;
}

.selectable-row-parts:hover {
	background-color: #f5f5f5;
	cursor: default !important;
}

.selectable-row-parts.selected {
	background-color: #e0e0e0;
	font-weight: bold !important;
}

.selectable-row-stock:hover td {
	background-color: #f5f5f5;
	cursor: default !important;
}

.selectable-row-stock.selected td {
	background-color: #e0e0e0 !important;
	font-weight: bold !important;
}

.selectable-row-work:hover {
	background-color: #f5f5f5;
	cursor: default !important;
}

.selectable-row-work.selected {
	background-color: #e0e0e0;
	font-weight: bold !important;
}

/* Labour modal row highlight (add this for addLabourModal) */
.selectable-row-labour:hover {
	background-color: #e8f0fe;
	cursor: default !important;
}

.selectable-row-labour.selected {
	background-color: #d1e7fd;
	font-weight: bold !important;
}

.order-row {
	color: maroon;
	background-color: #eee8aa;
}

.finaliseTotals {
	background-color: white;
	border: 1px solid silver;
	margin-left: 5px;
	padding-left: 0.5rem;
	padding-right: 0.5rem;
	padding-top: 0.25rem;
	padding-bottom: 0.25rem;
	text-align: right;
	width: 6rem;
	color: gray;
	font-size: 12px;
	font-weight: bold;
}

/* Ensure proper scrolling behavior */
.main-content {
	height: calc(100vh - 120px);
	overflow-y: auto;
	margin-right: 270px;
}

/* Hide outer scrollbars only on finalise page */
body.finalise-page {
	overflow: hidden !important;
	height: 100vh;
}

/* Prevent scrollbar flash during page reload */
body.finalise-page html {
	overflow: hidden !important;
}

html:has(body.finalise-page) {
	overflow: hidden !important;
}

/* Fix for the d-flex container - no scrolling on outer container */
.d-flex.min-vh-100 {
	height: calc(100vh - 120px);
	overflow: hidden;
}