/* Legacy skin: OneUI classes restyled with the p42 tokens, only under .p42-skin */

/* ---------- surface ---------- */

.p42-skin {
	color: var(--p42-text);
}

/* ---------- blocks / cards (1,341 uses) ---------- */

.p42-skin .block {
	background: var(--p42-surface);
	border: 1px solid var(--p42-border-soft);
	border-radius: var(--p42-r-lg);
	box-shadow: var(--p42-shadow-xs);
}

/* a transparent block stays transparent: the dashboard hero puts white text on a photo */
.p42-skin .block.block-transparent {
	background: transparent;
	border: 0;
	box-shadow: none;
}

.p42-skin .block-header {
	background: var(--p42-surface);
	border-bottom: 1px solid var(--p42-border-soft);
	padding: 16px 20px;
}

/* a header that asks for bg-primary keeps a solid fill: its titles are white */
.p42-skin .block-header.bg-primary {
	background: var(--p42-primary);
	border-bottom: 0;
}

/* a header at the top of a block follows its rounded corners, or a white rim shows around them */
.p42-skin .block > .block-header:first-child,
.p42-skin .block > form:first-child > .block-header:first-child {
	border-radius: calc(var(--p42-r-lg) - 1px) calc(var(--p42-r-lg) - 1px) 0 0;
}

.p42-skin .block-header.bg-primary,
.p42-skin .block-header.bg-primary .block-title,
.p42-skin .block-header.bg-primary h2,
.p42-skin .block-header.bg-primary h3,
.p42-skin .block-header.bg-primary h4,
.p42-skin .block-header.bg-primary i:not(.text-success):not(.text-danger):not(.text-warning) {
	color: #fff;
}

/* Buttons sitting on that fill need their own contrast back. */
.p42-skin .block-header.bg-primary .btn-default {
	background: rgba(255, 255, 255, .14);
	border-color: rgba(255, 255, 255, .28);
	color: #fff;
}

/* The variant used all over the app for a tinted header. */
.p42-skin .block-header.bg-gray-lighter,
.p42-skin .block-header.bg-gray-light {
	background: var(--p42-surface-soft);
}

.p42-skin .block-title {
	color: var(--p42-text-strong);
	font-weight: 600;
	letter-spacing: -0.01em;
}

.p42-skin .block-content {
	padding: 20px;
}

/* OneUI ships a tighter body variant; keep it tighter, just on the new scale. */
.p42-skin .block-content.block-content-mini {
	padding: 12px 20px;
}

/* ---------- buttons ---------- */

.p42-skin .btn {
	border-radius: var(--p42-r-md);
	border: 1px solid transparent;
	padding: 8px 16px;
	font-weight: 600;
	transition: background-color .15s ease, border-color .15s ease, box-shadow .15s ease;
}

.p42-skin .btn:focus {
	outline: none;
	box-shadow: var(--p42-focus-ring);
}

.p42-skin .btn-primary {
	color: #fff;
	background: linear-gradient(135deg, var(--p42-primary), var(--p42-primary-strong));
	border-color: transparent;
}

.p42-skin .btn-primary:hover,
.p42-skin .btn-primary:focus {
	color: #fff;
	background: var(--p42-primary-strong);
}

.p42-skin .btn-default {
	color: var(--p42-text);
	background: var(--p42-surface);
	border-color: var(--p42-border);
}

.p42-skin .btn-default:hover,
.p42-skin .btn-default:focus {
	color: var(--p42-text-strong);
	background: var(--p42-surface-hover);
	border-color: var(--p42-border);
}

.p42-skin .btn-info {
	color: #fff;
	background: var(--p42-teal-strong);
	border-color: transparent;
}

.p42-skin .btn-info:hover,
.p42-skin .btn-info:focus {
	color: #fff;
	background: var(--p42-teal);
}

.p42-skin .btn-success {
	color: #fff;
	background: var(--p42-success);
	border-color: transparent;
}

.p42-skin .btn-warning {
	color: #fff;
	background: var(--p42-warning);
	border-color: transparent;
}

.p42-skin .btn-danger {
	color: #fff;
	background: var(--p42-danger);
	border-color: transparent;
}

.p42-skin .btn-danger:hover,
.p42-skin .btn-danger:focus {
	color: #fff;
	background: #8d1038;
}

.p42-skin .btn.disabled,
.p42-skin .btn[disabled],
.p42-skin fieldset[disabled] .btn {
	opacity: .55;
	box-shadow: none;
}

.p42-skin .btn-xs {
	padding: 4px 10px;
	border-radius: var(--p42-r-sm);
}

.p42-skin .btn-sm {
	padding: 6px 12px;
	border-radius: var(--p42-r-sm);
}

.p42-skin .btn-lg {
	padding: 12px 22px;
	border-radius: var(--p42-r-md);
}

/* ---------- form controls (857 inputs) ---------- */

.p42-skin .form-control {
	height: 40px;
	padding: 8px 12px;
	color: var(--p42-text);
	background: var(--p42-surface);
	border: 1px solid var(--p42-border);
	border-radius: var(--p42-r-md);
	box-shadow: none;
	transition: border-color .15s ease, box-shadow .15s ease;
}

.p42-skin textarea.form-control {
	height: auto;
	min-height: 80px;
}

.p42-skin select.form-control[multiple],
.p42-skin select.form-control[size] {
	height: auto;
}

