/* =========================================================================
   WMS — custom overrides on top of Bootstrap (CDN).
   Minimal by design: default Bootstrap colors, overrides via
   :root{} CSS variables. Avoid bg-dark/bg-light/bg-white — use bg-body.
   ========================================================================= */

/* --- Theme overrides (re-brand here, once) -------------------------------- */
:root {
	/* Default Bootstrap palette is used. Override only if re-branding. */
	/* --bs-primary: #0d6efd; */

	/* Sidebar scrollbar: light theme -> primary subtle, dark -> secondary
     * subtle, so the bar blends with the theme instead of the browser
     * default. */
	--sidebar-scrollbar-thumb: rgba(var(--bs-primary-rgb), 0.35);
	--sidebar-scrollbar-thumb-hover: rgba(var(--bs-primary-rgb), 0.55);
}

[data-bs-theme="dark"] {
	--sidebar-scrollbar-thumb: rgba(var(--bs-secondary-rgb), 0.4);
	--sidebar-scrollbar-thumb-hover: rgba(var(--bs-secondary-rgb), 0.6);
}

/* --- Global link behaviour ------------------------------------------------ */
a {
	text-decoration: none;
}

/* --- Fonts (baseline look, kept for readability) -------------------------- */
body {
	font-family: "Open Sans", sans-serif;
}

h1,
h2,
h3,
h4,
h5,
h6 {
	font-family: "Nunito", sans-serif;
}

/* --- Layout: header ------------------------------------------------------- */
.header {
	transition: all 0.5s;
	z-index: 997;
	height: 60px;
	box-shadow: 0 2px 20px rgba(1, 41, 112, 0.1);
	background-color: var(--bs-body-bg);
	padding-left: 20px;
}

.header .toggle-sidebar-btn {
	font-size: 32px;
	padding-left: 10px;
	cursor: pointer;
	color: var(--bs-body-color);
	/* Align the toggle icon with the sidebar menu icons when compact:
     * the sidebar rail is 68px and its icons are centered around 24px,
     * so nudge the toggle a bit left of the header padding. */
	margin-left: -12px;
}

/* Logo: blue icon (fallback for the upcoming image logo) + red title. */
.header .logo {
	gap: 0.5rem;
}

.header .logo .logo-icon {
	font-size: 1.6rem;
	color: var(--bs-primary);
}

.header .logo .logo-title {
	font-size: 1.15rem;
	font-weight: 700;
	color: var(--bs-danger);
	font-family: "Nunito", sans-serif;
	white-space: nowrap;
}

/* --- Header nav (right side: notifications + profile) -------------------- */
.header-nav ul {
	list-style: none;
}

.header-nav > ul {
	margin: 0;
	padding: 0;
}

.header-nav .nav-icon {
	font-size: 22px;
	color: var(--bs-emphasis-color);
	margin-right: 15px;
	position: relative;
}

.header-nav .nav-icon .badge-number {
	font-size: 10px;
	font-weight: 700;
	line-height: 1.4;
	padding: 0.25em 0.45em;
}

.header-nav .nav-profile {
	color: var(--bs-emphasis-color);
}

.header-nav .nav-profile .profile-img {
	width: 36px;
	height: 36px;
	background-color: var(--bs-primary);
	color: #fff;
	font-size: 16px;
	font-weight: bold;
	display: flex;
	align-items: center;
	justify-content: center;
	text-transform: uppercase;
	user-select: none;
}

.header-nav .nav-profile span {
	font-size: 14px;
	font-weight: 600;
}

.header-nav .dropdown-menu {
	box-shadow: 0 0 15px rgba(1, 41, 112, 0.1);
	border: 1px solid var(--bs-border-color);
	background-color: var(--bs-body-bg);
}

.header-nav .dropdown-header {
	padding: 0.75rem 1rem;
	border-bottom: 1px solid var(--bs-border-color);
}

.header-nav .dropdown-item {
	font-size: 14px;
}

.header-nav .dropdown-item i {
	margin-right: 0.5rem;
}

.header-nav .dropdown-item:hover {
	background-color: var(--bs-tertiary-bg);
}

.header-nav .profile .dropdown-header h6 {
	font-size: 15px;
	margin-bottom: 0;
	color: var(--bs-emphasis-color);
}

.header-nav .profile .dropdown-header span {
	font-size: 13px;
}

