.main {
	transition: margin-left 0.3s ease-in-out;
}

/* Mobile: no margin for sidebar (overlay offcanvas) */
@media (max-width: 991.98px) {
	.main {
		margin-left: 0 !important;
	}
}

/* Enhanced Header Styles */
#appHeader {
	background: linear-gradient(135deg, #1F2A44 0%, #2d3f63 100%) !important;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
	backdrop-filter: blur(10px);
	position: relative;
	z-index: 1030;
	overflow: visible !important;
}

#appHeader::after {
	content: '';
	position: absolute;
	bottom: 0;
	left: 0;
	right: 0;
	height: 1px;
	background: linear-gradient(90deg, transparent, rgba(14, 165, 233, 0.3) 50%, transparent);
}

#appHeader .btn-link {
	transition: all 0.3s ease;
	border-radius: 8px;
}

#appHeader .btn-link:hover {
	background-color: rgba(14, 165, 233, 0.15);
	transform: translateY(-1px);
}

#appHeader .notification-btn {
	position: relative;
}

#appHeader .notification-btn .badge {
	position: absolute;
	top: 0;
	right: 0;
	transform: translate(25%, -25%);
	box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
	animation: pulse 2s infinite;
	background-color: #10B981 !important;
}

@keyframes pulse {

	0%,
	100% {
		transform: translate(25%, -25%) scale(1);
	}

	50% {
		transform: translate(25%, -25%) scale(1.1);
	}
}

#appHeader .dropdown-toggle {
	background-color: rgba(14, 165, 233, 0.15);
	color: white;
	border: 1px solid rgba(14, 165, 233, 0.3);
	border-radius: 8px;
	padding: 0.4rem 0.85rem;
	transition: all 0.3s ease;
	font-weight: 500;
	font-size: 0.9rem;
}

#appHeader .dropdown-toggle:hover {
	background-color: #0EA5E9;
	border-color: #0EA5E9;
	transform: translateY(-1px);
	box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

#appHeader .brand-text {
	font-weight: 700;
	letter-spacing: 0.5px;
	text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

#appHeader #chatToggle {
	/* Inherits header-icon-btn styles */
}

/* Header Icon Buttons - uniform circular style */
.header-icon-btn {
	width: 36px;
	height: 36px;
	background: rgba(255, 255, 255, 0.1);
	color: white !important;
	border: none;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 0;
	transition: all 0.2s ease;
}

.header-icon-btn:hover {
	background: rgba(255, 255, 255, 0.2);
	transform: scale(1.05);
}

.header-icon-btn:focus {
	box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.3);
	outline: none;
}

/* Body Background */
body {
	background-color: #F4F6F8;
}

/* Page Header Styling */
.page-header {
	background-color: white !important;
	border-bottom: 1px solid #e5e7eb !important;
}

.page-header .btn-primary {
	background: linear-gradient(135deg, #0EA5E9 0%, #0284c7 100%);
	border: none;
	box-shadow: 0 2px 4px rgba(14, 165, 233, 0.2);
}

.page-header .btn-primary:hover {
	background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
	box-shadow: 0 4px 8px rgba(14, 165, 233, 0.3);
}

/* Tablet/Mobile Page Header Styles */
@media (max-width: 991px) {
	.page-header>div:first-child p.text-muted {
		display: none;
	}

	.page-header #toggleStats {
		display: none !important;
	}
}

@media (max-width: 768px) {
	.page-header {
		padding: 0.5rem 0.75rem !important;
		min-height: auto !important;
	}

	.page-header>div:first-child {
		display: none !important;
	}

	.page-header>div:last-child {
		width: 100%;
		justify-content: space-between !important;
		gap: 0.5rem !important;
	}

	#datatable-length-container {
		display: none !important;
	}

	#datatable-search-container {
		flex: 1 1 auto;
		max-width: calc(100% - 50px);
	}

	#datatable-search-container .dataTables_filter {
		margin: 0;
	}

	#datatable-search-container .dataTables_filter label {
		margin: 0;
		width: 100%;
	}

	#datatable-search-container .dataTables_filter input {
		width: 100% !important;
		padding: 0.375rem 0.5rem;
		font-size: 0.875rem;
	}

	.page-header .btn-primary {
		padding: 0.375rem 0.5rem;
		font-size: 0.875rem;
		flex-shrink: 0;
	}
}

/* Dropdown Menu Fix */
.dropdown-menu {
	z-index: 1040;
}

#appHeader .dropdown {
	position: relative;
}

/* Enhanced Quick Actions Dropdown */
#appHeader .dropdown-menu {
	background: white;
	border: none;
	border-radius: 12px;
	box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15), 0 0 0 1px rgba(0, 0, 0, 0.05);
	padding: 0.5rem 0;
	min-width: 260px;
	margin-top: 0.75rem !important;
	overflow: hidden;
}

#appHeader .dropdown-header {
	color: #1F2A44;
	font-weight: 700;
	font-size: 0.75rem;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	padding: 0.75rem 1rem 0.5rem;
	margin-top: 0.25rem;
}