.p42-skin .form-control:focus {
	border-color: var(--p42-teal);
	box-shadow: var(--p42-focus-ring);
	outline: none;
}

.p42-skin .form-control[disabled],
.p42-skin .form-control[readonly],
.p42-skin fieldset[disabled] .form-control {
	background: var(--p42-surface-soft);
	color: var(--p42-text-muted);
}

.p42-skin .form-control::-moz-placeholder { color: var(--p42-text-subtle); }
.p42-skin .form-control:-ms-input-placeholder { color: var(--p42-text-subtle); }
.p42-skin .form-control::-webkit-input-placeholder { color: var(--p42-text-subtle); }

.p42-skin label {
	color: var(--p42-text);
	font-weight: 600;
}

.p42-skin .help-block {
	color: var(--p42-text-muted);
}

.p42-skin .input-group-addon {
	background: var(--p42-surface-soft);
	border: 1px solid var(--p42-border);
	color: var(--p42-text-muted);
	border-radius: var(--p42-r-md);
}

/* input groups: the addon squares its joining edge so it reads as one control */
.p42-skin .input-group-addon:first-child {
	border-top-right-radius: 0;
	border-bottom-right-radius: 0;
}

.p42-skin .input-group-addon:last-child {
	border-top-left-radius: 0;
	border-bottom-left-radius: 0;
}

/* Buttons used as addons need the same treatment. */
.p42-skin .input-group-btn:first-child > .btn {
	border-top-right-radius: 0;
	border-bottom-right-radius: 0;
}

.p42-skin .input-group-btn:last-child > .btn {
	border-top-left-radius: 0;
	border-bottom-left-radius: 0;
}

/* Bootstrap validation states, re-pointed at the tokens. */
.p42-skin .has-error .form-control { border-color: var(--p42-danger); }
.p42-skin .has-error .control-label,
.p42-skin .has-error .help-block { color: var(--p42-danger); }
.p42-skin .has-success .form-control { border-color: var(--p42-success); }
.p42-skin .has-success .control-label { color: var(--p42-success); }

/* ---------- alerts (135 blocks) ---------- */

.p42-skin .alert {
	border-radius: var(--p42-r-md);
	border: 1px solid transparent;
	padding: 12px 16px;
}

.p42-skin .alert-primary {
	color: var(--p42-info);
	background: var(--p42-info-bg);
	border-color: rgba(38,117,201,.20);
}

.p42-skin .alert-info {
	color: var(--p42-info);
	background: var(--p42-info-bg);
	border-color: rgba(38,117,201,.20);
}

.p42-skin .alert-success {
	color: var(--p42-success);
	background: var(--p42-success-bg);
	border-color: rgba(22,163,107,.20);
}

.p42-skin .alert-warning {
	color: var(--p42-warning);
	background: var(--p42-warning-bg);
	border-color: rgba(183,121,31,.22);
}

.p42-skin .alert-danger,
.p42-skin .alert-error {
	color: var(--p42-danger);
	background: var(--p42-danger-bg);
	border-color: rgba(169,21,67,.20);
}

/* ---------- tables ---------- */

.p42-skin .table > thead > tr > th {
	border-bottom: 2px solid var(--p42-border);
	color: var(--p42-text-muted);
	font-size: 11px;
	font-weight: 600;
	letter-spacing: .08em;
	text-transform: uppercase;
}

.p42-skin .table > tbody > tr > td,
.p42-skin .table > tbody > tr > th {
	border-top: 1px solid var(--p42-border-soft);
	padding: 10px 12px;
}

.p42-skin .table-hover > tbody > tr:hover {
	background: var(--p42-surface-hover);
}

/* ---------- labels / badges ---------- */

.p42-skin .label,
.p42-skin .badge {
	border-radius: var(--p42-r-pill);
	padding: 3px 10px;
	font-weight: 600;
	letter-spacing: .01em;
}

.p42-skin .label-default { background: var(--p42-surface-soft); color: var(--p42-text-muted); }
.p42-skin .label-success { background: var(--p42-success-bg); color: var(--p42-success); }
.p42-skin .label-info    { background: var(--p42-info-bg);    color: var(--p42-info); }
.p42-skin .label-warning { background: var(--p42-warning-bg); color: var(--p42-warning); }
.p42-skin .label-danger  { background: var(--p42-danger-bg);  color: var(--p42-danger); }

/* ---------- misc chrome ---------- */

.p42-skin .nav-tabs {
	border-bottom: 1px solid var(--p42-border);
}

.p42-skin .nav-tabs > li > a {
	border: none;
	color: var(--p42-text-muted);
	font-weight: 600;
}

.p42-skin .nav-tabs > li.active > a,
.p42-skin .nav-tabs > li.active > a:hover,
.p42-skin .nav-tabs > li.active > a:focus {
	color: var(--p42-text-strong);
	background: transparent;
	border: none;
	box-shadow: inset 0 -2px 0 var(--p42-teal);
}

.p42-skin hr {
	border-top-color: var(--p42-border-soft);
}

/* ---------- file inputs (-webkit- form kept: ::file-selector-button needs Chrome 89) ---------- */