/* --- Movement create: aksi yang menunggu header lengkap ------------- */
/* Wrapper tombol Save/Submit: flex saat tampil, hilang saat .d-none. */
#itemsActions {
	display: flex;
	gap: 0.5rem;
}

/* --- Layout: sidebar ----------------------- */
:root {
	--sidebar-width: 260px;
	--sidebar-collapsed-width: 68px;
	--sidebar-transition: width 0.25s ease;
}

.sidebar {
	position: fixed;
	top: 60px;
	left: 0;
	bottom: 0;
	width: var(--sidebar-width);
	z-index: 996;
	display: flex !important;
	flex-direction: column !important;
	transition: var(--sidebar-transition);
	box-shadow: 0 0 20px rgba(1, 41, 112, 0.1);
	background-color: var(--bs-body-bg);
	border-right: 1px solid var(--bs-border-color);
	box-sizing: border-box;
}

.sidebar.collapsed {
	width: var(--sidebar-collapsed-width);
	box-sizing: border-box;
}

.sidebar-nav {
	flex: 1 1 auto !important;
	min-height: 0 !important;
	width: 100% !important;
	padding: 8px 0;
	overflow-y: auto !important;
	overflow-x: hidden !important;
	/* Tanpa gutter tetap: ruang scrollbar tidak dipesan permanen, jadi tidak
     * ada pita kosong di kanan. Scrollbar hanya mengambil ruang saat muncul. */
	scrollbar-gutter: auto;
	scrollbar-width: thin;
	scrollbar-color: var(--sidebar-scrollbar-thumb) transparent;
	/* Neutralize Bootstrap .nav (display:flex; flex-wrap:wrap) which makes
     * menu items wrap/overflow sideways when space is tight. */
	display: block !important;
}

.sidebar-nav .nav-link {
	display: flex !important;
	flex-direction: row !important;
	align-items: center !important;
	flex-wrap: nowrap !important;
	/* Strip aksen di KIRI; semua item membawa border transparan dengan lebar
     * sama supaya teks tidak bergeser saat status berubah. */
	border-left: 3px solid transparent;
	padding: 10px 16px 10px 17px;
	color: var(--bs-body-color);
	font-size: 0.875rem;
	font-weight: 500;
	white-space: nowrap;
	border-radius: 0;
	transition:
		color 0.2s ease,
		background-color 0.2s ease;
	width: 100%;
	box-sizing: border-box;
}

.sidebar-nav .nav-link > span {
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	flex: 1 1 auto !important;
	min-width: 0;
	display: inline-block;
}

.sidebar-nav .submenu .nav-link {
	display: flex !important;
	flex-direction: row !important;
	align-items: center !important;
	padding-left: 45px;
	font-size: 0.825rem;
	width: 100%;
}

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

.sidebar-nav::-webkit-scrollbar-track {
	background: transparent;
	border-radius: 4px;
}

.sidebar-nav::-webkit-scrollbar-thumb {
	background-color: var(--sidebar-scrollbar-thumb);
	border-radius: 4px;
	border: 2px solid transparent;
	background-clip: content-box;
}

.sidebar-nav::-webkit-scrollbar-thumb:hover {
	background-color: var(--sidebar-scrollbar-thumb-hover);
}

/* Sidebar footer (logout) pinned to the bottom. */
.sidebar-footer {
	flex-shrink: 0 !important;
	border-top: 1px solid var(--bs-border-color);
	padding: 4px 0;
	background-color: var(--bs-body-bg);
}

.sidebar-footer .nav-link {
	display: flex;
	align-items: center;
	width: 100%;
	border: 0;
	background: none;
	color: var(--bs-danger);
	opacity: 0.7;
	padding: 10px 16px 10px 20px;
	font-size: 0.875rem;
}

.sidebar-footer .nav-link:hover {
	opacity: 1;
	background-color: rgba(var(--bs-danger-rgb), 0.08);
}

.sidebar-footer .nav-link > i {
	width: 20px;
	text-align: center;
	margin-right: 12px;
}

/* Collapsed: center the logout icon only. */
.sidebar.collapsed .sidebar-footer .nav-link {
	justify-content: center;
	padding: 10px 0;
}

.sidebar.collapsed .sidebar-footer .nav-link > span {
	display: none;
}

.sidebar.collapsed .sidebar-footer .nav-link > i {
	margin-right: 0;
}