#appHeader .dropdown-item {
	padding: 0.65rem 1rem;
	color: #212529;
	transition: all 0.2s ease;
	border-radius: 0;
	margin: 0;
	display: flex;
	align-items: center;
	font-weight: 500;
}

#appHeader .dropdown-item:hover {
	background: linear-gradient(135deg, #0EA5E9 0%, #0284c7 100%);
	color: white;
}

#appHeader .dropdown-item i {
	width: 20px;
	text-align: center;
	opacity: 0.8;
}

#appHeader .dropdown-item:hover i {
	opacity: 1;
}

#appHeader .dropdown-divider {
	margin: 0.5rem 1rem;
	border-top-color: #e5e7eb;
}

#appHeader .qa-add-shipment {
	background: linear-gradient(135deg, rgba(14, 165, 233, 0.1) 0%, rgba(14, 165, 233, 0.05) 100%);
	border-left: 3px solid #0EA5E9;
	font-weight: 600;
}

#appHeader .qa-add-shipment:hover {
	background: linear-gradient(135deg, #0EA5E9 0%, #0284c7 100%);
	border-left-color: #0EA5E9;
	transform: translateX(0) !important;
}

/* Sticky Table Header */
.main .table-responsive {
	overflow: visible !important;
	height: 100%;
	position: relative;
	width: 100%;
}

.main .table thead {
	position: sticky;
	top: 0;
	z-index: 10;
}

.main .table thead th {
	background: linear-gradient(180deg, #f8f9fa 0%, #ffffff 100%);
	border-bottom: 2px solid #0EA5E9;
	box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
	position: relative;
	font-weight: 600;
	color: #1F2A44;
	text-transform: uppercase;
	font-size: 0.75rem;
	letter-spacing: 0.5px;
	padding: 0.875rem 0.75rem;
}

.main .table {
	margin-top: 0 !important;
	margin-bottom: 0 !important;
	border-collapse: separate;
	border-spacing: 0;
}

.main .table tbody tr {
	transition: all 0.2s ease;
	border-bottom: 1px solid #f0f0f0;
	position: relative;
}

.main .table tbody tr:hover {
	background-color: rgba(14, 165, 233, 0.08);
	box-shadow: inset 3px 0 0 #0EA5E9;
}

.main .table tbody tr:hover td {
	color: #1F2A44;
}

.main .table tbody td {
	padding: 0.875rem 0.75rem;
	vertical-align: middle;
	font-size: 0.875rem;
	color: #212529;
}

.main .table tbody tr:last-child {
	border-bottom: none;
}

/* Badge styling */
.main .table .badge {
	padding: 0.35rem 0.65rem;
	font-weight: 600;
	font-size: 0.75rem;
	border-radius: 6px;
}

/* Modal Table Styling - match main app tables */
.modal .table thead th {
	background: linear-gradient(180deg, #f8f9fa 0%, #ffffff 100%);
	border-bottom: 2px solid #0EA5E9;
	font-weight: 600;
	color: #1F2A44;
	text-transform: uppercase;
	font-size: 0.75rem;
	letter-spacing: 0.5px;
	padding: 0.75rem 0.5rem;
}

.modal .table tbody tr {
	transition: all 0.2s ease;
	border-bottom: 1px solid #f0f0f0;
}

.modal .table tbody tr:hover {
	background-color: rgba(14, 165, 233, 0.08);
	box-shadow: inset 3px 0 0 #0EA5E9;
}

.modal .table tbody tr.selected {
	background-color: rgba(14, 165, 233, 0.15) !important;
	box-shadow: inset 3px 0 0 #0EA5E9;
}

.modal .table tbody td {
	padding: 0.625rem 0.5rem;
	vertical-align: middle;
	font-size: 0.875rem;
}

.modal .table tbody tr {
	cursor: pointer;
}

.modal .table input[type='checkbox'] {
	width: 1.15rem;
	height: 1.15rem;
	cursor: pointer;
	appearance: none;
	-webkit-appearance: none;
	border: 2px solid #dee2e6;
	border-radius: 3px;
	background-color: #fff;
	transition: all 0.15s ease-in-out;
	position: relative;
}

.modal .table input[type='checkbox']:checked {
	background-color: #0EA5E9;
	border-color: #0EA5E9;
}

.modal .table input[type='checkbox']:checked::after {
	content: '';
	position: absolute;
	left: 5px;
	top: 2px;
	width: 5px;
	height: 9px;
	border: solid white;
	border-width: 0 2px 2px 0;
	transform: rotate(45deg);
}

.modal .table input[type='checkbox']:hover {
	border-color: #0EA5E9;
}

.modal .table thead input[type='checkbox'] {
	width: 1.15rem;
	height: 1.15rem;
	cursor: pointer;
}

.modal .table .badge {
	padding: 0.35rem 0.65rem;
	font-weight: 600;
	font-size: 0.75rem;
	border-radius: 6px;
}

/* DataTables Custom Styling */

#billsTable tbody tr,
#invoicesTable tbody tr {
	cursor: pointer;
}

#datatable-length-container .dataTables_length,
#datatable-search-container .dataTables_filter {
	margin: 0;
}

#datatable-search-container .dataTables_filter input {
	border-radius: 6px;
	border: 1px solid #dee2e6;
	padding: 0.375rem 0.75rem;
	font-size: 0.875rem;
}