.p42-skin input[type="file"] {
	display: block;
	width: 100%;
	max-width: 460px;
	padding: 6px;
	color: var(--p42-text-muted);
	background: var(--p42-surface);
	border: 1px solid var(--p42-border);
	border-radius: var(--p42-r-md);
	font-size: 13px;
	line-height: 1.6;
	cursor: pointer;
}

.p42-skin input[type="file"]:focus {
	outline: none;
	border-color: var(--p42-teal);
	box-shadow: var(--p42-focus-ring);
}

.p42-skin input[type="file"]::-webkit-file-upload-button {
	margin-right: 10px;
	padding: 7px 14px;
	color: var(--p42-text);
	background: var(--p42-surface-soft);
	border: 1px solid var(--p42-border);
	border-radius: var(--p42-r-sm);
	font-family: inherit;
	font-size: 13px;
	font-weight: 600;
	cursor: pointer;
	-webkit-appearance: none;
	appearance: none;
}

.p42-skin input[type="file"]:hover::-webkit-file-upload-button {
	background: var(--p42-surface-hover);
}

.p42-skin input[type="file"]::file-selector-button {
	margin-right: 10px;
	padding: 7px 14px;
	color: var(--p42-text);
	background: var(--p42-surface-soft);
	border: 1px solid var(--p42-border);
	border-radius: var(--p42-r-sm);
	font-family: inherit;
	font-size: 13px;
	font-weight: 600;
	cursor: pointer;
	appearance: none;
}

.p42-skin input[type="file"]:hover::file-selector-button {
	background: var(--p42-surface-hover);
}

/* ---------- modals: global, most of them render outside the page wrapper ---------- */

body .modal-content {
	background: var(--p42-surface);
	border: 1px solid var(--p42-border-soft);
	border-radius: var(--p42-r-lg);
	box-shadow: var(--p42-shadow-md);
}

/* no overflow:hidden, it would clip select2 and datepickers; the header rounds its own corners */
body .modal-header {
	background: var(--p42-primary);
	border-bottom: 0;
	border-radius: calc(var(--p42-r-lg) - 1px) calc(var(--p42-r-lg) - 1px) 0 0;
	padding: 16px 20px;
}

/* older modals put their header in a block: same rounded top corners */
body .modal-content > .block:first-child > .block-header:first-child {
	border-radius: calc(var(--p42-r-lg) - 1px) calc(var(--p42-r-lg) - 1px) 0 0;
}

body .modal-header .modal-title,
body .modal-header .modal-title.text-white,
body .modal-header h4,
body .modal-header i {
	color: #fff;
	font-weight: 600;
	letter-spacing: -0.01em;
}

/* Meaning keeps its colour: these say something the primary fill does not. */
body .modal-header.bg-danger {
	background: var(--p42-danger);
}

body .modal-header.bg-warning {
	background: var(--p42-warning);
}

body .modal-header.bg-info {
	background: var(--p42-info);
}

/* The few headers with no fill class stay light, so their dark title still reads. */
body .modal-header.bg-gray-light,
body .modal-header.bg-gray-lighter {
	background: var(--p42-surface-soft);
	border-bottom: 1px solid var(--p42-border-soft);
}

body .modal-header.bg-gray-light .modal-title,
body .modal-header.bg-gray-lighter .modal-title,
body .modal-header.bg-gray-light i,
body .modal-header.bg-gray-lighter i {
	color: var(--p42-text-strong);
}

body .modal-header .close {
	color: #fff;
	opacity: 0.7;
	text-shadow: none;
	transition: opacity var(--p42-ease);
}

body .modal-header .close:hover,
body .modal-header .close:focus {
	color: #fff;
	opacity: 1;
}

body .modal-body {
	padding: 20px;
}

/* not flex: a float is ignored on a flex item and pull-left Cancel buttons would move */
body .modal-footer {
	background: var(--p42-surface);
	border-top: 1px solid var(--p42-border-soft);
	padding: 16px 20px;
}

body .modal-footer .btn + .btn {
	margin-left: var(--p42-2);
}

/* ---------- SweetAlert v1: global, it appends to body; .sa-icon geometry left alone ---------- */

/* the backdrop is appended to body, so this cannot be scoped either */
body .modal-backdrop,
body .modal-backdrop.in {
	background: var(--p42-indigo-deep);
	opacity: 0.55;
}

/* dim through the colour: SweetAlert writes an inline opacity on the overlay */
body .sweet-overlay {
	background: rgba(21, 28, 61, .55);
}

body .sweet-alert {
	background: var(--p42-surface);
	border: 1px solid var(--p42-border-soft);
	border-radius: var(--p42-r-lg);
	box-shadow: var(--p42-shadow-md);
	padding: var(--p42-6) var(--p42-6) var(--p42-5);
}

body .sweet-alert h2 {
	color: var(--p42-text-strong);
	font-size: 20px;
	font-weight: 600;
	letter-spacing: -0.01em;
	line-height: 1.3;
	margin: 0 0 var(--p42-2);
	padding: 0;
}

body .sweet-alert p {
	color: var(--p42-text-muted);
	font-size: 14px;
	font-weight: 400;
	line-height: 1.5;
}

body .sweet-alert button {
	border: 1px solid transparent;
	border-radius: var(--p42-r-md);
	box-shadow: none;
	font-size: 14px;
	font-weight: 600;
	margin: var(--p42-4) var(--p42-1) 0;
	padding: 10px 20px;
	transition: filter var(--p42-ease), background-color var(--p42-ease);
}