/* Nav links */
.sidebar-nav .nav-link {
	display: flex;
	align-items: center;
	flex-wrap: nowrap;
	border-left: 3px solid transparent;
	padding: 10px 16px 10px 17px;
	color: var(--bs-body-color);
	font-size: 0.875rem;
	font-weight: 500;
	white-space: nowrap;
	border-radius: 0;
	transition:
		color 0.2s ease,
		background-color 0.2s ease;
	width: 100%;
	box-sizing: border-box;
}

.sidebar-nav .nav-link > i {
	width: 20px;
	text-align: center;
	font-size: 1rem;
	margin-right: 12px;
	flex-shrink: 0;
	opacity: 0.55;
	transition:
		opacity 0.2s ease,
		color 0.2s ease;
}

.sidebar-nav .nav-link > span {
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	flex: 1;
	min-width: 0;
}

.sidebar-nav .nav-link:hover {
	color: var(--bs-primary);
	background-color: rgba(var(--bs-primary-rgb), 0.08);
}

.sidebar-nav .nav-link:hover > i {
	color: var(--bs-danger);
	opacity: 1;
}

.sidebar-nav .nav-link.active {
	color: var(--bs-primary);
	background-color: rgba(var(--bs-primary-rgb), 0.1);
	font-weight: 600;
	border-left: 3px solid var(--bs-primary);
}

.sidebar-nav .nav-link.active > i {
	color: var(--bs-danger);
	opacity: 1;
}

/* Dropdown arrow */
.sidebar-nav .dropdown-toggle::after {
	margin-left: auto;
	font-size: 0.65rem;
}

/* Section headings */
.sidebar-nav .sidebar-heading .nav-link {
	font-size: 0.7rem;
	letter-spacing: 0.05em;
	text-transform: uppercase;
	padding: 16px 16px 4px;
	pointer-events: none;
	font-weight: 700;
}

.sidebar-nav .sidebar-heading .sidebar-divider {
	display: none;
}

/* Submenu (expanded sidebar) */
.sidebar-nav .submenu {
	background-color: rgba(0, 0, 0, 0.02);
	padding-left: 0;
	list-style: none;
}

/* Top-level items: neutralize Bootstrap .nav-item flex/wrap so menus
 * never overflow sideways. */
.sidebar-nav > .nav-item {
	width: 100% !important;
	display: block !important;
}

.sidebar-nav .submenu .nav-item {
	display: block;
	width: 100%;
	flex-shrink: 0;
}

.sidebar-nav .submenu .nav-link {
	padding-left: 48px;
	font-size: 0.825rem;
	display: flex;
	width: 100%;
}

.sidebar-nav .submenu .nav-link > i {
	font-size: 0.85rem;
	width: 18px;
	margin-right: 10px;
	transition: color 0.2s ease;
}

.sidebar-nav .submenu .nav-link:hover > i,
.sidebar-nav .submenu .nav-link.active > i {
	color: var(--bs-danger);
}

.sidebar-nav .submenu.collapsing,
.sidebar-nav .submenu.collapse.show {
	display: block;
}

/* Submenu header (parent name inside popup) */
.sidebar-nav .submenu-header {
	display: none !important;
}

/* --- Collapsed sidebar: icon-only + popup submenus ------------------------ */
.sidebar.collapsed .nav-link > span {
	display: none;
}

.sidebar.collapsed .sidebar-heading .nav-link {
	display: none !important;
}

.sidebar.collapsed .sidebar-heading .sidebar-divider {
	display: block;
	margin-top: 4px !important;
	margin-bottom: 4px !important;
	opacity: 0.4;
}

.sidebar.collapsed .dropdown-toggle::after {
	display: none;
}

.sidebar.collapsed .nav-link {
	justify-content: center;
	padding: 8px 0;
	/* Border kiri 3px menggeser ikon; 3px di kanan menaruhnya tepat di tengah
     * sehingga rapat dan tidak terasa lebar kosong di sisi kanan. */
	padding-right: 3px;
}

.sidebar.collapsed .nav-link > i {
	margin-right: 0;
	font-size: 1.15rem;
}

/* Saat collapsed tidak perlu gutter/padding kanan sama sekali. */
.sidebar.collapsed .sidebar-nav {
	scrollbar-gutter: auto;
	padding-right: 0;
}

.sidebar.collapsed .has-submenu {
	position: relative;
}