#datatable-length-container .dataTables_length select {
	border-radius: 6px;
	border: 1px solid #dee2e6;
	padding: 0.375rem 0.5rem 0.375rem 0.75rem;
	font-size: 0.875rem;
	background-color: white;
	margin: 0 0.25rem;
	min-width: 65px;
}

#datatable-length-container .dataTables_length label {
	margin-bottom: 0;
	font-weight: 500;
	font-size: 0.875rem;
	display: flex;
	align-items: center;
	gap: 0;
	white-space: nowrap;
}

#datatable-search-container .dataTables_filter label {
	margin-bottom: 0;
	font-weight: 500;
	font-size: 0.875rem;
	display: flex;
	align-items: center;
	gap: 0.5rem;
}

.table-footer {
	box-shadow: 0 -2px 4px rgba(0, 0, 0, 0.05);
}

#datatable-info-container .dataTables_info {
	margin: 0;
	font-size: 0.875rem;
	color: #6c757d;
}

#datatable-pagination-container .dataTables_paginate {
	margin: 0;
}

.dataTables_paginate .pagination {
	margin: 0;
	flex-wrap: wrap;
}

/* Mobile pagination styling */
@media (max-width: 576px) {
	.table-footer {
		flex-direction: column !important;
		gap: 0.75rem;
		align-items: flex-start !important;
	}

	#datatable-info-container {
		width: 100%;
		text-align: center;
	}

	#datatable-pagination-container {
		width: 100%;
		display: flex;
		justify-content: center;
	}

	.dataTables_paginate .pagination {
		justify-content: center;
	}

	.dataTables_paginate .pagination .page-link {
		padding: 0.375rem 0.625rem;
		font-size: 0.875rem;
		min-width: 36px;
		text-align: center;
	}
}

/* Footer Styles */
.footer {
	box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.1);
	font-size: 0.875rem;
}

.footer .container-fluid {
	max-width: 1400px;
	margin: 0 auto;
}

.footer a {
	transition: all 0.3s ease;
	text-decoration: none;
}

.footer a:hover {
	transform: translateY(-1px);
}

.footer .badge {
	animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {

	0%,
	100% {
		opacity: 1;
	}

	50% {
		opacity: 0.8;
	}
}

/* Mobile Footer Styles */
@media (max-width: 768px) {
	.footer {
		font-size: 0.7rem !important;
	}

	.footer .container-fluid {
		padding: 0.75rem 1rem !important;
	}

	.footer .row {
		text-align: center;
		gap: 0;
	}

	.footer .col-md-6 {
		width: 100%;
		padding: 0;
	}

	.footer .col-md-6:first-child .d-flex {
		justify-content: center !important;
		flex-wrap: wrap;
		gap: 0.25rem;
	}

	.footer .col-md-6:last-child {
		display: none !important;
	}

	.footer .fa-truck {
		font-size: 0.9em !important;
		margin-right: 0.25rem !important;
	}

	.footer .fw-bold {
		font-size: 0.85rem !important;
		margin-right: 0.5rem !important;
	}

	.footer small {
		font-size: 0.65rem !important;
		display: block;
		width: 100%;
		margin-top: 0.25rem;
	}

	.footer .mt-3 {
		margin-top: 0 !important;
	}
}

/* Sidebar Styles */
#sidebarOffcanvas {
	background: linear-gradient(180deg, #1F2A44 0%, #16202F 100%);
	border-right: 3px solid #0EA5E9;
}

/* Full screen sidebar on mobile */
@media (max-width: 768px) {
	#sidebarOffcanvas {
		width: 100% !important;
		max-width: 100% !important;
		margin-top: 60px !important;
	}
}

#sidebarOffcanvas .offcanvas-header {
	background: rgba(14, 165, 233, 0.1);
	border-bottom-color: rgba(14, 165, 233, 0.3) !important;
}

.sidebar-user {
	width: 100%;
}