/* default only: a confirmButtonColor passed in code still wins */
body .sweet-alert button.confirm {
	background: var(--p42-primary);
	color: #fff;
}

body .sweet-alert button.confirm:hover,
body .sweet-alert button.cancel:hover {
	filter: brightness(1.06);
}

body .sweet-alert button.cancel {
	background: var(--p42-surface);
	border-color: var(--p42-border);
	color: var(--p42-text);
}

body .sweet-alert button:focus {
	box-shadow: var(--p42-focus-ring);
	outline: none;
}

/* The type:"input" variant. */
body .sweet-alert input {
	border: 1px solid var(--p42-border);
	border-radius: var(--p42-r-md);
	box-shadow: none;
	color: var(--p42-text);
	font-size: 14px;
	height: 40px;
	margin-top: var(--p42-3);
	padding: 0 12px;
	transition: border-color var(--p42-ease), box-shadow var(--p42-ease);
}

body .sweet-alert input:focus {
	border-color: var(--p42-teal);
	box-shadow: var(--p42-focus-ring);
	outline: none;
}

body .sweet-alert .sa-input-error::before,
body .sweet-alert .sa-input-error::after {
	background: var(--p42-danger);
}

body .sweet-alert .sa-error-container p {
	color: var(--p42-danger);
}

/* me.swalButtons() sets the fill inline, so only the shape is styled here */
body .sweet-alert.swal-with-buttons button {
	margin: var(--p42-2) var(--p42-1) 0;
	min-width: 96px;
}

@media (prefers-reduced-motion: reduce) {
	body .showSweetAlert[data-animation=pop],
	body .hideSweetAlert[data-animation=pop] {
		animation: none;
	}
}

/* ---------- data tables (37 pages) ---------- */

.p42-skin .table > thead > tr > th {
	background: var(--p42-surface-soft);
}

/* The sorted column should be obvious without reading the arrow. */
.p42-skin table.dataTable > thead > tr > th.sorting_asc,
.p42-skin table.dataTable > thead > tr > th.sorting_desc {
	background: var(--p42-primary-wash);
	color: var(--p42-primary-ink);
}

.p42-skin table.dataTable > thead > tr > th.sorting_asc:after,
.p42-skin table.dataTable > thead > tr > th.sorting_desc:after {
	opacity: 1;
}

/* A sortable header is a control, so say so on hover. */
.p42-skin table.dataTable > thead > tr > th.sorting {
	cursor: pointer;
}

.p42-skin table.dataTable > thead > tr > th.sorting:hover {
	color: var(--p42-text-strong);
}

.p42-skin table.dataTable > thead > tr > th.sorting:hover:after {
	opacity: 0.6;
}

/* rows in a sortable table are scannable, so give them a hover target */
.p42-skin table.dataTable > tbody > tr:hover {
	background: var(--p42-surface-hover);
}

/* soft and low-contrast, per the design language */
.p42-skin .table-bordered,
.p42-skin .table-bordered > thead > tr > th,
.p42-skin .table-bordered > tbody > tr > td,
.p42-skin .table-bordered > tbody > tr > th,
.p42-skin .table-bordered > tfoot > tr > td {
	border-color: var(--p42-border-soft);
}

.p42-skin .table-striped > tbody > tr:nth-of-type(odd) {
	background: var(--p42-surface-soft);
}

/* Striping and hover both set a background; hover has to win. */
.p42-skin .table-striped > tbody > tr:nth-of-type(odd):hover {
	background: var(--p42-surface-hover);
}

/* ---- the chrome around the table ---- */

.p42-skin .dataTables_info {
	color: var(--p42-text-muted);
	font-size: 13px;
	padding-top: var(--p42-4);
}

.p42-skin .dataTables_length select,
.p42-skin .dataTables_filter input {
	border: 1px solid var(--p42-border);
	border-radius: var(--p42-r-md);
	box-shadow: none;
	color: var(--p42-text);
	height: 40px;
	padding: 0 12px;
	transition: border-color var(--p42-ease), box-shadow var(--p42-ease);
}

.p42-skin .dataTables_length select:focus,
.p42-skin .dataTables_filter input:focus {
	border-color: var(--p42-teal);
	box-shadow: var(--p42-focus-ring);
	outline: none;
}

.p42-skin .dataTables_paginate {
	padding-top: var(--p42-3);
}

.p42-skin .pagination > li > a,
.p42-skin .pagination > li > span {
	background: var(--p42-surface);
	border: 1px solid var(--p42-border-soft);
	color: var(--p42-text);
	font-size: 13px;
	font-weight: 600;
	margin-left: var(--p42-1);
	padding: 8px 13px;
	transition: background-color var(--p42-ease), border-color var(--p42-ease);
}

/* Bootstrap rounds only the outer two; every item is its own button here. */
.p42-skin .pagination > li:first-child > a,
.p42-skin .pagination > li:last-child > a,
.p42-skin .pagination > li > a,
.p42-skin .pagination > li > span {
	border-radius: var(--p42-r-sm);
}

.p42-skin .pagination > li > a:hover,
.p42-skin .pagination > li > a:focus {
	background: var(--p42-surface-hover);
	border-color: var(--p42-border);
	color: var(--p42-text-strong);
}