.sidebar.collapsed .submenu-header {
	display: block !important;
	padding: 10px 16px !important;
	margin-bottom: 8px !important;
	background-color: transparent;
}

/* All submenus hidden when collapsed; shown only via .popup-open */
.sidebar.collapsed .submenu,
.sidebar.collapsed .submenu.show,
.sidebar.collapsed .submenu.collapsing {
	display: none !important;
	position: fixed;
	left: var(--sidebar-collapsed-width);
	top: 0;
	width: 200px;
	height: auto !important;
	max-height: calc(100vh - 16px);
	overflow-y: auto !important;
	overflow-x: hidden !important;
	background-color: var(--bs-body-bg);
	border: 1px solid var(--bs-border-color);
	border-radius: 0 6px 6px 0;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
	padding: 6px 0;
	z-index: 1050;
	transition: none !important;
}

.sidebar.collapsed .has-submenu.popup-open > .submenu {
	display: block !important;
}

.sidebar.collapsed .has-submenu > .submenu::before {
	content: "";
	position: absolute;
	top: 0;
	left: -10px;
	width: 10px;
	height: 100%;
}

.sidebar.collapsed .submenu .nav-link {
	padding: 8px 16px;
	justify-content: flex-start;
	white-space: nowrap;
}

.sidebar.collapsed .submenu .nav-link > i {
	margin-right: 10px;
	font-size: 0.85rem;
}

.sidebar.collapsed .submenu .nav-link > span {
	display: inline !important;
}

.sidebar.collapsed .submenu .nav-link.active {
	border-right: none;
}

/* Mobile: sidebar hidden by default, toggled */
@media (max-width: 1199px) {
	.sidebar {
		margin-left: calc(-1 * var(--sidebar-width));
	}
	.sidebar.hidden {
		margin-left: 0;
	}
	.sidebar.collapsed {
		margin-left: 0;
		width: var(--sidebar-collapsed-width);
	}
}

/* --- Layout: main (expands when sidebar collapses) ------------------------ */
.main {
	margin-top: 60px;
	padding: 20px 30px;
	transition: margin-left 0.25s ease;
}

@media (max-width: 1199px) {
	.main {
		margin-left: 0;
	}
}

@media (min-width: 1200px) {
	.main {
		margin-left: var(--sidebar-width);
	}
	/* Sidebar collapsed -> content widens to fill the freed space. */
	.sidebar.collapsed ~ .main {
		margin-left: var(--sidebar-collapsed-width);
	}
}

/* --- Page title ----------------------------------------------------------- */
.pagetitle {
	margin-bottom: 10px;
}

.pagetitle h1 {
	font-size: 24px;
	margin-bottom: 0;
	font-weight: 600;
}

/* --- Cards ---------------------------------------------------------------- */
.card {
	border-radius: 5px;
	border: 1px solid var(--bs-border-color);
}