.sidebar-user .bg-primary {
	background: linear-gradient(135deg, #0EA5E9 0%, #0284c7 100%) !important;
}

.sidebar-nav {
	display: flex;
	flex-direction: column;
	gap: 0.25rem;
	padding-left: 0.75rem;
	padding-right: 0.75rem;
}

.sidebar-nav .nav-link {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	padding: 0.75rem 1rem;
	color: rgba(255, 255, 255, 0.8);
	text-decoration: none;
	border-radius: 8px;
	transition: all 0.3s ease;
	font-size: 0.9375rem;
	font-weight: 500;
	position: relative;
	overflow: hidden;
	border-left: 3px solid transparent;
}

.sidebar-nav .nav-link::before {
	content: '';
	position: absolute;
	left: 0;
	top: 0;
	height: 100%;
	width: 3px;
	background: #0EA5E9;
	transform: scaleY(0);
	transition: transform 0.3s ease;
}

.sidebar-nav .nav-link i {
	font-size: 1.125rem;
	width: 20px;
	text-align: center;
	color: #0EA5E9;
	transition: all 0.3s ease;
	margin-right: 0.75rem;
}

.sidebar-nav .nav-link:hover {
	background: rgba(14, 165, 233, 0.15);
	color: #ffffff;
	transform: translateX(4px);
}

.sidebar-nav .nav-link:hover::before {
	transform: scaleY(1);
}

.sidebar-nav .nav-link:hover i {
	transform: scale(1.1);
	color: #0EA5E9;
}

.sidebar-nav .nav-link.active {
	background: linear-gradient(135deg, rgba(14, 165, 233, 0.25) 0%, rgba(14, 165, 233, 0.15) 100%);
	color: #ffffff;
	border-left: 3px solid #0EA5E9;
}

.sidebar-nav .nav-link.active i {
	color: #0EA5E9;
}

.sidebar-nav .nav-divider {
	margin: 0.5rem 0;
	border-top: 1px solid rgba(14, 165, 233, 0.2) !important;
}

/* Sidebar submenu styling */
.sidebar-nav .nav-submenu {
	background: rgba(0, 0, 0, 0.15);
	border-left: 2px solid rgba(14, 165, 233, 0.3);
	margin-left: 1rem;
}

.sidebar-nav .nav-link-sub {
	padding: 0.5rem 1rem 0.5rem 1.5rem !important;
	font-size: 0.9rem;
}

.sidebar-nav .nav-link-sub i {
	font-size: 0.85rem;
}

/* Collapse chevron rotation */
.sidebar-nav .nav-link-collapse {
	display: flex;
	align-items: center;
}

.sidebar-nav .collapse-icon {
	transition: transform 0.2s ease;
	margin-right: 0 !important;
}

.sidebar-nav .nav-link[aria-expanded="true"] .collapse-icon {
	transform: rotate(180deg);
}

/* ===== Desktop Static Sidebar ===== */
.sidebar-desktop {
	position: fixed;
	top: 60px;
	left: 0;
	width: 280px;
	height: calc(100vh - 60px);
	background: linear-gradient(180deg, #1F2A44 0%, #16202F 100%);
	border-right: 3px solid #0EA5E9;
	overflow-y: auto;
	overflow-x: hidden;
	z-index: 1020;
	transition: width 0.3s ease;
	scrollbar-width: thin;
	scrollbar-color: #0EA5E9 rgba(14, 165, 233, 0.1);
}

.sidebar-desktop::-webkit-scrollbar {
	width: 6px;
}

.sidebar-desktop::-webkit-scrollbar-track {
	background: rgba(14, 165, 233, 0.1);
}

.sidebar-desktop::-webkit-scrollbar-thumb {
	background: #0EA5E9;
	border-radius: 3px;
}

/* Collapsed sidebar state */
.sidebar-desktop.collapsed {
	width: 70px;
}

.sidebar-desktop.collapsed .nav-text,
.sidebar-desktop.collapsed .collapse-icon {
	display: none !important;
}

.sidebar-desktop.collapsed .nav-link {
	justify-content: center;
	padding: 0.75rem 0;
	width: 100%;
	position: relative;
	height: 44px;
}

.sidebar-desktop.collapsed .nav-link i:first-child {
	margin-right: 0 !important;
	position: absolute;
	left: 50%;
	top: 50%;
	transform: translate(-50%, -50%);
}

.sidebar-desktop.collapsed .sidebar-nav {
	padding-left: 0;
	padding-right: 0;
	align-items: center;
}

/* Hide submenus when collapsed (but not when hover-expanded) */
.sidebar-desktop.collapsed:not(.hover-expand) .nav-submenu {
	display: none !important;
}

.sidebar-desktop.collapsed .nav-divider {
	margin-left: 0.5rem;
	margin-right: 0.5rem;
}

/* Tooltip for collapsed sidebar (only when NOT hover-expanded) */
.sidebar-desktop.collapsed:not(.hover-expand) .nav-link:hover::after {
	content: attr(data-tooltip);
	position: absolute;
	left: 75px;
	top: 50%;
	transform: translateY(-50%);
	background: #1F2A44;
	color: #fff;
	padding: 0.5rem 0.75rem;
	border-radius: 6px;
	font-size: 0.85rem;
	white-space: nowrap;
	z-index: 1100;
	box-shadow: 0 2px 8px rgba(0,0,0,0.3);
	border: 1px solid rgba(14, 165, 233, 0.3);
}

/* Hover to temporarily expand */
.sidebar-desktop.collapsed.hover-expand {
	width: 280px;
	box-shadow: 4px 0 15px rgba(0, 0, 0, 0.3);
}

.sidebar-desktop.collapsed.hover-expand .nav-text,
.sidebar-desktop.collapsed.hover-expand .collapse-icon {
	display: inline !important;
}

.sidebar-desktop.collapsed.hover-expand .nav-link {
	justify-content: flex-start;
	padding: 0.75rem 1rem;
	height: 44px;
}

.sidebar-desktop.collapsed.hover-expand .nav-link i:first-child {
	position: static;
	transform: none;
	margin-right: 0.75rem !important;
}

.sidebar-desktop.collapsed.hover-expand .nav-link {
	justify-content: flex-start;
	padding: 0.75rem 1rem;
}

.sidebar-desktop.collapsed.hover-expand .nav-link i:first-child {
	margin-right: 0.75rem !important;
}

.sidebar-desktop.collapsed.hover-expand .sidebar-nav {
	padding-left: 0.75rem;
	padding-right: 0.75rem;
	align-items: stretch;
}

/* Main content adjustment for desktop sidebar */
@media (min-width: 992px) {
	.main {
		margin-left: 280px;
		transition: margin-left 0.3s ease;
	}
	
	.page-header {
		margin-left: 280px;
		transition: margin-left 0.3s ease;
	}
	
	body.sidebar-collapsed .main {
		margin-left: 70px;
	}
	
	body.sidebar-collapsed .page-header {
		margin-left: 70px;
	}
	
	/* Override the sidebar-open class on desktop - not needed */
	.main.sidebar-open {
		margin-left: 280px;
	}
	
	body.sidebar-collapsed .main.sidebar-open {
		margin-left: 70px;
	}
}

/* Sidebar scrollbar styling */
#sidebarOffcanvas .offcanvas-body {
	scrollbar-width: thin;
	scrollbar-color: #0EA5E9 rgba(14, 165, 233, 0.1);
}

#sidebarOffcanvas .offcanvas-body::-webkit-scrollbar {
	width: 6px;
}