.p42-skin .pagination > li.active > a,
.p42-skin .pagination > li.active > a:hover,
.p42-skin .pagination > li.active > a:focus,
.p42-skin .pagination > li.active > span {
	background: var(--p42-primary);
	border-color: var(--p42-primary);
	color: #fff;
}

.p42-skin .pagination > li.disabled > a,
.p42-skin .pagination > li.disabled > a:hover,
.p42-skin .pagination > li.disabled > span {
	background: var(--p42-surface);
	border-color: var(--p42-border-soft);
	color: var(--p42-text-subtle);
	cursor: not-allowed;
}

/* One empty state instead of a bare row of nothing. */
.p42-skin .table > tbody > tr > td.dataTables_empty {
	color: var(--p42-text-muted);
	font-size: 14px;
	padding: var(--p42-10) var(--p42-5);
	text-align: center;
}

/* ---------- dense data pages ---------- */

.p42-skin .table > tbody > tr > td.h4 {
	font-size: 15px;
	line-height: 1.35;
	margin: 0;
}

/* fa-2x in a table cell is 28px of glyph in a 14px row. */
.p42-skin .table i.fa-2x {
	font-size: 20px;
}

/* ---- icon buttons in a cell: text-less dropdown toggles ---- */
.p42-skin .table .btn {
	padding: 6px 10px;
}

.p42-skin .table .btn i.fa-2x {
	font-size: 15px;
}

.p42-skin .table .btn-group > .btn + .btn,
.p42-skin .table .btn + .btn {
	margin-left: var(--p42-1);
}

/* ---------- header filter row ---------- */

.p42-skin .block-header .block-options-simple {
	align-items: center;
	row-gap: var(--p42-2);
	/* full-width flex, not inline-flex */
	display: flex;
	flex-wrap: wrap;
	gap: var(--p42-1);
}

.p42-skin .block-header .block-options-simple > a {
	align-items: center;
	border-radius: var(--p42-r-sm);
	display: inline-flex;
	justify-content: center;
	margin: 0;
	min-height: 36px;
	min-width: 36px;
	padding: 0;
	transition: background-color var(--p42-ease);
}

.p42-skin .block-header .block-options-simple > a:hover {
	background: var(--p42-primary-wash);
}

.p42-skin .block-header .block-options-simple i.fa-2x {
	font-size: 24px;
}

/* groups the row into product types, plants, stock and status, and actions */
.p42-skin .block-header .block-options-simple .p42-icon-sep {
	/* a hairline as tall as the glyphs, spaced to read as a divider */
	align-self: center;
	background: var(--p42-border);
	flex: 0 0 1px;
	height: 22px;
	margin: 0 var(--p42-2);
	width: 1px;
}

/* The one separator that splits the left half of the toolbar from the right. */
.p42-skin .block-header .block-options-simple .p42-icon-sep--push {
	margin-left: auto;
}

/* neutral actions take one muted tone */
.p42-skin .block-header .block-options-simple .p42-icon-util {
	color: var(--p42-text-subtle);
}

.p42-skin .block-header .block-options-simple .p42-icon-util:hover {
	color: var(--p42-text);
}

.p42-skin .block-header .block-options-simple .p42-icon-sep + .p42-icon-sep,
.p42-skin .block-header .block-options-simple .p42-icon-sep:first-child,
.p42-skin .block-header .block-options-simple .p42-icon-sep:last-child {
	display: none;
}

/* the selected filter was marked with a thick olive underline */
.p42-skin .icon-highlight {
	align-items: center;
	background: var(--p42-primary-wash);
	border-bottom: 0;
	border-radius: var(--p42-r-sm);
	box-shadow: inset 0 0 0 1px var(--p42-primary);
	display: inline-flex;
	justify-content: center;
	min-height: 36px;
	min-width: 36px;
	padding: 0;
}

/* ---------- search + rows-per-page ---------- */

/* Bootstrap's .row clearfix pseudo-elements become flex items and push the controls inward */
.p42-skin .searchContainer::before,
.p42-skin .searchContainer::after {
	display: none;
}

/* the search row carries the page actions on the left and the search controls on the right */
.p42-skin .searchContainer {
	align-items: center;
	display: flex;
	flex-wrap: wrap;
	gap: var(--p42-3);
	justify-content: space-between;
	margin-left: 0;
	margin-right: 0;
}

.p42-skin .searchContainer .p42-row-actions {
	display: flex;
	flex-wrap: wrap;
	gap: var(--p42-2);
}

/* the bulk-edit strip only has content in bulk mode */
.p42-skin .searchContainer > div.bulk-head:empty,
.p42-skin .searchContainer > div.bulk-head {
	flex: 1 1 auto;
	padding-left: 0;
	padding-right: 0;
	width: auto;
}

/* the search form sizes to its contents instead of a quarter-width grid column */
.p42-skin .searchContainer > div.pull-right {
	float: none;
	width: auto;
}

.p42-skin .searchContainer #form-search {
	display: flex;
	flex-wrap: wrap;
	gap: var(--p42-2);
	justify-content: flex-end;
}

.p42-skin .searchContainer #form-search > div {
	float: none;
	padding-left: 0;
	padding-right: 0;
	width: auto;
}

.p42-skin .searchContainer #form-search input[name="term"] {
	min-width: 240px;
}