/* --- Back to top ---------------------------------------------------------- */
.back-to-top {
	position: fixed;
	visibility: hidden;
	opacity: 0;
	right: 15px;
	bottom: 15px;
	z-index: 996;
	background: var(--bs-primary);
	width: 40px;
	height: 40px;
	border-radius: 50px;
	transition: all 0.4s;
	color: var(--bs-white, #fff);
}

.back-to-top i {
	font-size: 24px;
	color: #fff;
}

.back-to-top.active {
	visibility: visible;
	opacity: 1;
}

/* --- Loading overlay ------------------------------------------------------ */
.loading-overlay {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background: var(--bs-body-bg);
	opacity: 0.8;
	z-index: 2000;
	display: none;
	align-items: center;
	justify-content: center;
}

.loading-overlay.show {
	display: flex;
}

/* --- Footer --------------------------------------------------------------- */
.footer {
	font-size: 14px;
	transition: margin-left 0.25s ease;
	border-top: 1px solid var(--bs-border-color);
	background-color: var(--bs-body-bg);
	margin-left: var(--sidebar-width);
	color: var(--bs-secondary-color);
}

.sidebar.collapsed ~ .footer {
	margin-left: var(--sidebar-collapsed-width);
}

.footer strong {
	font-weight: 600;
}

@media (max-width: 1199px) {
	.footer {
		margin-left: 0;
	}
}

/* --- Tables --------------------------------------------------------------- */
.table .btn {
	padding: 0.15rem 0.4rem;
	font-size: 0.8rem;
}

/* Cells that must never wrap: action buttons, datetimes, amounts, codes. */
.table td.text-nowrap,
.table th.text-nowrap {
	white-space: nowrap;
}

/* Uniform action button sizing (icon-only). */
.table .btn-sm i {
	font-size: 0.85rem;
	vertical-align: middle;
}

/* Right-align actions column consistently. */
.table td.actions-cell,
.table th.actions-cell {
	text-align: right;
	white-space: nowrap;
}

/* --- Notification dropdown ------------------------------------------------- */
.dropdown-menu.notifications {
	min-width: 320px;
}

.dropdown-menu.notifications .dropdown-header {
	font-size: 0.8rem;
	font-weight: 600;
	padding: 0.6rem 1rem;
	border-bottom: 1px solid var(--bs-border-color);
}

.dropdown-menu.notifications .notification-item {
	display: flex;
	align-items: flex-start;
	padding: 0.6rem 1rem;
	gap: 0.5rem;
	border-bottom: 1px solid var(--bs-border-color-subtle);
	transition: background-color 0.15s ease;
}

.dropdown-menu.notifications .notification-item:last-child {
	border-bottom: none;
}

.dropdown-menu.notifications .notification-item:hover {
	background-color: var(--bs-tertiary-bg);
}

/* Clickable notification (has a related page) + read/unread tint in the
 * "All notifications" modal. */
.notification-item.notif-link {
	cursor: pointer;
}

.notification-item.notif-read {
	opacity: 0.72;
}

.notification-item.notif-read .notification-message {
	font-weight: normal;
}

#notifModalList .notification-item {
	padding: 0.7rem 1rem;
	border-bottom: 1px solid var(--bs-border-color-subtle);
	font-size: 0.85rem;
}

#notifModalList .notification-item:hover {
	background-color: var(--bs-tertiary-bg);
}

.dropdown-menu.notifications .notification-item > i {
	font-size: 1.1rem;
	margin-top: 0.15rem;
	flex-shrink: 0;
}

.dropdown-menu.notifications .notification-item .notification-message {
	font-size: 0.82rem;
	line-height: 1.35;
}

.dropdown-menu.notifications .notification-item .mark-read-btn {
	padding: 0.1rem 0.3rem;
	font-size: 0.7rem;
	flex-shrink: 0;
	opacity: 0.6;
}

.dropdown-menu.notifications .notification-item:hover .mark-read-btn {
	opacity: 1;
}

.dropdown-menu.notifications .dropdown-footer {
	border-top: 1px solid var(--bs-border-color);
	text-align: center;
	font-size: 0.8rem;
}

/* --- Profile dropdown ------------------------------------------------------ */
.dropdown-menu.profile {
	min-width: 240px;
}

.dropdown-menu.profile .dropdown-header {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 0.6rem;
	padding: 0.75rem 1rem;
	border-bottom: 1px solid var(--bs-border-color);
	text-align: left;
}

.dropdown-menu.profile .dropdown-header i {
	font-size: 2rem;
	color: var(--bs-primary);
	flex-shrink: 0;
}

.dropdown-menu.profile .dropdown-header h6 {
	margin-bottom: 0;
	font-size: 0.9rem;
}

.dropdown-menu.profile .dropdown-header .profile-email {
	font-size: 0.78rem;
	color: var(--bs-secondary-color);
	display: block;
}

.dropdown-menu.profile .dropdown-item {
	display: flex;
	align-items: center;
	font-size: 0.85rem;
	padding: 0.5rem 1rem;
}

.dropdown-menu.profile .dropdown-item i {
	width: 20px;
	text-align: center;
}

/* --- DataTables scrollbar glitch fix --------------------------------------- */
/* Bootstrap's .table-responsive keeps overflow-x:auto at every breakpoint,
 * so a horizontal scrollbar shows on desktop even when the table fits.
 * On >= md we let the table lay out normally (no spurious scrollbar);
 * below md the responsive container still scrolls when needed. */
@media (min-width: 768px) {
	.table-responsive {
		overflow-x: visible;
	}
}

/* Let the DataTables wrapper shrink to its container (no forced width). */
.dataTables_wrapper {
	min-width: 0;
}

.dataTables_wrapper table.dataTable {
	width: 100% !important;
}