#sidebarOffcanvas .offcanvas-body::-webkit-scrollbar-track {
	background: rgba(14, 165, 233, 0.1);
}

#sidebarOffcanvas .offcanvas-body::-webkit-scrollbar-thumb {
	background: #0EA5E9;
	border-radius: 3px;
}

#sidebarOffcanvas .offcanvas-body::-webkit-scrollbar-thumb:hover {
	background: #0284c7;
}

/* Modal Styles */
.modal-header {
	background: linear-gradient(135deg, #1F2A44 0%, #2d3f63 100%);
	border-bottom: 3px solid #0EA5E9;
	padding: 1rem 1.5rem;
}

.modal-header.bg-danger {
	background: linear-gradient(135deg, #dc3545 0%, #c82333 100%) !important;
	border-bottom-color: #bd2130;
}

.modal-header.bg-success {
	background: linear-gradient(135deg, #28a745 0%, #218838 100%) !important;
	border-bottom-color: #1e7e34;
}

.modal-header.bg-warning {
	background: linear-gradient(135deg, #ffc107 0%, #e0a800 100%) !important;
	border-bottom-color: #d39e00;
}

.modal-header .modal-title {
	color: white;
	font-weight: 700;
	font-size: 1.25rem;
}

.modal-header .btn-close {
	filter: invert(1) grayscale(100%) brightness(200%);
	opacity: 0.8;
	transition: all 0.3s ease;
}

.modal-header .btn-close:hover {
	opacity: 1;
	transform: rotate(90deg);
}

.modal-content {
	border: none;
	border-radius: 12px;
	box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.modal-body .nav-pills .nav-link {
	color: #1F2A44;
	font-weight: 600;
	border-radius: 8px;
	padding: 0.625rem 1.25rem;
	transition: all 0.3s ease;
	position: relative;
}

.modal-body .nav-pills .nav-link:hover {
	background-color: rgba(14, 165, 233, 0.1);
	color: #0EA5E9;
}

.modal-body .nav-pills .nav-link.active {
	background: linear-gradient(135deg, #0EA5E9 0%, #0284c7 100%);
	color: white;
	box-shadow: 0 4px 8px rgba(14, 165, 233, 0.3);
}

.modal-body .form-label {
	color: #1F2A44;
	font-weight: 600;
	font-size: 0.875rem;
	margin-bottom: 0.5rem;
}

.modal-footer {
	border-top: 1px solid #e5e7eb;
	padding: 1rem 1.5rem;
	background-color: #f8f9fa;
}

.modal-footer .btn {
	border-radius: 6px;
	padding: 0.625rem 1.5rem;
	font-weight: 600;
	transition: all 0.3s ease;
}

.modal-footer .btn-secondary {
	background-color: #6c757d;
	border-color: #6c757d;
}

.modal-footer .btn-secondary:hover {
	background-color: #5a6268;
	border-color: #545b62;
	transform: translateY(-1px);
}

.modal-footer .btn-primary {
	background: linear-gradient(135deg, #0EA5E9 0%, #0284c7 100%);
	border: none;
	box-shadow: 0 2px 4px rgba(14, 165, 233, 0.2);
}

.modal-footer .btn-primary:hover {
	background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
	box-shadow: 0 4px 8px rgba(14, 165, 233, 0.3);
	transform: translateY(-1px);
}

/* ============================================
   NOTIFICATION DROPDOWN STYLES
   ============================================ */

.notification-dropdown {
	width: 360px;
	max-height: 500px;
	padding: 0 !important;
	border-radius: 12px;
	box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
	border: 1px solid rgba(0, 0, 0, 0.08);
	overflow: hidden;
}

.notification-header {
	background: linear-gradient(135deg, #f8f9fa 0%, #fff 100%);
	border-bottom: 1px solid #e5e7eb;
}

#notificationsList {
	max-height: 350px;
	overflow-y: auto;
	scrollbar-width: thin;
	scrollbar-color: #d1d5db transparent;
}

#notificationsList::-webkit-scrollbar {
	width: 6px;
}

#notificationsList::-webkit-scrollbar-track {
	background: transparent;
}

#notificationsList::-webkit-scrollbar-thumb {
	background-color: #d1d5db;
	border-radius: 3px;
}

.notification-item {
	transition: background-color 0.2s ease;
}

.notification-item:hover {
	background-color: #f8f9fa;
}

.notification-item.unread {
	background-color: #eff6ff;
	border-left: 3px solid #0EA5E9;
}

.notification-item.unread:hover {
	background-color: #dbeafe;
}

.notification-footer {
	border-top: 1px solid #e5e7eb;
	background-color: #f8f9fa;
}

/* ========================================
   Quick Search Overlay Styles
   ======================================== */
.quick-search-overlay {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	z-index: 9999;
	display: none;
	align-items: flex-start;
	justify-content: center;
	padding-top: 10vh;
}

.quick-search-overlay.active {
	display: flex;
}

.quick-search-backdrop {
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background: rgba(0, 0, 0, 0.5);
	backdrop-filter: blur(4px);
}

.quick-search-container {
	position: relative;
	width: 100%;
	max-width: 600px;
	background: white;
	border-radius: 12px;
	box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
	overflow: hidden;
	animation: slideDown 0.2s ease-out;
	margin: 0 16px;
}

@keyframes slideDown {
	from {
		opacity: 0;
		transform: translateY(-20px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

.quick-search-header {
	display: flex;
	align-items: center;
	padding: 16px;
	border-bottom: 1px solid #e5e7eb;
	background: linear-gradient(135deg, #f8f9fa 0%, #fff 100%);
}

.quick-search-input-wrapper {
	flex: 1;
	display: flex;
	align-items: center;
	gap: 12px;
}

.quick-search-icon {
	color: #6b7280;
	font-size: 1.1rem;
}

.quick-search-input {
	flex: 1;
	border: none;
	outline: none;
	font-size: 1.1rem;
	background: transparent;
	color: #1f2937;
}

.quick-search-input::placeholder {
	color: #9ca3af;
}

.quick-search-shortcut {
	display: flex;
	align-items: center;
	gap: 4px;
}

.quick-search-shortcut kbd {
	background: #e5e7eb;
	color: #6b7280;
	padding: 2px 6px;
	border-radius: 4px;
	font-size: 0.75rem;
	font-family: inherit;
	border: 1px solid #d1d5db;
}

.quick-search-close {
	background: none;
	border: none;
	color: #6b7280;
	padding: 8px;
	margin-left: 8px;
	border-radius: 6px;
	cursor: pointer;
	transition: all 0.2s;
}

.quick-search-close:hover {
	background: #f3f4f6;
	color: #1f2937;
}

.quick-search-results {
	max-height: 400px;
	overflow-y: auto;
	scrollbar-width: thin;
	scrollbar-color: #d1d5db transparent;
}

.quick-search-results::-webkit-scrollbar {
	width: 6px;
}

.quick-search-results::-webkit-scrollbar-track {
	background: transparent;
}

.quick-search-results::-webkit-scrollbar-thumb {
	background-color: #d1d5db;
	border-radius: 3px;
}

.quick-search-empty {
	padding: 48px 24px;
	text-align: center;
	color: #6b7280;
}

.quick-search-empty i {
	color: #d1d5db;
}

.quick-search-loading {
	padding: 32px 24px;
	text-align: center;
	color: #6b7280;
}

.quick-search-loading i {
	font-size: 1.5rem;
	color: #0EA5E9;
}

.quick-search-result-item {
	display: flex;
	align-items: flex-start;
	padding: 12px 16px;
	cursor: pointer;
	transition: background-color 0.15s;
	border-bottom: 1px solid #f3f4f6;
	text-decoration: none;
	color: inherit;
}

.quick-search-result-item:hover,
.quick-search-result-item.focused {
	background-color: #f0f9ff;
}

.quick-search-result-item:last-child {
	border-bottom: none;
}

.quick-search-result-icon {
	width: 40px;
	height: 40px;
	border-radius: 8px;
	display: flex;
	align-items: center;
	justify-content: center;
	margin-right: 12px;
	flex-shrink: 0;
	font-size: 1rem;
}

.quick-search-result-icon.status-available {
	background: #dcfce7;
	color: #16a34a;
}

.quick-search-result-icon.status-progress {
	background: #dbeafe;
	color: #2563eb;
}

.quick-search-result-icon.status-delivered {
	background: #e0e7ff;
	color: #4f46e5;
}

.quick-search-result-icon.status-void {
	background: #fee2e2;
	color: #dc2626;
}

.quick-search-result-content {
	flex: 1;
	min-width: 0;
}

.quick-search-result-header {
	display: flex;
	align-items: center;
	gap: 8px;
	margin-bottom: 4px;
}

.quick-search-result-number {
	font-weight: 600;
	color: #1f2937;
	font-size: 1rem;
}

.quick-search-result-status {
	font-size: 0.7rem;
	padding: 2px 8px;
	border-radius: 9999px;
	font-weight: 500;
	text-transform: uppercase;
}

.quick-search-result-status.available {
	background: #dcfce7;
	color: #16a34a;
}

.quick-search-result-status.progress {
	background: #dbeafe;
	color: #2563eb;
}

.quick-search-result-status.delivered {
	background: #e0e7ff;
	color: #4f46e5;
}

.quick-search-result-status.void {
	background: #fee2e2;
	color: #dc2626;
}

.quick-search-result-priority {
	font-size: 0.65rem;
	padding: 2px 6px;
	border-radius: 4px;
	font-weight: 600;
	text-transform: uppercase;
}

.quick-search-result-priority.hot {
	background: #fef3c7;
	color: #d97706;
}

.quick-search-result-priority.critical {
	background: #fee2e2;
	color: #dc2626;
}

.quick-search-result-priority.expedited {
	background: #fce7f3;
	color: #db2777;
}

.quick-search-result-route {
	font-size: 0.9rem;
	color: #4b5563;
	margin-bottom: 2px;
}

.quick-search-result-route i {
	color: #9ca3af;
	margin: 0 4px;
	font-size: 0.7rem;
}

.quick-search-result-customer {
	font-size: 0.8rem;
	color: #6b7280;
}

.quick-search-result-carrier {
	font-size: 0.75rem;
	color: #9ca3af;
	margin-top: 2px;
}

.quick-search-no-results {
	padding: 32px 24px;
	text-align: center;
	color: #6b7280;
}

.quick-search-no-results i {
	font-size: 2rem;
	color: #d1d5db;
	margin-bottom: 12px;
}

/* Keyboard navigation hint */
.quick-search-footer {
	padding: 8px 16px;
	background: #f9fafb;
	border-top: 1px solid #e5e7eb;
	display: flex;
	align-items: center;
	justify-content: space-between;
	font-size: 0.75rem;
	color: #6b7280;
}

.quick-search-footer kbd {
	background: #e5e7eb;
	padding: 1px 5px;
	border-radius: 3px;
	font-family: inherit;
	margin: 0 2px;
}

/* Quick Search Tabs */
.quick-search-tabs {
	display: flex;
	flex-wrap: wrap;
	padding: 8px 16px 0;
	gap: 2px;
	border-bottom: 1px solid #e5e7eb;
	background: #f9fafb;
}

.quick-search-tab {
	padding: 6px 12px;
	background: none;
	border: none;
	border-bottom: 2px solid transparent;
	font-size: 0.8rem;
	color: #6b7280;
	cursor: pointer;
	transition: all 0.15s;
	display: flex;
	align-items: center;
	gap: 4px;
	white-space: nowrap;
}

.quick-search-tab:hover {
	color: #374151;
	background: rgba(0, 0, 0, 0.03);
}

.quick-search-tab.active {
	color: #0EA5E9;
	border-bottom-color: #0EA5E9;
	font-weight: 500;
}

.quick-search-tab i {
	font-size: 0.8rem;
}

/* Accounting status icons */
.quick-search-result-icon.status-warning {
	background: #fef3c7;
	color: #d97706;
}

.quick-search-result-icon.status-info {
	background: #dbeafe;
	color: #2563eb;
}

.quick-search-result-icon.status-success {
	background: #dcfce7;
	color: #16a34a;
}

.quick-search-result-icon.status-secondary {
	background: #f3f4f6;
	color: #6b7280;
}

/* Bill/Invoice result details */
.quick-search-result-details {
	font-size: 0.8rem;
	color: #6b7280;
	margin-bottom: 2px;
}

.quick-search-result-amounts {
	display: flex;
	align-items: center;
	gap: 12px;
	font-size: 0.8rem;
	color: #4b5563;
}

.quick-search-result-amounts .text-danger {
	color: #dc2626;
}

/* Mobile responsive for tabs */
@media (max-width: 768px) {
	.quick-search-tabs {
		padding: 4px 8px 0;
		gap: 1px;
	}
	
	.quick-search-tab {
		padding: 5px 8px;
		font-size: 0.72rem;
	}
	
	.quick-search-tab i {
		display: none;
	}
	
	.quick-search-result-amounts {
		flex-wrap: wrap;
		gap: 8px;
	}
}

/* ========================================
   Shipment Modal Title - Responsive Styles
   ======================================== */
.shipment-modal-title-wrapper {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 8px;
}

.shipment-modal-load-number {
	font-weight: 600;
	font-size: 1.1rem;
	white-space: nowrap;
}

.shipment-modal-badges {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 6px;
}

.shipment-badge {
	display: inline-flex;
	align-items: center;
	font-size: 0.75rem;
	padding: 4px 8px;
	border-radius: 4px;
	white-space: nowrap;
}

.shipment-badge i {
	font-size: 0.7rem;
}

/* Mobile styles - icon only badges */
@media (max-width: 575.98px) {
	.shipment-modal-title-wrapper {
		flex-direction: column;
		align-items: flex-start;
		gap: 6px;
	}
	
	.shipment-modal-load-number {
		font-size: 1rem;
	}
	
	.shipment-modal-badges {
		gap: 4px;
	}
	
	.shipment-badge {
		padding: 3px 6px;
		font-size: 0.7rem;
	}
	
	.shipment-badge .badge-text {
		display: none;
	}
	
	.shipment-badge i {
		margin-right: 0 !important;
	}
	
	/* Show abbreviated text for status on small mobile */
	.shipment-status-badge::after {
		margin-left: 2px;
	}
}

/* Tablet - slightly smaller badges */
@media (min-width: 576px) and (max-width: 767.98px) {
	.shipment-badge {
		font-size: 0.7rem;
		padding: 3px 6px;
	}
}

/* Ensure modal header doesn't get too cramped */
.modal-fullscreen .modal-header {
	min-height: auto;
	padding: 12px 16px;
}

@media (max-width: 575.98px) {
	.modal-fullscreen .modal-header {
		padding: 10px 12px;
	}
	
	.modal-fullscreen .modal-header .btn-close {
		padding: 8px;
	}
}

/* ========================================
   Shipment Stop Cards - Responsive Styles
   ======================================== */
/* Stop card header - default desktop layout */
.card .card-header .card-title {
	min-width: 0; /* Allow text truncation */
}

.card .card-header .card-title .tlb-stop-city-state {
	max-width: 150px;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

/* Mobile stop card layout */
@media (max-width: 575.98px) {
	/* Stack header content vertically */
	.card .card-header.d-flex {
		flex-direction: column !important;
		align-items: flex-start !important;
		gap: 10px;
		padding: 12px;
	}
	
	/* Title row takes full width */
	.card .card-header .card-title {
		width: 100%;
		flex-wrap: wrap;
		gap: 6px;
	}
	
	.card .card-header .card-title .fw-semibold {
		font-size: 0.95rem;
	}
	
	.card .card-header .card-title .tlb-stop-city-state {
		max-width: none;
		flex: 1;
		font-size: 0.9rem;
	}
	
	.card .card-header .card-title .badge {
		font-size: 0.65rem;
		padding: 3px 6px;
	}
	
	/* Action buttons row - full width, right aligned */
	.card .card-header > div:last-child {
		width: 100%;
		display: flex;
		justify-content: flex-end;
		gap: 6px;
	}
	
	/* Smaller action buttons on mobile */
	.card .card-header .btn-sm {
		padding: 4px 8px;
		font-size: 0.8rem;
	}
	
	.card .card-header .btn-sm i {
		font-size: 0.75rem;
	}
	
	/* Remove extra margin from buttons - stop card cleanup */
}

/* Tablet adjustments */
@media (min-width: 576px) and (max-width: 767.98px) {
	.card .card-header .card-title .tlb-stop-city-state {
		max-width: 120px;
	}
	
	.card .card-header .btn-sm {
		padding: 4px 6px;
	}
}

/* ========================================
   Reorder Stops Modal Styles
   ======================================== */
.reorder-stops-list {
	padding: 8px 0;
}

.reorder-stop-item {
	display: flex;
	align-items: center;
	padding: 12px 16px;
	background: white;
	border-bottom: 1px solid #e5e7eb;
	gap: 12px;
	transition: background-color 0.15s;
}

.reorder-stop-item:last-child {
	border-bottom: none;
}

.reorder-stop-item:hover:not(.locked) {
	background-color: #f8f9fa;
}

.reorder-stop-item.locked {
	opacity: 0.6;
	background-color: #f8f9fa;
	cursor: not-allowed;
}

.reorder-stop-handle {
	width: 24px;
	height: 24px;
	display: flex;
	align-items: center;
	justify-content: center;
	color: #9ca3af;
	cursor: grab;
}

.reorder-stop-item.locked .reorder-stop-handle {
	cursor: not-allowed;
	color: #d1d5db;
}

.reorder-stop-handle:active {
	cursor: grabbing;
}

.reorder-stop-number {
	width: 28px;
	height: 28px;
	background: #e5e7eb;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	font-weight: 600;
	font-size: 0.85rem;
	color: #374151;
	flex-shrink: 0;
}

.reorder-stop-info {
	flex: 1;
	min-width: 0;
}

.reorder-stop-type {
	font-weight: 600;
	color: #1f2937;
	font-size: 0.95rem;
}

.reorder-stop-location {
	color: #6b7280;
	font-size: 0.85rem;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.reorder-stop-status .badge {
	font-size: 0.7rem;
}

/* Sortable states */
.reorder-stop-ghost {
	opacity: 0.4;
	background: #dbeafe !important;
}

.reorder-stop-chosen {
	background: #eff6ff !important;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.reorder-stop-drag {
	opacity: 1;
}

/* Reorder instructions */
.reorder-instructions {
	text-align: center;
}

/* Mobile adjustments for reorder modal */
@media (max-width: 575.98px) {
	.reorder-stop-item {
		padding: 10px 12px;
		gap: 8px;
	}
	
	.reorder-stop-number {
		width: 24px;
		height: 24px;
		font-size: 0.8rem;
	}
	
	.reorder-stop-type {
		font-size: 0.9rem;
	}
	
	.reorder-stop-location {
		font-size: 0.8rem;
	}
	
	.reorder-stop-status {
		display: none; /* Hide status on very small screens */
	}
}