.p42-skin .searchContainer #form-search select[name="length"],
.p42-skin .searchContainer #form-search select[name="license_type"] {
	width: auto;
}

@media (max-width: 767px) {
	.p42-skin .searchContainer > div.pull-right {
		width: 100%;
	}

	.p42-skin .searchContainer #form-search {
		justify-content: stretch;
	}

	.p42-skin .searchContainer #form-search > div {
		flex: 1 1 100%;
	}

	.p42-skin .searchContainer #form-search input[name="term"] {
		min-width: 0;
		width: 100%;
	}
}

/* ---------- page head ---------- */

/* on a card: the page background is each user's pick, dark ones included */
.p42-skin .p42-page-head {
	align-items: center;
	background: var(--p42-surface);
	border: 1px solid var(--p42-border-soft);
	border-radius: var(--p42-r-lg);
	box-shadow: var(--p42-shadow-xs);
	display: flex;
	flex-wrap: wrap;
	gap: var(--p42-3);
	justify-content: space-between;
	margin-bottom: var(--p42-4);
	padding: 16px 20px;
}

.p42-skin .p42-page-title {
	color: var(--p42-text-strong);
	font-size: 24px;
	font-weight: 600;
	letter-spacing: -0.02em;
	line-height: 1.2;
	margin: 0;
}

.p42-skin .p42-page-title i {
	color: var(--p42-primary);
	margin-right: var(--p42-2);
}

.p42-skin .p42-page-actions {
	display: flex;
	flex-wrap: wrap;
	gap: var(--p42-2);
}

/* no push-right separator at the start of a wrapped line */
.p42-skin .block-header .block-options-simple .p42-icon-sep--push:first-child {
	display: none;
}

/* with the title lifted out, the filter row is the only thing in the panel header */
.p42-skin .block > .block-header .block-options-simple {
	float: none;
	margin: 0;
}

/* ---------- narrow screens ---------- */

@media (max-width: 1199px) {
	.p42-skin .dataTables_wrapper {
		-webkit-overflow-scrolling: touch;
		overflow-x: auto;
	}

	/* dataTables forces an inline width on the table */
	.p42-skin .dataTables_wrapper > table.dataTable {
		min-width: 760px;
	}
}

@media (max-width: 767px) {
	/* Stack the row: actions, then the search controls, each full width. */
	.p42-skin .searchContainer {
		gap: var(--p42-2);
	}

	/* explicit order on phones (products.php used column-reverse): search, actions, bulk strip */
	.p42-skin .searchContainer {
		flex-direction: column;
	}

	.p42-skin .searchContainer > div.pull-right {
		order: 1;
	}

	.p42-skin .searchContainer .p42-row-actions {
		order: 2;
	}

	.p42-skin .searchContainer > div.bulk-head {
		order: 3;
	}

	.p42-skin .searchContainer .p42-row-actions,
	.p42-skin .searchContainer > div.pull-right {
		flex: 1 1 100%;
		width: 100%;
	}

	.p42-skin .searchContainer .p42-row-actions .btn {
		flex: 1 1 auto;
	}

	/* the filter toolbar is a lot of targets on a phone */
	.p42-skin .block-header .block-options-simple {
		justify-content: flex-start;
	}

	.p42-skin .block-header .block-options-simple .p42-icon-sep--push {
		margin-left: 0;
	}

	.p42-skin .p42-page-title {
		font-size: 20px;
	}

	/* A table cell's own padding is most of the width at this size. */
	.p42-skin .table > tbody > tr > td,
	.p42-skin .table > thead > tr > th {
		padding-left: 8px;
		padding-right: 8px;
	}
}

/* ---------- column chooser ---------- */

.p42-skin .p42-colpick {
	display: inline-block;
	position: relative;
}

.p42-skin .p42-colpick__list {
	background: var(--p42-surface);
	border: 1px solid var(--p42-border-soft);
	border-radius: var(--p42-r-md);
	box-shadow: var(--p42-shadow-md);
	left: 0;
	max-height: 60vh;
	min-width: 200px;
	overflow-y: auto;
	padding: var(--p42-2);
	position: absolute;
	top: calc(100% + 6px);
	z-index: 1010;
}

.p42-skin .p42-colpick__row {
	align-items: center;
	border-radius: var(--p42-r-sm);
	cursor: pointer;
	display: flex;
	font-weight: 400;
	gap: var(--p42-2);
	margin: 0;
	padding: 6px 8px;
	white-space: nowrap;
}

.p42-skin .p42-colpick__row:hover {
	background: var(--p42-surface-hover);
}

.p42-skin .p42-colpick__row input {
	margin: 0;
}

.p42-skin .p42-colpick__reset {
	background: none;
	border: 0;
	border-top: 1px solid var(--p42-border-soft);
	color: var(--p42-primary);
	cursor: pointer;
	display: block;
	font-size: 13px;
	font-weight: 600;
	margin-top: var(--p42-1);
	padding: 8px;
	text-align: left;
	width: 100%;
}

/* ---------- table fills its panel ---------- */

.p42-skin .dataTables_wrapper > table.dataTable {
	width: 100%;
}

/* ---------- dense tables ---------- */

.p42-skin .p42-table-dense > thead > tr > th,
.p42-skin .p42-table-dense > tbody > tr > td,
.p42-skin .p42-table-dense > tbody > tr > th {
	padding-left: 7px;
	padding-right: 7px;
}