/* --- Stock audit group accordion ------------------------------------------- */
/* Explicit chevron (bi-chevron-down) instead of Bootstrap's ::after icon so
 * the arrow renders even if the Bootstrap CSS variables are stale/cached. */
.audit-group-header::after {
	display: none;
}

.audit-group-header .audit-chevron {
	transition: transform 0.2s ease;
}

.audit-group-header[aria-expanded="true"] .audit-chevron {
	transform: rotate(180deg);
}

.audit-group-header:hover {
	background-color: var(--bs-tertiary-bg, #f8f9fa);
}

/* --- Stock audit results container ----------------------------------------- */
/* Scrollable results area: keeps the page compact even with many groups. */
.audit-results-container {
	max-height: 60vh;
	overflow-y: auto;
}

/* --- Opname count entry ---------------------------------------------------- */
/* Counted qty is a real quantity (thousands at most), so the field should
 * stay compact instead of stretching across the whole column. Force the
 * number to the right edge so it lines up with System Qty / Difference. */
.counted-input {
	width: 100%;
	max-width: 110px;
	text-align: right !important;
}

/* --- Movement items container ---------------------------------------------- */
/* Mirrors REFERENCES: a bounded, scrollable area so a movement with hundreds
 * of scanned items never stretches the page. The thead/tfoot stay pinned.
 * Height is DYNAMIC (max-height) so an empty/short list collapses and the
 * action buttons below stay in view; it grows to 50vh before scrolling. */
.table-container {
	max-height: 50vh;
	overflow-y: auto;
}

/* Fixed table layout: column widths are computed once from the header, so
 * row contents (long SKUs, big numbers, feedback text) never shift the
 * columns back and forth while typing/scanning. */
.table-container #itemsTable {
	table-layout: fixed;
	width: 100%;
}

.table-container #itemsTable .col-product {
	width: auto;
}

.table-container #itemsTable .col-qty {
	width: 10%;
}

.table-container #itemsTable .col-uom {
	width: 10%;
}

.table-container #itemsTable .col-cost {
	width: 20%;
}

.table-container #itemsTable .col-stock {
	width: 9%;
}

.table-container #itemsTable .col-x {
	width: 4%;
}

/* Keep long values inside their fixed column instead of pushing the table. */
.table-container #itemsTable .item-uom,
.table-container #itemsTable .item-total {
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.table-container #itemsTable .item-product .select2-container {
	width: 100% !important;
}

.table-container thead th {
	position: sticky;
	top: 0;
	z-index: 1;
	background-color: var(--bs-table-bg, #fff);
	border-bottom: 1px solid var(--bs-border-color, #dee2e6);
}

.table-container tfoot td {
	position: sticky;
	bottom: 0;
	z-index: 1;
	background-color: var(--bs-table-bg, #fff);
	border-top: 1px solid var(--bs-border-color, #dee2e6);
}

/* --- Movement action bar -------------------------------------------------- */
/* Save Draft / Submit / Cancel stay pinned to the bottom of the viewport so
 * they are always reachable, even when the items container is full (50vh)
 * and the page below it is off-screen. */
.movement-actions {
	position: sticky;
	bottom: 0;
	z-index: 10;
	background-color: var(--bs-body-bg, #fff);
	padding: 0.75rem 0;
	margin: 1.5rem 0 0;
	border-top: 1px solid var(--bs-border-color, #dee2e6);
}

/* --- Auto asterisk on required labels ------------------------------------- */
/* Any .form-label directly preceding a required control gets a red star,
 * so no field is ever forgotten and no manual * spans are needed. */
.form-label:has(+ input[required]),
.form-label:has(+ select[required]),
.form-label:has(+ textarea[required]),
.form-label:has(+ .input-group > input[required]) {
	position: relative;
}

.form-label:has(+ input[required])::after,
.form-label:has(+ select[required])::after,
.form-label:has(+ textarea[required])::after,
.form-label:has(+ .input-group > input[required])::after {
	content: " *";
	color: var(--bs-danger, #dc3545);
}

.scan-feedback-error {
	color: var(--bs-danger, #dc3545);
	font-weight: 500;
}

.scan-feedback-ok {
	color: var(--bs-success, #198754);
	font-weight: 500;
}

/* Notifications modal: slightly above vertical center so a short list
 * sits closer to the top of the viewport and reads more comfortably. */
#allNotificationsModal .modal-dialog {
	margin-top: 10vh;
	margin-bottom: auto;
}