/* ---------- header and sidebar (global: both render outside every page wrapper); colour, border, radius, spacing only ---------- */

#header-navbar {
	background-color: var(--p42-header-bg);
	/* a colour edge along the bottom, the sidebar's teal to purple turned sideways */
	background-image: var(--p42-header-edge);
	background-repeat: no-repeat;
	background-position: left bottom;
	background-size: 100% var(--p42-header-edge-size);
	border-bottom: 0;
	box-shadow: var(--p42-header-shadow);
	min-height: 64px;
	-webkit-backdrop-filter: blur(12px);
	backdrop-filter: blur(12px);
}

/* the fixed header grew from 60px to 64px: keep the page content below it */
.header-navbar-fixed #main-container {
	padding-top: 64px;
}

/* header buttons are soft filled surfaces with a hairline edge; the colour stays in the icon and the label */
#header-navbar .nav-header .btn {
	background-color: var(--p42-header-btn-bg);
	border-color: var(--p42-header-btn-border);
	box-shadow: var(--p42-shadow-xs);
}

#header-navbar .nav-header .btn:hover,
#header-navbar .nav-header .btn:focus,
#header-navbar .nav-header .open > .btn {
	background-color: var(--p42-header-btn-hover);
	border-color: var(--p42-primary);
}

/* pressed: a deeper wash and an inset shadow, so a press reads differently from a hover */
#header-navbar .nav-header .btn:active {
	background-color: var(--p42-header-btn-active);
	border-color: var(--p42-primary-strong);
	box-shadow: var(--p42-shadow-pressed);
}

/* OneUI whitens a lit coloured button for its solid fill; on the pale wash the icon keeps its colour */
#header-navbar .nav-header .btn-primary:hover,
#header-navbar .nav-header .btn-primary:focus,
#header-navbar .nav-header .btn-primary:active,
#header-navbar .nav-header .open > .btn-primary {
	color: #690D70;
}

#header-navbar .nav-header .btn-success:hover,
#header-navbar .nav-header .btn-success:focus,
#header-navbar .nav-header .btn-success:active,
#header-navbar .nav-header .open > .btn-success {
	color: #6FC022;
}

#header-navbar .nav-header .btn-info:hover,
#header-navbar .nav-header .btn-info:focus,
#header-navbar .nav-header .btn-info:active,
#header-navbar .nav-header .open > .btn-info {
	color: #6638AE;
}

#header-navbar .nav-header .btn-warning:hover,
#header-navbar .nav-header .btn-warning:focus,
#header-navbar .nav-header .btn-warning:active,
#header-navbar .nav-header .open > .btn-warning {
	color: #D6C426;
}

/* a lone button is rounded all round; a button group stays joined, only its outer corners rounded */
#header-navbar .nav-header > li > .btn {
	border-radius: var(--p42-header-btn-radius);
}

#header-navbar .nav-header .btn-group > .btn {
	border-radius: 0;
}

#header-navbar .nav-header .btn-group > .btn:first-child {
	border-top-left-radius: var(--p42-header-btn-radius);
	border-bottom-left-radius: var(--p42-header-btn-radius);
}

#header-navbar .nav-header .btn-group > .btn:last-child,
#header-navbar .nav-header .btn-group > .dropdown-toggle {
	border-top-right-radius: var(--p42-header-btn-radius);
	border-bottom-right-radius: var(--p42-header-btn-radius);
}

/* icons follow their button's colour; the spinning alert stars keep theirs on purpose */
#header-navbar .btn i:not([class*="fa-spin"]) {
	color: inherit;
}

/* the sidebar wears the footer's ground, glows and pale text (inc/views/base_footer.php) */
#sidebar {
	background-color: var(--p42-frame-ground);
	border: 0;
}

/* 3px accent along the left edge, on the content so the collapsed rail keeps it */
#sidebar .sidebar-content {
	position: relative;
	min-height: 100vh;
	background: var(--p42-frame-backdrop);
}

#sidebar .sidebar-content::before {
	content: "";
	position: absolute;
	top: 0;
	bottom: 0;
	left: 0;
	width: 3px;
	z-index: 1;
	background: var(--p42-frame-edge);
	pointer-events: none;
}

#sidebar .side-header.bg-white {
	background-color: transparent;
}

/* The logo with its name (light text for the dark frame); the icon rail keeps the swirl only */
#sidebar .side-logo {
	display: inline-block;
	overflow: hidden;
	vertical-align: top;
}

#sidebar .side-logo img {
	height: 40px;
}

.sidebar-o.sidebar-mini #sidebar:not(:hover) .side-logo {
	width: 40px;
}

#sidebar .nav-main .nav-main-heading {
	font-size: 11px;
	font-weight: 700;
	letter-spacing: .06em;
	color: var(--p42-frame-label);
}

#sidebar .nav-main a {
	color: var(--p42-frame-text);
}

#sidebar .nav-main a > i {
	color: var(--p42-frame-icon);
}

#sidebar .nav-main a:hover,
#sidebar .nav-main a:focus {
	color: var(--p42-frame-text-strong);
	background-color: var(--p42-frame-hover);
}

#sidebar .nav-main a:hover > i,
#sidebar .nav-main a:focus > i {
	color: var(--p42-frame-text-strong);
}

#sidebar .nav-main a.active,
#sidebar .nav-main a.active:hover {
	color: var(--p42-frame-text-strong);
	background-color: var(--p42-nav-active-wash);
	box-shadow: inset 3px 0 0 var(--p42-nav-active);
}

#sidebar .nav-main a.active > i,
#sidebar .nav-main a.active:hover > i {
	color: var(--p42-nav-active);
}

/* admin section heads light on hover; the open one wears the active page's bar */
#sidebar .nav-main .nav-group-head > a:hover,
#sidebar .nav-main .nav-group-head > a:focus {
	background-color: var(--p42-frame-hover);
	color: var(--p42-frame-text-strong);
}

/* .no-focus removes outlines, so the keyboard ring is a shadow */
#sidebar .nav-main .nav-group-head > a:focus-visible {
	box-shadow: inset 0 0 0 2px var(--p42-nav-active);
}

#sidebar .nav-main .nav-group-head.open > a:focus-visible {
	box-shadow: inset 3px 0 0 var(--p42-nav-active), inset 0 0 0 2px var(--p42-nav-active);
}

#sidebar .nav-main .nav-group-head.open > a,
#sidebar .nav-main .nav-group-head.open > a:hover {
	background-color: var(--p42-nav-active-wash);
	box-shadow: inset 3px 0 0 var(--p42-nav-active);
	color: var(--p42-frame-text-strong);
	font-weight: 800;
}

#sidebar .nav-main .nav-group-head.open .nav-group-caret {
	color: var(--p42-nav-active);
}

/* A category reads as a tab (a band with a hairline above it); its items sit indented under a guide line */
#sidebar .nav-main .nav-group-head {
	margin-top: 4px;
	border-top: 1px solid var(--p42-frame-hairline);
	background-color: var(--p42-frame-band);
}

#sidebar .nav-main .nav-group-head > a {
	font-size: 12px;
	color: var(--p42-frame-text-strong);
}

#sidebar .nav-main li[data-nav-group] > a {
	margin-left: 14px;
	padding-left: 14px;
	border-left: 1px solid var(--p42-border-dark);
	font-size: 13px;
}

#sidebar .nav-main li[data-nav-group] > a.active,
#sidebar .nav-main li[data-nav-group] > a.active:hover {
	border-left-color: var(--p42-nav-active);
}

/* The collapsed rail shows icons only: the guide line and indent go */
.sidebar-o.sidebar-mini #sidebar:not(:hover) .nav-main li[data-nav-group] > a {
	margin-left: 0;
	padding-left: 20px;
	border-left: 0;
}

/* The rail also keeps an open section's links: same column and colour as the other icons, no submenu indent */
.sidebar-o.sidebar-mini #sidebar .nav-main > li.open > ul {
	display: block;
}

.sidebar-o.sidebar-mini #sidebar:not(:hover) .nav-main > li.open > ul {
	padding-left: 0;
}

.sidebar-o.sidebar-mini #sidebar:not(:hover) .nav-main > li.open > ul a {
	padding-left: 20px;
	color: var(--p42-frame-text-strong);
}

/* The headache button closes the side panel, under a hairline */
#sidebar .nav-main.side-foot {
	margin-top: 12px;
	border-top: 1px solid var(--p42-frame-hairline);
}

#sidebar .nav-main ul {
	background-color: var(--p42-frame-submenu);
}

#sidebar .nav-main ul a {
	color: var(--p42-frame-text);
	padding-left: 12px;
}

/* submenu links start 12px before their icon, so the active bar sits beside it, not on it */
#sidebar .nav-main > li > ul {
	padding-left: 38px;
}

#sidebar .nav-main ul a:hover,
#sidebar .nav-main ul a:focus {
	background-color: transparent;
	color: var(--p42-frame-text-strong);
}

#sidebar .nav-main a.text-warning,
#sidebar .nav-main a.text-warning > i,
#sidebar .nav-main a.text-warning:hover {
	color: var(--p42-frame-warning);
}

/* the order page Actions menu sits in a clipped toolbar, so it is fixed under the button; the card look below is shared with the header menus */
.order-page-visible-sm .p42-actions-menu {
	position: fixed;
	top: 50px;
	right: 8px;
	left: auto;
	margin-top: 0;
}

/* header dropdowns as rounded cards; scoped to the header so page dropdowns keep theirs */
#header-navbar .dropdown-menu,
.p42-actions-menu {
	border: 1px solid var(--p42-border-soft);
	border-radius: var(--p42-dropdown-radius);
	box-shadow: var(--p42-dropdown-shadow);
	padding: 6px;
	margin-top: 8px;
	max-height: calc(100vh - 62px);
	overflow-y: auto;
}

#header-navbar .dropdown-menu .dropdown-header,
.p42-actions-menu .dropdown-header {
	color: var(--p42-primary-strong);
	font-weight: 700;
	letter-spacing: .06em;
}

#header-navbar .dropdown-menu > li > a,
.p42-actions-menu > li > a {
	border-radius: var(--p42-r-sm);
}

#header-navbar .dropdown-menu > li > a:hover,
#header-navbar .dropdown-menu > li > a:focus,
.p42-actions-menu > li > a:hover,
.p42-actions-menu > li > a:focus {
	background-color: var(--p42-primary-wash);
	color: var(--p42-primary-ink);
}
