:root {
	--staffprt-primary: #e31e24;
	--staffprt-primary-hover: #c4181e;
	--staffprt-green: #07994A;
	--staffprt-light-green: rgba(14, 175, 88, 0.03);
	--staffprt-bg: #f3f5f8;
	--staffprt-card: #ffffff;
	--staffprt-text: #1e293b;
	--staffprt-muted: #8b95a5;
	--staffprt-border: #d5dce3;
	--staffprt-input: #4a5568;
	--staffprt-shadow: 0 12px 40px rgba(15, 23, 42, 0.06);
	--staffprt-radius: 16px;
	--staffprt-font: "Aptos", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
	--staffprt-bghover: rgba(116, 126, 148, 0.15);
}

*,
*::before,
*::after {
	box-sizing: border-box;
	line-height: 1;
}

html,
body {
	margin: 0;
	padding: 0;
	min-height: 100%;
}

body {
	font-family: var(--staffprt-font);
	background: var(--staffprt-bg);
	color: var(--staffprt-text);
	-webkit-font-smoothing: antialiased;
}

a {
	color: var(--staffprt-primary);
}

img {
	max-width: 100%;
	height: auto;
}

/* Brand */

.brand {
	text-align: center;
	margin-bottom: 28px;
}

.brand__row {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 12px;
}

.brand__image {
	display: block;
	max-height: 56px;
	width: auto;
}

.brand__name {
	font-size: 28px;
	font-weight: 800;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: #2d3748;
	line-height: 1;
}

.brand__tagline {
	margin: 10px 0 0;
	font-size: 11px;
	font-weight: 500;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	color: var(--staffprt-muted);
}

.panel-header .brand {
	margin: 0;
	text-align: left;
}

.panel-header .brand__row {
	justify-content: flex-start;
}

.panel-header .brand__name {
	font-size: 20px;
}

.panel-header .brand__tagline {
	text-align: left;
	font-size: 9px;
	margin-top: 6px;
}

.panel-header .brand__image {
	max-height: 40px;
}

/* Login */

.login-page {
	min-height: 100vh;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	padding: 40px 20px;
}

.login-card {
	width: 100%;
	max-width: 440px;
	background: var(--staffprt-card);
	border-radius: var(--staffprt-radius);
	box-shadow: var(--staffprt-shadow);
	padding: 48px 40px 36px;
}

.login-card__title {
	margin: 0;
	text-align: center;
	font-size: 30px;
	font-weight: 700;
	letter-spacing: -0.02em;
	color: #243044;
}

.login-card__subtitle {
	margin: 10px 0 0;
	text-align: center;
	font-size: 14px;
	line-height: 1.5;
	color: var(--staffprt-muted);
}

.login-notice {
	margin-top: 24px;
	padding: 12px 14px;
	border-radius: 10px;
	font-size: 13px;
	line-height: 1.4;
}

.login-notice--error {
	background: #fdecec;
	color: #b42318;
}

.login-notice--success {
	background: #ecfdf3;
	color: #067647;
}

.login-form {
	margin-top: 32px;
	display: flex;
	flex-direction: column;
	gap: 22px;
}

.field {
	position: relative;
}

.field__label {
	position: absolute;
	top: -8px;
	left: 16px;
	z-index: 1;
	background: var(--staffprt-card);
	padding: 0 6px;
	font-size: 12px;
	font-weight: 500;
	color: #98a2b3;
}

.field__control {
	display: flex;
	align-items: center;
	gap: 10px;
	height: 56px;
	padding: 0 16px;
	border: 1px solid var(--staffprt-border);
	border-radius: 12px;
	background: #fff;
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.field__control:focus-within {
	border-color: var(--staffprt-primary);
	box-shadow: 0 0 0 3px color-mix(in srgb, var(--staffprt-primary) 14%, transparent);
}

.field__icon {
	display: inline-flex;
	color: #98a2b3;
	flex-shrink: 0;
}

.field__input {
	flex: 1;
	width: 100%;
	height: 100%;
	border: 0;
	outline: 0;
	background: transparent;
	font: inherit;
	font-size: 15px;
	color: var(--staffprt-input);
}

.field__input::placeholder {
	color: #c0c8d2;
}

.field__toggle {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	margin: 0;
	padding: 0;
	border: 0;
	background: transparent;
	color: #98a2b3;
	cursor: pointer;
}

.field__toggle:hover {
	color: var(--staffprt-text);
}

.login-submit {
	display: flex;
	align-items: center;
	justify-content: space-between;
	width: 100%;
	height: 54px;
	margin-top: 6px;
	padding: 0 22px;
	border: 0;
	border-radius: 12px;
	background: var(--staffprt-primary);
	color: #fff;
	font: inherit;
	font-size: 16px;
	font-weight: 600;
	cursor: pointer;
	transition: background 0.15s ease, transform 0.05s ease;
}

.login-submit:hover {
	background: var(--staffprt-primary-hover);
}

.login-submit:active {
	transform: translateY(1px);
}

.login-submit__icon {
	display: inline-flex;
}

.login-footer {
	margin: 28px 0 0;
	text-align: center;
}

.login-footer a {
	font-size: 14px;
	font-weight: 500;
	color: var(--staffprt-primary);
	text-decoration: underline;
	text-underline-offset: 3px;
}

.login-footer a:hover {
	text-decoration-thickness: 2px;
}

/* Icon slots — replace text with real SVG later */

.icon-slot {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	font-size: 9px;
	font-weight: 700;
	letter-spacing: 0.02em;
	color: inherit;
	opacity: 0.85;
	white-space: nowrap;
	font-family: "Aptos Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.screen-reader-text {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

/* App shell */

.app-shell {
	display: flex;
	min-height: 100vh;
	background: #f4f5f7;
}

.app-sidebar {
	width: 120px;
	flex-shrink: 0;
	display: flex;
	flex-direction: column;
	align-items: center;
	padding: 20px 10px;
	background: #eef1f5;
	border-right: 1px solid #e4e8ee;
}

.app-sidebar__logo {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 48px;
	height: 48px;
	margin-bottom: 28px;
	text-decoration: none;
	color: var(--staffprt-primary);
}

.app-sidebar__logo-img {
	max-width: 48px;
	max-height: 48px;
	display: block;
}

.app-sidebar__logo-fallback {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	border-radius: 50%;
	background: var(--staffprt-primary);
	color: #fff;
	font-size: 18px;
	font-weight: 800;
}

.app-sidebar__nav {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 8px;
	width: 100%;
}

.app-nav__item {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 4px;
	width: 88px;
	min-height: 58px;
	padding: 10px 6px;
	color: #5b6575;
	text-decoration: none;
	transition: background 0.15s ease, color 0.15s ease;
}

/* Temporarily hide Favorites / Home — remove `.is-hidden` (+ `hidden`) to restore. */
.app-nav__item.is-hidden,
.app-nav__item[hidden] {
	display: none !important;
}

.app-nav__icon {
	display: inline-flex;
	min-height: 22px;
	align-items: center;
	justify-content: center;
	border-radius: 16px;
	padding: 4px 16px;
}

.app-nav__item.is-active .app-nav__icon,
.app-nav__item:hover .app-nav__icon {
	background: var(--staffprt-bghover);
}

.app-nav__label {
	font-weight: 600;
	line-height: 1.2;
	text-align: center;
	color: var(--staffprt-text);
	font-size: 14px;
}

.app-body {
	flex: 1;
	min-width: 0;
	display: flex;
	flex-direction: column;
}

.app-topbar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	padding: 18px 28px 8px;
}

.app-search {
	flex: 1;
	max-width: 520px;
	display: flex;
	align-items: center;
	gap: 16px;
	padding: 19px 16px;
	border-radius: 14px;
	background: #eceff3;
	color: #8b95a5;
}

.app-search input {
	flex: 1;
	border: 0;
	outline: 0;
	background: transparent;
	font: inherit;
	font-size: 14px;
	color: var(--staffprt-text);
}

.app-search input::placeholder {
	color: #9aa3b2;
}

.app-topbar__right {
	display: flex;
	align-items: center;
	gap: 12px;
}

.app-context {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	height: 57px;
	padding: 0 14px;
	border: 0;
	border-radius: 100px;
	background: #fff;
	color: #334155;
	font: inherit;
	font-size: 14px;
	font-weight: 600;
	cursor: pointer;
	border: 1px solid #CFD0D4;
}

.app-context__text {
	max-width: 110px;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.app-profile {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 57px;
	height: 57px;
	border-radius: 50%;
	background: #9FA2A9;
	color: #64748b;
	text-decoration: none;
}

.app-main {
	flex: 1;
	padding: 12px 28px 32px;
}

.app-page-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	margin-bottom: 20px;
}

.app-page-title {
	margin: 0;
	font-size: 34px;
	font-weight: 800;
	letter-spacing: -0.03em;
	color: #1e293b;
}

.app-page-actions {
	display: flex;
	align-items: center;
	gap: 10px;
	flex-wrap: wrap;
}

.btn {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	height: 42px;
	padding: 0 16px;
	border: 0;
	border-radius: 12px;
	font: inherit;
	font-size: 14px;
	font-weight: 600;
	cursor: pointer;
	text-decoration: none;
}

a.btn,
a.btn:link,
a.btn:visited,
a.btn:hover,
a.btn:active,
a.btn:focus {
	text-decoration: none;
}

.btn--dark {
	background: #2f3a4a;
	color: #fff;
}

.btn--dark:hover {
	background: #243041;
}

.btn--muted {
	background: #e8ebf0;
	color: #334155;
}

.btn--muted:hover {
	background: #dde2e9;
}

.btn__icon {
	display: inline-flex;
}

/* Stat cards */

.stat-grid {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 16px;
	margin-bottom: 16px;
}

.stat-card {
	background: #fff;
	border-radius: 18px;
	box-shadow: 0 8px 24px rgba(15, 23, 42, 0.04);
	padding: 20px 22px 18px;
}

.stat-card__flex {
	display: flex;
	align-items: center;
	gap: 6px;
}

.stat-card__icon {
	display: inline-flex;
	color: #64748b;
}

.stat-card__icon--danger {
	color: #ED1C24;
}

.stat-card__icon--warning {
	color: #f59a1a;
}

.stat-card__label {
	margin: 0;
	font-size: 16px;
	font-weight: 600;
	color: #5E6880;
}

.stat-card__label--danger {
	color: #ED1C24;
}

.stat-card__label--warning {
	color: #f59a1a;
}

.stat-card__value {
	margin: 6px 0 14px;
	font-size: 36px;
	font-weight: 800;
	letter-spacing: -0.03em;
	line-height: 1;
	color: #1e293b;
}

.stat-card__value--danger {
	color: #ED1C24;
}

.stat-card__value--warning {
	color: #f59a1a;
}

.stat-card__meta {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	margin: 0;
	padding: 6px 10px;
	border-radius: 999px;
	background: #eef1f5;
	font-size: 12px;
	font-weight: 600;
	color: #64748b;
}

.stat-card__meta--success {
	background: #e8f8ef;
	color: #1f9d57;
}

.stat-card__meta--danger {
	background: #fde8ea;
	color: #ED1C24;
}

.stat-card__meta--warning {
	background: #fff1df;
	color: #e08a12;
}

.stat-card__meta-icon {
	display: inline-flex;
}

/* Bottom columns */

.dash-columns {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 16px;
}

.dash-card {
	background: #fff;
	border-radius: 18px;
	box-shadow: 0 8px 24px rgba(15, 23, 42, 0.04);
	padding: 22px 24px 18px;
}

.dash-card__head {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 12px;
	margin-bottom: 18px;
}

.dash-card__title {
	margin: 0;
	font-size: 20px;
	font-weight: 800;
	color: #1e293b;
}

.dash-card__subtitle {
	margin: 4px 0 0;
	font-size: 13px;
	color: #94a3b8;
}

.dash-card__link {
	font-size: 14px;
	font-weight: 600;
	color: #334155;
	text-decoration: underline;
	text-underline-offset: 3px;
}

.workflow {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 0;
	position: relative;
}

.workflow::before {
	content: "";
	position: absolute;
	left: 19px;
	top: 18px;
	bottom: 18px;
	width: 2px;
	background: #e8edf2;
}

.workflow__item {
	display: grid;
	grid-template-columns: 40px 1fr auto;
	align-items: center;
	gap: 14px;
	padding: 10px 0;
	position: relative;
}

.workflow__icon {
	position: relative;
	z-index: 1;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	border-radius: 12px;
	background: #eef1f5;
	color: #64748b;
}

.workflow__icon--danger {
	background: #fde8ea;
	color: #ED1C24;
}

.workflow__icon--warning {
	background: #fff1df;
	color: #f59a1a;
}

.workflow__icon--info {
	background: #e8eef8;
	color: #3b82f6;
}

.workflow__body {
	display: flex;
	flex-direction: column;
	gap: 5px;
	min-width: 0;
}

.workflow__title {
	font-size: 15px;
	font-weight: 700;
	color: #1e293b;
}

.workflow__desc {
	font-size: 13px;
	color: #94a3b8;
}

.workflow__count {
	font-size: 18px;
	font-weight: 800;
	color: #1e293b;
}

.supplier-list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 16px;
}

.supplier {
	display: grid;
	grid-template-columns: 44px 1fr minmax(110px, 140px);
	align-items: center;
	gap: 12px;
}

.supplier__avatar {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	border-radius: 12px;
	background: #e8ebf0;
	color: #64748b;
	font-size: 13px;
	font-weight: 700;
}

.supplier__info {
	display: flex;
	flex-direction: column;
	gap: 5px;
	min-width: 0;
}

.supplier__name {
	font-size: 15px;
	font-weight: 700;
	color: #1e293b;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.supplier__meta {
	font-size: 13px;
	color: #94a3b8;
}

.supplier__track {
	display: flex;
	flex-direction: column;
	align-items: flex-end;
	gap: 8px;
}

.supplier__badge {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 64px;
	padding: 4px 10px;
	border-radius: 999px;
	font-size: 12px;
	font-weight: 700;
}

.supplier__badge--high {
	background: #e8f8ef;
	color: #1f9d57;
}

.supplier__badge--medium {
	background: #fff1df;
	color: #e08a12;
}

.supplier__badge--low {
	background: #fde8ea;
	color: #ED1C24;
}

.supplier__bar {
	display: block;
	width: 100%;
	height: 6px;
	border-radius: 999px;
	background: #eef1f5;
	overflow: hidden;
}

.supplier__fill {
	display: block;
	height: 100%;
	border-radius: inherit;
}

.supplier__fill--high {
	background: #22c55e;
}

.supplier__fill--medium {
	background: #f59a1a;
}

.supplier__fill--low {
	background: #ED1C24;
}

@media (max-width: 1100px) {
	.stat-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.dash-columns {
		grid-template-columns: 1fr;
	}
}

@media (max-width: 860px) {
	.app-shell {
		flex-direction: column;
	}

	.app-sidebar {
		width: 100%;
		flex-direction: row;
		justify-content: space-between;
		padding: 12px 16px;
	}

	.app-sidebar__logo {
		margin: 0;
	}

	.app-sidebar__nav {
		flex-direction: row;
		width: auto;
		gap: 4px;
	}

	.app-nav__item {
		width: auto;
		min-width: 58px;
		min-height: 52px;
	}

	.app-topbar,
	.app-main {
		padding-left: 16px;
		padding-right: 16px;
	}

	.app-page-head {
		flex-direction: column;
		align-items: flex-start;
	}

	.app-page-title {
		font-size: 28px;
	}

	.supplier {
		grid-template-columns: 40px 1fr;
	}

	.supplier__track {
		grid-column: 2;
		align-items: stretch;
	}
}

@media (max-width: 640px) {
	.login-card {
		padding: 36px 22px 28px;
	}

	.login-card__title {
		font-size: 24px;
	}

	.stat-grid {
		grid-template-columns: 1fr;
	}

	.app-search {
		max-width: none;
	}

	.app-context__text {
		display: none;
	}
}

/* Inventory */

[hidden] {
	display: none !important;
}

.btn--outline {
	background: #fff;
	color: #1e293b;
	border: 1px solid #d8dde5;
}

.btn--outline:hover {
	background: #f6f8fa;
}

.btn--sm {
	height: 36px;
	padding: 0 14px;
	font-size: 13px;
}

.inv-tabs {
	display: flex;
	align-items: center;
	gap: 22px;
	margin-bottom: 18px;
	border-bottom: 1px solid #e4e8ee;
}

.inv-tab {
	position: relative;
	padding: 0 2px 10px;
	font-size: 14px;
	font-weight: 600;
	color: #64748b;
	text-decoration: none;
}

.inv-tab:hover {
	color: #1e293b;
}

.inv-tab.is-active {
	color: var(--staffprt-primary);
}

.inv-tab.is-active::after {
	content: "";
	position: absolute;
	left: 0;
	right: 0;
	bottom: -1px;
	height: 2px;
	background: var(--staffprt-primary);
	border-radius: 2px;
}

.inv-card {
	background: #fff;
	border-radius: 18px;
	box-shadow: 0 8px 24px rgba(15, 23, 42, 0.04);
	padding: 22px 24px 16px;
}

.inv-card__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	margin-bottom: 18px;
}

.inv-card__actions {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: flex-end;
	gap: 8px;
}

.inv-card__actions .btn.is-active {
	border-color: #ed1c24;
	color: #ed1c24;
	background: #fff5f5;
}

.parts-table__number .dup-count {
	display: inline-block;
	margin-left: 6px;
	padding: 1px 6px;
	border-radius: 999px;
	background: #fee2e2;
	color: #b91c1c;
	font-size: 11px;
	font-weight: 600;
	line-height: 1.4;
	vertical-align: middle;
}

.inv-card__title {
	margin: 0;
	font-size: 18px;
	font-weight: 700;
	color: #1e293b;
}

.inv-card__note {
	margin: 0;
	color: var(--staffprt-muted);
	line-height: 1.6;
	margin-bottom: 12px;
}

.inv-filters {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 10px;
	margin-bottom: 8px;
}

.inv-search {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	width: 100%;
	max-width: 260px;
	height: 40px;
	padding: 0 14px;
	border: 1px solid #e2e7ee;
	border-radius: 12px;
	background: #fff;
	color: #94a3b8;
}

.inv-search input {
	flex: 1;
	min-width: 0;
	border: 0;
	outline: 0;
	background: transparent;
	font: inherit;
	font-size: 13px;
	color: var(--staffprt-text);
	height: 40px;
}

.pills {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
}

.pill {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	height: 40px;
	padding: 0 22px;
	border: 1px solid #e2e7ee;
	border-radius: 999px;
	background: #fff;
	font: inherit;
	font-size: 14px;
	font-weight: 500;
	color: #475569;
	text-decoration: none;
	cursor: pointer;
	transition: border-color 0.15s ease, color 0.15s ease, background 0.15s ease;
}

a.pill,
a.pill:link,
a.pill:visited,
a.pill:hover,
a.pill:active {
	color: #475569;
	text-decoration: none;
}

.pill:hover {
	border-color: #c9d2dd;
}

.pill.is-active {
	border-color: var(--staffprt-primary);
	color: var(--staffprt-primary);
}

a.pill.is-active,
a.pill.is-active:visited {
	color: var(--staffprt-primary);
}

.table-wrap {
	overflow-x: auto;
}

.stock-scroll-sentinel {
	height: 1px;
	pointer-events: none;
}

.stock-scroll-sentinel.is-loading {
	display: flex;
	align-items: center;
	justify-content: center;
	height: 48px;
	pointer-events: auto;
}

.stock-scroll-sentinel.is-loading::after {
	content: "";
	width: 22px;
	height: 22px;
	border: 2px solid #e2e8f0;
	border-top-color: #64748b;
	border-radius: 50%;
	animation: staffprt-spin 0.7s linear infinite;
}

.parts-table {
	width: 100%;
	border-collapse: collapse;
	font-size: 14px;
}

.parts-table th,
.parts-table td {
	padding: 14px 10px;
	text-align: left;
	vertical-align: middle;
	border-bottom: 1px solid #eef1f5;
}

.parts-table thead th {
	border-bottom: 1px solid #e4e8ee;
	font-weight: 500;
	color: #64748b;
	white-space: nowrap;
}

.parts-table tbody tr:last-child td {
	border-bottom: 0;
}

.th-sort {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 0;
	border: 0;
	background: transparent;
	font: inherit;
	font-size: 13px;
	font-weight: 500;
	color: inherit;
	cursor: pointer;
	white-space: normal;
	text-align: left;
}

.th-sort:hover,
.th-sort.is-sorted {
	color: #1e293b;
}

.th-sort__icon {
	display: inline-flex;
	color: #b6c0cd;
}

.th-sort.is-desc .th-sort__icon {
	transform: rotate(180deg);
}

.parts-table__thumb {
	width: 56px;
}

.parts-table__link {
	color: inherit;
	text-decoration: none;
}

.parts-table__link:hover {
	color: var(--staffprt-primary);
	text-decoration: underline;
}

.parts-table__link--thumb {
	display: inline-flex;
	text-decoration: none;
}

.parts-table__link--thumb:hover {
	text-decoration: none;
	opacity: 0.85;
}

.parts-table__number {
	font-weight: 700;
	color: #1e293b;
	white-space: nowrap;
}

.parts-table__action {
	width: 72px;
	text-align: right;
}

.row-actions {
	display: inline-flex;
	align-items: center;
	justify-content: flex-end;
	gap: 4px;
}

.part-thumb {
	display: block;
	width: 40px;
	height: 40px;
	border-radius: 10px;
	background: #eef1f5 radial-gradient(circle at 50% 45%, #cfd6df 0%, #eef1f5 62%);
	border: 1px solid #e4e8ee;
}

.part-thumb img {
	display: block;
	width: 100%;
	height: 100%;
	border-radius: inherit;
	object-fit: cover;
}

.part-thumb--lg {
	width: 64px;
	height: 64px;
	border-radius: 8px;
	display: flex;
	align-items: center;
	justify-content: center;
}

.stock-value {
	font-weight: 700;
	color: #1e293b;
}

.stock-value--healthy {
	color: #1f9d57;
}

.stock-value--low {
	color: #e9830a;
}

.stock-value--out {
	color: var(--staffprt-primary);
}

.status-badge {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 5px 12px;
	border-radius: 999px;
	font-size: 12px;
	font-weight: 600;
	white-space: nowrap;
	background: #eef1f5;
	color: #5e6880;
}

.status-badge--healthy {
	background: #e8f8ef;
	color: #1f9d57;
}

.status-badge--low {
	background: #fff1df;
	color: #e9830a;
}

.status-badge--out {
	background: #fde8ea;
	color: var(--staffprt-primary);
}

.status-badge--public {
	background: #e8f8ef;
	color: #1f9d57;
}

.status-badge--internal {
	background: #eef1f5;
	color: #5e6880;
}

.row-open,
.row-delete {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 28px;
	height: 28px;
	padding: 0;
	border: 0;
	border-radius: 8px;
	background: transparent;
	color: var(--staffprt-primary);
	text-decoration: none;
	cursor: pointer;
	line-height: 0;
}

.row-open:hover {
	background: color-mix(in srgb, var(--staffprt-primary) 8%, transparent);
}

.row-delete {
	color: #0f172a;
}

.row-delete:hover {
	background: color-mix(in srgb, #0f172a 8%, transparent);
}

.row-delete:disabled,
.row-delete.is-busy {
	opacity: 0.45;
	cursor: wait;
	pointer-events: none;
}

.table-empty {
	margin: 0;
	padding: 28px 0;
	text-align: center;
	color: var(--staffprt-muted);
}

/* Table loading / error state */
.table-state {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 12px;
	padding: 48px 24px;
}

.table-state[hidden] {
	display: none;
}

.table-state__msg {
	margin: 0;
	font-size: 14px;
	color: var(--staffprt-muted);
}

.table-state.is-error .table-state__msg {
	color: #c0392b;
}

/* Spinner */
.spinner {
	display: block;
	width: 28px;
	height: 28px;
	border: 3px solid color-mix(in srgb, var(--staffprt-primary) 25%, transparent);
	border-top-color: var(--staffprt-primary);
	border-radius: 50%;
	animation: staffprt-spin 0.7s linear infinite;
}

.table-state.is-error .spinner {
	display: none;
}

@keyframes staffprt-spin {
	to { transform: rotate(360deg); }
}

.table-foot {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding-top: 14px;
	font-size: 13px;
	color: #64748b;
}

.table-foot__per-page {
	display: inline-flex;
	align-items: center;
	gap: 8px;
}

.table-foot__per-page select {
	border: 0;
	background: transparent;
	font: inherit;
	font-weight: 600;
	color: #1e293b;
	cursor: pointer;
}

.pager {
	display: inline-flex;
	align-items: center;
	gap: 10px;
}

.pager__btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 30px;
	height: 30px;
	border: 1px solid #e2e7ee;
	border-radius: 50%;
	background: #fff;
	color: #475569;
	cursor: pointer;
}

.pager__btn:disabled {
	opacity: 0.4;
	cursor: default;
}

.pager__pages {
	font-weight: 600;
	color: #1e293b;
}

/* Part details split view */

.parts-split {
	display: grid;
	grid-template-columns: minmax(260px, 320px) minmax(0, 1fr);
	gap: 16px;
	align-items: start;
}

.parts-list-panel,
.part-panels {
	background: #fff;
	border-radius: 18px;
	box-shadow: 0 8px 24px rgba(15, 23, 42, 0.04);
	padding: 16px;
}

.parts-list-panel {
	position: sticky;
	top: 16px;
	max-height: calc(100vh - 32px);
	display: flex;
	flex-direction: column;
}

.parts-list-panel .inv-search {
	max-width: none;
}

/* List loading state */
.parts-list-state {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 10px;
	padding: 32px 16px;
}

.parts-list-state[hidden] {
	display: none;
}

/* Pagination in part list */
.parts-pager {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	padding: 8px 0 4px;
	border-top: 1px solid #f1f5f9;
	margin-top: auto;
}

.parts-pager[hidden] {
	display: none;
}

/* part-item thumb wrapper */
.part-item__thumb {
	flex-shrink: 0;
	width: 40px;
	height: 40px;
	border-radius: 8px;
	overflow: hidden;
	background: #f1f5f9;
	display: flex;
	align-items: center;
	justify-content: center;
}

.part-item__thumb img {
	width: 40px;
	height: 40px;
	object-fit: cover;
}

.part-item__badge {
	margin-left: auto;
	flex-shrink: 0;
}

/* Detail panel states */
.part-panel--placeholder,
.part-panel--loading,
.part-panel--coming-soon {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 14px;
	min-height: 320px;
	padding: 40px 32px;
	text-align: center;
	color: var(--staffprt-muted);
	font-size: 14px;
}

.part-panel--placeholder[hidden],
.part-panel--loading[hidden],
.part-panel--coming-soon[hidden] {
	display: none;
}

.coming-soon-badge {
	display: inline-block;
	padding: 4px 14px;
	border-radius: 20px;
	background: color-mix(in srgb, var(--staffprt-primary) 12%, transparent);
	color: var(--staffprt-primary);
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.04em;
	text-transform: uppercase;
}

.coming-soon__name {
	margin: 0;
	font-size: 15px;
	font-weight: 700;
	color: #1e293b;
}

.coming-soon__msg {
	margin: 0;
	max-width: 280px;
	color: #64748b;
}

.parts-total {
	margin: 12px 2px;
	font-size: 12px;
	color: #94a3b8;
}

.parts-list {
	list-style: none;
	margin: 0;
	padding: 0;
	overflow-y: auto;
	display: flex;
	flex-direction: column;
	gap: 4px;
}

.parts-list__empty {
	margin: 12px 0 0;
	text-align: center;
	color: var(--staffprt-muted);
	font-size: 13px;
}

.part-item {
	display: grid;
	grid-template-columns: 40px minmax(0, 1fr) 20px;
	align-items: center;
	gap: 10px;
	width: 100%;
	padding: 10px;
	border: 0;
	border-radius: 12px;
	background: transparent;
	font: inherit;
	text-align: left;
	cursor: pointer;
	transition: background 0.15s ease;
}

.part-item:hover {
	background: #f6f8fa;
}

.part-item.is-active {
	background: #fdeced;
}

.part-item__body {
	display: flex;
	flex-direction: column;
	gap: 2px;
	min-width: 0;
}

.part-item__name {
	font-size: 13px;
	font-weight: 700;
	color: #1e293b;
}

.part-item__desc {
	font-size: 12px;
	line-height: 1.35;
	color: #94a3b8;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.part-item__radio {
	width: 18px;
	height: 18px;
	border: 1px solid #d8dde5;
	border-radius: 50%;
	background: #fff;
}

.part-item.is-active .part-item__radio {
	border-color: var(--staffprt-primary);
	background: radial-gradient(circle, var(--staffprt-primary) 0 55%, #fff 57%);
}

.part-panels {
	padding: 20px 22px 24px;
}

.part-panel__head {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 16px;
	margin-bottom: 14px;
}

.part-panel__title {
	margin: 0;
	font-size: 16px;
	font-weight: 700;
	color: #1e293b;
}

.part-panel__desc {
	margin: 4px 0 14px;
	font-size: 13px;
	color: #94a3b8;
}

.part-panel__stock {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
	margin: 0 0 12px;
	font-size: 13px;
}

.part-panel__stock-label {
	color: #64748b;
}

.part-panel__cost {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin: 0 0 18px;
	padding-bottom: 16px;
	border-bottom: 1px solid #eef1f5;
	font-size: 13px;
	color: #64748b;
}

.part-panel__cost strong {
	font-size: 14px;
	color: var(--staffprt-primary);
}

.part-section {
	padding: 14px 0;
	border-bottom: 1px solid #eef1f5;
}

.part-section:last-child {
	border-bottom: 0;
	padding-bottom: 0;
}

.part-section__title {
	margin: 0 0 12px;
	font-size: 14px;
	font-weight: 700;
	color: #1e293b;
}

.detail-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 12px 20px;
	margin: 0;
}

.detail dt {
	font-size: 12px;
	color: #94a3b8;
}

.detail dd {
	margin: 4px 0 0;
	font-size: 13px;
	font-weight: 600;
	color: #1e293b;
}

.chip-group + .chip-group {
	margin-top: 14px;
}

.chip-group__label {
	margin: 0 0 8px;
	font-size: 12px;
	color: #94a3b8;
}

.chips {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.chip {
	display: inline-flex;
	align-items: center;
	padding: 5px 12px;
	border-radius: 8px;
	background: #eef1f5;
	font-size: 12px;
	font-weight: 600;
	color: #475569;
}

.chips--suppliers {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.chip--supplier {
	justify-content: center;
	background: #f1f4f8;
}

@media (max-width: 1000px) {
	.parts-split {
		grid-template-columns: 1fr;
	}

	.parts-list-panel {
		position: static;
		max-height: none;
	}

	.parts-list {
		max-height: 320px;
	}
}

@media (max-width: 640px) {
	.detail-grid,
	.chips--suppliers {
		grid-template-columns: 1fr;
	}

	.inv-search {
		max-width: none;
	}

	.table-foot {
		justify-content: center;
	}
}

/* Add new part */

.btn--primary {
	background: var(--staffprt-primary);
	color: #fff;
	font-weight: 700;
	padding: 0 40px;
}

.btn--primary:hover {
	background: var(--staffprt-primary-hover);
}

.add-part {
	background: #fff;
	border-radius: 18px;
	box-shadow: 0 8px 24px rgba(15, 23, 42, 0.04);
	padding: 22px 24px 20px;
}

.add-part__head {
	margin-bottom: 18px;
}

.add-part__title {
	margin: 0;
	font-size: 16px;
	font-weight: 700;
	color: #1e293b;
}

.add-part__subtitle {
	margin: 4px 0 0;
	font-size: 13px;
	color: #94a3b8;
}

.add-part__media {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 10px;
	margin-bottom: 22px;
}

.image-drop {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 8px;
	width: 96px;
	height: 96px;
	padding: 0;
	border: 1px dashed #c9d2dd;
	border-radius: 14px;
	background: #f7f9fb center / cover no-repeat;
	font: inherit;
	font-size: 13px;
	font-weight: 600;
	color: #1e293b;
	cursor: pointer;
	overflow: hidden;
}

.image-drop:hover {
	border-color: var(--staffprt-primary);
}

.image-drop.has-image {
	border-style: solid;
	color: transparent;
}

.image-drop.has-image .image-drop__icon,
.image-drop.has-image .image-drop__label {
	display: none;
}

.image-drop__icon {
	display: inline-flex;
}

.add-part__media-actions {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 8px;
}

.add-part__media-actions .btn--outline {
	border-radius: 999px;
	padding: 6px 14px;
	gap: 8px;
}

.add-part__pid-field {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
	max-width: 360px;
}

.add-part__pid-field[hidden] {
	display: none !important;
}

.add-part__pid-input {
	min-width: 160px;
	height: 36px;
	padding: 0 12px;
	border: 1px solid #c9d2dd;
	border-radius: 10px;
	font: inherit;
	color: #0f172a;
	background: #fff;
}

.add-part__pid-input:focus {
	outline: none;
	border-color: var(--staffprt-primary);
	box-shadow: 0 0 0 3px color-mix(in srgb, var(--staffprt-primary) 18%, transparent);
}

.add-part__pid-hint {
	flex: 1 1 100%;
	margin: 0;
	font-size: 12px;
	color: #64748b;
}

.add-part__pid-hint.is-error {
	color: var(--staffprt-primary);
}

.procurement-subtabs {
	margin-bottom: 8px;
}

.procurement-subtabs__nav {
	display: inline-flex;
	flex-wrap: wrap;
	align-items: stretch;
	gap: 0;
	margin-bottom: 8px;
	padding: 4px;
	border: 1px solid #e2e7ee;
	border-radius: 12px;
	background: #f3f5f8;
}

.procurement-subtabs__tab {
	appearance: none;
	border: 0;
	border-radius: 8px;
	padding: 10px 16px;
	background: transparent;
	font: inherit;
	font-size: 13px;
	font-weight: 600;
	color: #1e293b;
	cursor: pointer;
	white-space: nowrap;
	transition: background 0.15s ease, color 0.15s ease;
}

.procurement-subtabs__tab:hover {
	color: #0f172a;
}

.procurement-subtabs__tab.is-active {
	background: #1e293b;
	color: #fff;
}

.procurement-subtabs__panel[hidden] {
	display: none;
}

.procurement-subtabs__placeholder {
	margin: 24px 0;
	font-size: 14px;
	color: #94a3b8;
}

/* Pricing Setup (visual mockup) */

.pricing-setup {
	display: flex;
	flex-direction: column;
	gap: 20px;
	padding: 8px 0 16px;
}

.pricing-setup__stats {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 12px;
}

.pricing-stat {
	padding: 16px 18px;
	border: 1px solid #e2e7ee;
	border-radius: 12px;
	background: #fff;
}

.pricing-stat--us {
	border-color: #b7e4c7;
	background: #f3fbf6;
}

.pricing-stat--eu {
	border-color: #bfdbfe;
	background: #f3f8ff;
}

.pricing-stat--backorder {
	border-color: #fecaca;
	background: #fff5f5;
}

.pricing-stat__label {
	margin: 0 0 10px;
	font-size: 12px;
	font-weight: 500;
	color: #64748b;
}

.pricing-stat__value {
	margin: 0;
	font-size: 22px;
	font-weight: 700;
	line-height: 1.2;
	color: #0f172a;
}

.pricing-stat--us .pricing-stat__value {
	color: #059669;
}

.pricing-stat--eu .pricing-stat__value {
	color: #2563eb;
}

.pricing-stat--backorder .pricing-stat__value {
	color: #dc2626;
}

.pricing-stat__meta {
	margin: 8px 0 0;
	font-size: 12px;
	color: #94a3b8;
}

.pricing-stat__link {
	appearance: none;
	border: 0;
	padding: 0;
	background: transparent;
	font: inherit;
	font-size: 12px;
	font-weight: 600;
	color: #dc2626;
	cursor: pointer;
}

.pricing-stat__link:hover {
	text-decoration: underline;
}

.pricing-panel {
	padding: 18px 20px;
	border: 1px solid #e2e7ee;
	border-radius: 14px;
	background: #fff;
}

.pricing-panel__head {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 16px;
	margin-bottom: 16px;
}

.pricing-panel__title-row {
	display: flex;
	align-items: center;
	gap: 10px;
	flex-wrap: wrap;
}

.pricing-panel__title {
	margin: 0;
	font-size: 16px;
	font-weight: 700;
	color: #0f172a;
}

.pricing-panel__hint {
	margin: 6px 0 0;
	font-size: 13px;
	line-height: 1.4;
	color: #94a3b8;
}

.pricing-panel__count {
	display: inline-flex;
	align-items: center;
	padding: 4px 10px;
	border-radius: 999px;
	background: #eef2f6;
	font-size: 12px;
	font-weight: 600;
	color: #64748b;
}

.pricing-panel__actions {
	display: flex;
	align-items: center;
	gap: 8px;
	flex-shrink: 0;
}

.pricing-panel__note {
	margin: 14px 0 0;
	font-size: 12px;
	line-height: 1.45;
	color: #94a3b8;
}

.btn--ghost {
	background: transparent;
	color: #1e293b;
	border: 0;
}

.btn--ghost:hover {
	background: #f6f8fa;
}

.pricing-events,
.pricing-pos {
	display: flex;
	flex-direction: column;
}

.pricing-events__head,
.pricing-pos__head {
	display: grid;
	gap: 12px;
	padding: 0 12px 10px;
	border-bottom: 1px solid #eef1f5;
	font-size: 11px;
	font-weight: 600;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: #94a3b8;
}

.pricing-events__head {
	grid-template-columns: 28px minmax(100px, 140px) minmax(0, 1.6fr) minmax(80px, 110px) minmax(80px, 110px) minmax(90px, 120px);
}

.pricing-events__cell--cost,
.pricing-pos__cell--status {
	text-align: right;
}

.pricing-event {
	border-bottom: 1px solid #eef1f5;
}

.pricing-event:last-child {
	border-bottom: 0;
}

.pricing-event__summary {
	display: grid;
	grid-template-columns: 28px minmax(100px, 140px) minmax(0, 1.6fr) minmax(80px, 110px) minmax(80px, 110px) minmax(90px, 120px);
	gap: 12px;
	align-items: center;
	width: 100%;
	padding: 14px 12px;
	border: 0;
	background: transparent;
	font: inherit;
	text-align: left;
	color: #0f172a;
	cursor: pointer;
}

.pricing-event__summary:hover {
	background: #f8fafc;
}

.pricing-event.is-open .pricing-event__summary {
	background: #f8fafc;
}

.pricing-event__chevron {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	transition: transform 0.15s ease;
}

.pricing-event.is-open .pricing-event__chevron {
	transform: rotate(90deg);
}

.pricing-event__date,
.pricing-event__qty,
.pricing-event__cost {
	font-size: 14px;
	font-weight: 500;
}

.pricing-event__cost {
	text-align: right;
	font-weight: 700;
}

.pricing-event__supplier,
.pricing-po__supplier {
	display: flex;
	flex-direction: column;
	gap: 3px;
	min-width: 0;
}

.pricing-event__supplier-name,
.pricing-po__supplier-name {
	font-size: 14px;
	font-weight: 700;
	color: #0f172a;
}

.pricing-event__supplier-meta,
.pricing-po__supplier-meta {
	font-size: 12px;
	color: #94a3b8;
}

.pricing-whs {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 24px;
	padding: 0 10px;
	border-radius: 999px;
	font-size: 12px;
	font-weight: 600;
}

.pricing-whs--us {
	background: #dcfce7;
	color: #047857;
}

.pricing-whs--eu {
	background: #dbeafe;
	color: #1d4ed8;
}

.pricing-event__detail {
	padding: 4px 12px 16px;
}

.pricing-event__detail[hidden] {
	display: none;
}

.pricing-event__grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 24px;
	padding: 16px 8px 8px;
	border-top: 1px solid #eef1f5;
}

.pricing-event__col-title {
	margin: 0 0 14px;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.05em;
	text-transform: uppercase;
	color: #94a3b8;
}

.pricing-dl {
	margin: 0;
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.pricing-dl > div {
	display: flex;
	flex-direction: column;
	gap: 4px;
}

.pricing-dl dt {
	margin: 0;
	font-size: 12px;
	font-weight: 500;
	color: #94a3b8;
}

.pricing-dl dd {
	margin: 0;
	font-size: 14px;
	font-weight: 500;
	color: #0f172a;
}

.pricing-event__foot {
	display: flex;
	align-items: center;
	justify-content: flex-end;
	gap: 8px;
	margin-top: 12px;
	padding-top: 14px;
	border-top: 1px solid #eef1f5;
}

.pricing-pos__head {
	grid-template-columns: minmax(90px, 120px) minmax(0, 1.8fr) minmax(120px, 180px) minmax(110px, 140px);
}

.pricing-po {
	display: grid;
	grid-template-columns: minmax(90px, 120px) minmax(0, 1.8fr) minmax(120px, 180px) minmax(110px, 140px);
	gap: 12px;
	align-items: center;
	padding: 14px 12px;
	border-bottom: 1px solid #eef1f5;
}

.pricing-po:last-child {
	border-bottom: 0;
}

.pricing-po__id {
	font-size: 14px;
	font-weight: 700;
	color: #0f172a;
}

.pricing-po__qty {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 6px;
	font-size: 14px;
	font-weight: 500;
}

.pricing-po__tag {
	display: inline-flex;
	align-items: center;
	padding: 3px 8px;
	border-radius: 999px;
	background: #fee2e2;
	font-size: 11px;
	font-weight: 600;
	color: #dc2626;
}

.pricing-po__status {
	display: flex;
	justify-content: flex-end;
}

.pricing-status {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	min-height: 26px;
	padding: 0 10px;
	border-radius: 999px;
	font-size: 12px;
	font-weight: 600;
}

.pricing-status--transit {
	background: #fef3c7;
	color: #b45309;
}

.pricing-status__dot {
	width: 7px;
	height: 7px;
	border-radius: 50%;
	background: currentColor;
}

@media (max-width: 960px) {
	.pricing-setup__stats {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.pricing-events__head,
	.pricing-event__summary {
		grid-template-columns: 28px minmax(90px, 120px) minmax(0, 1fr) minmax(70px, 90px);
	}

	.pricing-events__head .pricing-events__cell:nth-child(5),
	.pricing-events__head .pricing-events__cell:nth-child(6),
	.pricing-event__whs,
	.pricing-event__cost {
		display: none;
	}

	.pricing-event__grid {
		grid-template-columns: 1fr;
		gap: 18px;
	}

	.pricing-pos__head,
	.pricing-po {
		grid-template-columns: minmax(80px, 100px) minmax(0, 1fr) minmax(100px, 140px);
	}

	.pricing-pos__head .pricing-pos__cell:nth-child(4),
	.pricing-po__status {
		display: none;
	}
}

@media (max-width: 640px) {
	.pricing-setup__stats {
		grid-template-columns: 1fr;
	}

	.pricing-panel__head {
		flex-direction: column;
	}

	.pricing-panel__actions {
		width: 100%;
		flex-wrap: wrap;
	}

	.pricing-events__head,
	.pricing-pos__head {
		display: none;
	}

	.pricing-event__summary,
	.pricing-po {
		grid-template-columns: 28px 1fr auto;
		gap: 8px 10px;
	}

	.pricing-event__date {
		grid-column: 2;
	}

	.pricing-event__supplier {
		grid-column: 2 / -1;
	}

	.pricing-event__qty {
		grid-column: 2;
	}

	.pricing-event__chevron {
		grid-row: 1 / span 2;
	}

	.pricing-po__id {
		grid-column: 1 / -1;
	}

	.pricing-po__supplier {
		grid-column: 1 / -1;
	}
}

.step-tabs {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 24px;
	margin-bottom: 4px;
	border-bottom: 1px solid #e4e8ee;
}

.step-tab {
	position: relative;
	padding: 0 2px 10px;
	border: 0;
	background: transparent;
	font: inherit;
	font-size: 13px;
	font-weight: 600;
	color: #64748b;
	cursor: pointer;
}

.step-tab:hover {
	color: #1e293b;
}

.step-tab.is-active {
	color: var(--staffprt-primary);
}

.step-tab.is-active::after {
	content: "";
	position: absolute;
	left: 0;
	right: 0;
	bottom: -1px;
	height: 2px;
	background: var(--staffprt-primary);
	border-radius: 2px;
}

.form-row {
	display: grid;
	grid-template-columns: minmax(160px, 240px) minmax(0, 1fr);
	gap: 24px;
	padding: 24px 0;
	border-bottom: 1px solid #eef1f5;
}

.form-row:last-of-type {
	border-bottom: 0;
}

.form-row__title {
	margin: 0;
	font-size: 14px;
	font-weight: 700;
	color: #1e293b;
}

.form-row__hint {
	margin: 6px 0 0;
	font-size: 13px;
	line-height: 1.45;
	color: #94a3b8;
}

.form-row__fields {
	display: flex;
	flex-direction: column;
	gap: 16px;
	max-width: 514px;
}

.form-field {
	position: relative;
}

.form-field__label {
	position: absolute;
	top: -7px;
	left: 12px;
	z-index: 1;
	padding: 0 6px;
	background: #F9FAFA;
	font-size: 11px;
	font-weight: 500;
	color: #94a3b8;
}

.form-field__control {
	display: flex;
	align-items: center;
	gap: 6px;
	min-height: 48px;
	padding: 0 14px;
	border: 1px solid #e2e7ee;
	border-radius: 10px;
	background: #fff;
	transition: border-color 0.15s ease;
}

.form-field__control:focus-within {
	border-color: var(--staffprt-primary);
}

.form-field__input {
	flex: 1;
	min-width: 0;
	border: 0;
	outline: 0;
	background: transparent;
	font: inherit;
	font-size: 14px;
	color: #1e293b;
	padding: 12px 0;
	appearance: none;
}

.form-field__input[readonly] {
	background: #f1f5f9;
	color: #64748b;
}

.form-field__input[disabled] {
	background: #f1f5f9;
	color: #64748b;
	cursor: not-allowed;
}

.form-field--checkbox {
	display: flex;
	align-items: center;
	min-height: 48px;
}

.form-field__checkbox {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	cursor: pointer;
	font-size: 14px;
	color: #1e293b;
	user-select: none;
}

.form-field__checkbox-input {
	width: 18px;
	height: 18px;
	margin: 0;
	accent-color: var(--staffprt-primary);
	cursor: pointer;
}

.form-field__checkbox-label {
	line-height: 1.3;
}

.form-field__input::placeholder {
	color: #c0c8d2;
}

.form-field--textarea .form-field__input {
	resize: vertical;
	min-height: 44px;
	line-height: 1.4;
}

.form-field__input[type="number"]::-webkit-outer-spin-button,
.form-field__input[type="number"]::-webkit-inner-spin-button {
	appearance: none;
	margin: 0;
}

.form-field__input[type="number"] {
	-moz-appearance: textfield;
}

.form-field__affix {
	font-size: 14px;
	color: #64748b;
}

.form-field--number .form-field__affix:first-child {
	order: -1;
}

.form-field__chevron {
	display: inline-flex;
	pointer-events: none;
	color: #64748b;
}

.form-field--select .form-field__input {
	cursor: pointer;
}

.form-field--category-checklist {
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.form-field--category-checklist .form-field__label {
	position: static;
	transform: none;
	padding: 0;
	background: transparent;
}

.category-checklist {
	max-height: 280px;
	overflow: auto;
	border: 1px solid #d0d7e2;
	border-radius: 10px;
	background: #fff;
	padding: 10px 12px;
}

.category-checklist__empty {
	margin: 0;
	font-size: 13px;
	color: #64748b;
}

.category-checklist__list {
	list-style: none;
	margin: 0;
	padding: 0;
}

.category-checklist__list .category-checklist__list {
	margin: 4px 0 4px 18px;
	padding-left: 10px;
	border-left: 1px solid #e2e8f0;
}

.category-checklist__item {
	margin: 0;
}

.category-checklist__label {
	display: flex;
	align-items: flex-start;
	gap: 8px;
	padding: 4px 0;
	cursor: pointer;
	font-size: 14px;
	line-height: 1.35;
	color: #1e293b;
	user-select: none;
}

.category-checklist__label input {
	width: 16px;
	height: 16px;
	margin: 2px 0 0;
	flex-shrink: 0;
	accent-color: var(--staffprt-primary);
	cursor: pointer;
}

.stepper {
	display: flex;
	flex-direction: column;
	gap: 4px;
}

.stepper__btn {
	width: 14px;
	height: 10px;
	padding: 0;
	border: 0;
	background: transparent;
	cursor: pointer;
	position: relative;
}

.stepper__btn::before {
	content: "";
	position: absolute;
	left: 50%;
	top: 50%;
	width: 0;
	height: 0;
	border-left: 4px solid transparent;
	border-right: 4px solid transparent;
	transform: translate(-50%, -50%);
}

.stepper__btn--up::before {
	border-bottom: 5px solid #b6c0cd;
}

.stepper__btn--down::before {
	border-top: 5px solid #b6c0cd;
}

.stepper__btn:hover::before {
	border-bottom-color: #64748b;
	border-top-color: #64748b;
}

.field-inline {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin-bottom: 4px;
}

.field-inline__label {
	font-size: 13px;
	color: #64748b;
}

.field-inline .form-field {
	width: 120px;
}

.field-inline .form-field__label {
	display: none;
}

.field-inline .form-field__control {
	min-height: 34px;
	padding: 0 10px;
	border-radius: 8px;
}

.field-inline .form-field__input {
	padding: 6px 0;
	font-size: 13px;
	font-weight: 600;
}

.landed-cost {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin: 4px 0 0;
	font-size: 13px;
	font-weight: 700;
	color: #1e293b;
}

.landed-cost strong {
	color: var(--staffprt-primary);
}

/* Multiselect */

.multiselect {
	position: relative;
	padding: 0;
	border: 1px solid #e2e7ee;
	border-radius: 10px;
	background: #fff;
}

.multiselect.is-open {
	border-color: var(--staffprt-primary);
}

.multiselect .form-field__label {
	top: -7px;
	left: 12px;
}

.multiselect__control {
	display: flex;
	align-items: center;
	gap: 8px;
	min-height: 46px;
	padding: 0 14px;
}

.multiselect__search {
	flex: 1;
	min-width: 0;
	border: 0;
	outline: 0;
	background: transparent;
	font: inherit;
	font-size: 14px;
	color: #1e293b;
}

.multiselect__search::placeholder {
	color: #c0c8d2;
}

.multiselect__search-icon {
	display: inline-flex;
	color: #94a3b8;
}

.multiselect.is-open .multiselect__search-icon {
	display: none;
}

.multiselect__reset {
	border: 0;
	background: transparent;
	font-size: 18px;
	line-height: 1;
	color: #64748b;
	cursor: pointer;
}

.multiselect__options {
	list-style: none;
	margin: 0;
	padding: 0 6px;
	max-height: 220px;
	overflow-y: auto;
	border-top: 1px solid #eef1f5;
}

.multiselect__empty {
	padding: 14px 10px;
	font-size: 13px;
	color: #94a3b8;
}

.ms-option {
	display: grid;
	grid-template-columns: 20px minmax(0, 1fr) auto;
	align-items: center;
	gap: 12px;
	padding: 10px 8px;
	border-bottom: 1px solid #f1f4f8;
	cursor: pointer;
}

.multiselect__options li:last-child .ms-option {
	border-bottom: 0;
}

.ms-option input {
	position: absolute;
	opacity: 0;
	pointer-events: none;
}

.ms-option__box {
	width: 20px;
	height: 20px;
	border: 1px solid #cbd4df;
	border-radius: 6px;
	background: #fff;
	position: relative;
}

.ms-option input:checked + .ms-option__box {
	background: #2f3a4a;
	border-color: #2f3a4a;
}

.ms-option input:checked + .ms-option__box::after {
	content: "";
	position: absolute;
	left: 6px;
	top: 2px;
	width: 5px;
	height: 10px;
	border: solid #fff;
	border-width: 0 2px 2px 0;
	transform: rotate(45deg);
}

.ms-option__body {
	display: flex;
	flex-direction: column;
	gap: 2px;
	min-width: 0;
}

.ms-option__name {
	font-size: 14px;
	font-weight: 700;
	color: #1e293b;
}

.ms-option__meta {
	font-size: 12px;
	color: #94a3b8;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.multiselect__foot {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 10px 14px;
	border-top: 1px solid #eef1f5;
	font-size: 12px;
	color: #64748b;
}

.multiselect__clear {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	border: 0;
	background: transparent;
	font: inherit;
	font-size: 12px;
	color: #64748b;
	cursor: pointer;
}

.multiselect__clear:hover {
	color: #1e293b;
}

.multiselect [data-ms-chips] {
	padding: 12px 14px;
}

.multiselect [data-ms-chips]:empty {
	display: none;
}

.chip--removable {
	gap: 8px;
	padding-right: 8px;
	border-radius: 999px;
}

.chip--removable button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 16px;
	height: 16px;
	border: 0;
	border-radius: 50%;
	background: #cbd4df;
	color: #fff;
	font-size: 12px;
	line-height: 1;
	cursor: pointer;
}

.chip--removable button:hover {
	background: #94a3b8;
}

/* Trade & Tariff Details */

.tariff-setup {
	padding: 8px 0 16px;
}

.tariff-setup__head {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 16px;
	margin-bottom: 16px;
}

.tariff-setup__title {
	margin: 0;
	font-size: 16px;
	font-weight: 700;
	color: #0f172a;
}

.tariff-setup__hint {
	margin: 6px 0 0;
	font-size: 13px;
	line-height: 1.4;
	color: #94a3b8;
}

.tariff-setup__rows {
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.tariff-row {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 52px;
	align-items: center;
	gap: 10px;
}

.tariff-row__body {
	display: flex;
	flex-direction: column;
	gap: 12px;
	padding: 14px;
	border-radius: 14px;
	background: #f4f6f9;
}

.tariff-row__lines {
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.tariff-row__line {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 10px;
}

.tariff-row .form-field__label {
	background: #f4f6f9;
}

.tariff-row .form-field__control {
	min-height: 48px;
	padding: 0 12px;
	background: #fff;
}

.tariff-row .form-field__input {
	font-size: 14px;
}

.tariff-row__remove {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 52px;
	height: 52px;
	border: 0;
	border-radius: 12px;
	background: rgba(116, 126, 148, 0.18);
	color: #64748b;
	cursor: pointer;
}

.tariff-row__remove:hover {
	background: #e2e7ee;
	color: #1e293b;
}

@media (max-width: 800px) {
	.tariff-setup__head {
		flex-direction: column;
	}

	.tariff-row {
		grid-template-columns: 1fr;
	}

	.tariff-row__remove {
		width: 100%;
	}

	.tariff-row__line {
		grid-template-columns: 1fr;
	}
}

.add-part__foot {
	display: flex;
	gap: 12px;
	justify-content: flex-end;
	padding-top: 18px;
	border-top: 1px solid #eef1f5;
}

.product-attrs {
	display: flex;
	flex-direction: column;
	gap: 16px;
	width: 100%;
}

.product-attrs__rows {
	display: flex;
	flex-direction: column;
	gap: 16px;
}

.product-attrs__row {
	display: flex;
	flex-direction: column;
	gap: 12px;
	padding: 14px;
	border: 1px solid #e2e7ee;
	border-radius: 12px;
	background: #fff;
}

.product-attrs__row-head {
	display: flex;
	align-items: center;
	gap: 10px;
	margin-bottom: 10px;
}

.product-attrs__select-wrap {
	flex: 1;
	min-width: 0;
}

.product-attrs__remove {
	flex: 0 0 auto;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 48px;
	height: 48px;
	border: 1px solid #e2e7ee;
	border-radius: 10px;
	background: #fff;
	color: #64748b;
	font-size: 20px;
	line-height: 1;
	cursor: pointer;
}

.product-attrs__remove:hover {
	border-color: var(--staffprt-primary-hover);
	color: #0f172a;
	background: rgba(237, 28, 36, 0.08);
}

.product-attrs__remove:hover svg path {
	stroke: var(--staffprt-primary);
}

.product-attrs [data-attr-add] {
	align-self: flex-start;
}

.hidden {
	display: none;
}

@media (max-width: 900px) {
	.form-row {
		grid-template-columns: 1fr;
		gap: 14px;
	}

	.form-row__fields {
		max-width: none;
	}
}

/* ── Add-part toast notifications ───────────────────────────────────── */
.add-part-toast {
	position: fixed;
	bottom: 24px;
	left: 50%;
	transform: translateX(-50%) translateY(12px);
	z-index: 9999;
	padding: 12px 24px;
	border-radius: 8px;
	font-size: 14px;
	font-weight: 500;
	color: #fff;
	opacity: 0;
	pointer-events: none;
	transition: opacity 0.25s ease, transform 0.25s ease;
	white-space: normal;
	text-align: center;
	max-width: min(520px, calc(100vw - 32px));
	box-shadow: 0 4px 16px rgba(0,0,0,.18);
}

.add-part-toast.is-visible {
	opacity: 1;
	transform: translateX(-50%) translateY(0);
}

.add-part-toast--success { background: #1a8a4a; }
.add-part-toast--error   { background: #c0392b; }
.add-part-toast--info    { background: #334155; }

.form-field.is-invalid input,
.form-field.is-invalid .form-field__control input,
input.is-invalid {
	/* border-color: #c0392b !important;
	box-shadow: 0 0 0 1px #c0392b; */
}

.form-field__hint--error {
	margin: 6px 0 0;
	color: #c0392b;
	font-size: 12px;
	line-height: 1.35;
}

/* ── Suppliers directory ─────────────────────────────────────────────── */
.part-item__thumb--initials,
.part-thumb--initials {
	font-size: 12px;
	font-weight: 700;
	color: #64748b;
	letter-spacing: 0.02em;
}

.part-thumb--lg.part-thumb--initials {
	font-size: 16px;
}

.supplier-panels {
	background: transparent;
	box-shadow: none;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 16px;
}

.supplier-panels .part-panel--placeholder,
.supplier-panels .part-panel--edit {
	background: #fff;
	border-radius: 18px;
	box-shadow: 0 8px 24px rgba(15, 23, 42, 0.04);
	padding: 20px 22px 24px;
}

.supplier-detail-stack {
	display: block;
}

.supplier-detail-stack[hidden] {
	display: none;
}

.supplier-panel {
	display: flex;
	flex-direction: column;
	gap: 16px;
}

.supplier-panel[hidden] {
	display: none;
}

.supplier-card {
	background: #fff;
	border-radius: 18px;
	box-shadow: 0 8px 24px rgba(15, 23, 42, 0.04);
	padding: 20px 22px 24px;
}

.supplier-panel__title-row {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 10px;
	margin-bottom: 4px;
}

.supplier-panel__title-row .part-panel__title {
	margin: 0;
}

.supplier-panel__link {
	color: var(--staffprt-primary);
	text-decoration: underline;
	text-underline-offset: 2px;
}

.supplier-panel__link:hover {
	opacity: 0.85;
}

.supplier-activity__tabs {
	display: flex;
	gap: 22px;
	margin: 0 0 16px;
	border-bottom: 1px solid #eef1f5;
}

.supplier-activity__tab {
	position: relative;
	padding: 0 0 12px;
	border: 0;
	background: transparent;
	font: inherit;
	font-size: 14px;
	font-weight: 600;
	color: #94a3b8;
	cursor: pointer;
}

.supplier-activity__tab.is-active {
	color: #0f172a;
}

.supplier-activity__tab.is-active::after {
	content: "";
	position: absolute;
	left: 0;
	right: 0;
	bottom: -1px;
	height: 2px;
	background: #0f172a;
	border-radius: 2px 2px 0 0;
}

.supplier-table__head,
.supplier-table__row {
	display: grid;
	align-items: center;
	gap: 12px;
}

.supplier-table--pos .supplier-table__head,
.supplier-table--pos .supplier-table__row {
	grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) minmax(0, 0.8fr) 28px;
}

.supplier-table--parts .supplier-table__head,
.supplier-table--parts .supplier-table__row {
	grid-template-columns: minmax(0, 1.1fr) minmax(0, 1.4fr) 28px;
}

.supplier-table__head {
	padding: 0 4px 10px;
	font-size: 12px;
	font-weight: 600;
	color: #94a3b8;
}

.supplier-table__body {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 4px;
}

.supplier-table__row {
	padding: 10px 4px;
	border-radius: 10px;
}

.supplier-table__row:hover {
	background: #f8fafc;
}

.supplier-table__cell {
	font-size: 13px;
	font-weight: 600;
	color: #1e293b;
	min-width: 0;
}

.supplier-table__cell--part {
	display: flex;
	align-items: center;
	gap: 10px;
}

.supplier-table__action {
	display: flex;
	justify-content: flex-end;
}

.supplier-table__open {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 28px;
	height: 28px;
	padding: 0;
	border: 0;
	border-radius: 8px;
	background: transparent;
	cursor: pointer;
	text-decoration: none;
	color: inherit;
}

.supplier-table__open:hover {
	background: #fdeced;
}

.supplier-table__state {
	display: flex;
	align-items: center;
	gap: 10px;
	margin: 12px 0 0;
	font-size: 13px;
	color: #64748b;
}

.supplier-table__empty {
	margin: 8px 0 0;
	font-size: 13px;
	color: #94a3b8;
}

.po-status {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 72px;
	padding: 4px 10px;
	border-radius: 999px;
	font-size: 12px;
	font-weight: 700;
}

.po-status--draft {
	background: #eef2f6;
	color: #64748b;
}

.po-status--delivered {
	background: #e8f8ef;
	color: #1f9d57;
}

.po-status--in_transit {
	background: #f1e8ff;
	color: #7c3aed;
}

.po-status--ordered {
	background: #e8f1ff;
	color: #2563eb;
}

.add-supplier__fields {
	display: flex;
	flex-direction: column;
	gap: 16px;
	max-width: 514px;
	margin-bottom: 22px;
}

.form-fields-pair {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 16px;
}

@media (max-width: 700px) {
	.form-fields-pair {
		grid-template-columns: 1fr;
	}

	.supplier-table--pos .supplier-table__head,
	.supplier-table--pos .supplier-table__row,
	.supplier-table--parts .supplier-table__head,
	.supplier-table--parts .supplier-table__row {
		grid-template-columns: minmax(0, 1fr) 28px;
	}

	.supplier-table--pos .supplier-table__head span:nth-child(2),
	.supplier-table--pos .supplier-table__head span:nth-child(3),
	.supplier-table--pos .supplier-table__row .supplier-table__cell:nth-child(2),
	.supplier-table--pos .supplier-table__row .supplier-table__cell:nth-child(3),
	.supplier-table--parts .supplier-table__head span:nth-child(2),
	.supplier-table--parts .supplier-table__row .supplier-table__cell:nth-child(2) {
		display: none;
	}
}

/* ── Audit Log ───────────────────────────────────────────────────────── */
.audit-placeholder__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	margin-bottom: 12px;
}

.audit-placeholder__title {
	margin: 0;
	font-size: 16px;
	font-weight: 700;
	color: #1e293b;
}

.audit-identify {
	background: #fff;
	border-radius: 18px;
	box-shadow: 0 8px 24px rgba(15, 23, 42, 0.04);
	padding: 24px 24px 20px;
	max-width: 720px;
}

.audit-identify__head {
	margin-bottom: 18px;
}

.audit-identify__title {
	margin: 0;
	font-size: 16px;
	font-weight: 700;
	color: #1e293b;
}

.audit-identify__subtitle {
	margin: 4px 0 0;
	font-size: 13px;
	color: #5E6880;
}

.audit-mode {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 4px;
	padding: 4px;
	margin-bottom: 18px;
	border-radius: 999px;
	background: #eef2f6;
}

.audit-mode__btn {
	border: 0;
	border-radius: 999px;
	padding: 12px 16px;
	background: transparent;
	font: inherit;
	font-size: 14px;
	font-weight: 600;
	color: #94a3b8;
	cursor: pointer;
	transition: background 0.15s ease, color 0.15s ease;
}

.audit-mode__btn.is-active {
	background: #dce3eb;
	color: #0f172a;
}

.audit-scan__frame {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 16px;
	min-height: 280px;
	padding: 32px 20px;
	border: 1.5px dashed #c9d2dd;
	border-radius: 16px;
	background: #f8fafc;
}

.audit-scan__frame.is-scanning {
	padding: 16px;
	border-style: solid;
	border-color: #dce3eb;
	background: #0f172a;
}

.audit-scan__idle {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 16px;
}

.audit-scan__camera {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 12px;
	width: 100%;
}

.audit-scan__reader {
	width: 100%;
	max-width: 420px;
	overflow: hidden;
	border-radius: 12px;
}

.audit-scan__reader video {
	border-radius: 12px;
}

.audit-scan__reader #html5-qrcode-button-camera-permission,
.audit-scan__reader #html5-qrcode-anchor-scan-type-change {
	display: none !important;
}

.audit-scan__reader img[alt="Info icon"] {
	display: none;
}

.audit-scan__stop {
	min-width: 140px;
	background: #fff;
}

.audit-scan__error {
	width: 100%;
	padding: 14px 16px;
	border-radius: 12px;
	background: #fef3f2;
	border: 1px solid #fecdca;
}

.audit-scan__error-msg {
	margin: 0;
	text-align: center;
	font-size: 14px;
	line-height: 1.5;
	color: #b42318;
}

.audit-scan__error-steps {
	margin: 10px 0 0;
	padding-left: 18px;
	text-align: left;
	font-size: 13px;
	line-height: 1.5;
	color: #7a271a;
}

.audit-scan__error-steps li + li {
	margin-top: 4px;
}

.audit-scan__error.is-loading {
	background: #f8fafc;
	border-color: #dce3eb;
}

.audit-scan__error.is-loading .audit-scan__error-msg {
	color: #475569;
}

.audit-scan__retry {
	margin-top: 12px;
	min-width: 140px;
	background: #fff;
}

.audit-scan__frame.is-requesting .audit-scan__trigger {
	opacity: 0.65;
	pointer-events: none;
}

.audit-scan__result {
	margin-top: 18px;
	padding: 16px 18px;
	border: 1px solid #dce3eb;
	border-radius: 14px;
	background: #fff;
}

.audit-scan__result-label {
	margin: 0 0 12px;
	font-size: 13px;
	font-weight: 600;
	color: #64748b;
	text-transform: uppercase;
	letter-spacing: 0.04em;
}

.audit-scan__result-list {
	margin: 0;
	display: grid;
	gap: 10px;
}

.audit-scan__result-row {
	display: grid;
	grid-template-columns: minmax(0, 140px) minmax(0, 1fr);
	gap: 12px;
	align-items: start;
}

.audit-scan__result-row dt {
	margin: 0;
	font-size: 13px;
	color: #64748b;
}

.audit-scan__result-row dd {
	margin: 0;
	font-size: 14px;
	font-weight: 600;
	color: #0f172a;
	word-break: break-word;
}

.audit-scan__rescan {
	margin-top: 14px;
	padding: 0;
	border: 0;
	background: none;
	font-size: 14px;
	font-weight: 600;
	color: #ed1c24;
	cursor: pointer;
}

.audit-scan__rescan:hover {
	text-decoration: underline;
}

.audit-scan__trigger {
	min-width: 140px;
}

.audit-identify__foot {
	display: flex;
	justify-content: flex-end;
	margin-top: 18px;
}

.audit-continue {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	min-height: 48px;
	padding: 0 20px;
	border-radius: 12px;
}

.audit-continue:disabled,
.audit-continue.btn--muted:disabled {
	opacity: 0.55;
	cursor: not-allowed;
}

.audit-continue.btn--primary .btn__icon svg path {
	stroke: #fff;
}

.audit-options {
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.audit-option {
	display: grid;
	grid-template-columns: 22px minmax(0, 1fr);
	column-gap: 12px;
	row-gap: 0;
	padding: 16px;
	border: 1px solid #e2e7ee;
	border-radius: 14px;
	background: #fff;
	cursor: pointer;
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.audit-option.is-active {
	border-color: var(--staffprt-primary);
	box-shadow: 0 0 0 1px color-mix(in srgb, var(--staffprt-primary) 20%, transparent);
}

.audit-option__input {
	position: absolute;
	opacity: 0;
	pointer-events: none;
}

.audit-option__radio {
	width: 20px;
	height: 20px;
	margin-top: 2px;
	border: 1.5px solid #c9d2dd;
	border-radius: 50%;
	background: #fff;
}

.audit-option.is-active .audit-option__radio {
	border-color: var(--staffprt-primary);
	background: radial-gradient(circle, var(--staffprt-primary) 0 45%, #fff 48%);
}

.audit-option__body {
	display: flex;
	flex-direction: column;
	gap: 4px;
	min-width: 0;
}

.audit-option__title {
	font-size: 18px;
	font-weight: 700;
	color: #1e293b;
}

.audit-option__hint {
	font-size: 16px;
	line-height: 1.4;
	color: #5E6880;
}

.audit-option__expand {
	display: none;
	grid-column: 1 / -1;
	grid-template-columns: minmax(0, 1fr) auto;
	gap: 12px;
	align-items: end;
	margin-top: 14px;
	padding-top: 14px;
	border-top: 1px dashed #e2e7ee;
}

.audit-option.is-active .audit-option__expand {
	display: grid;
}

.audit-option__expand .form-field {
	margin: 0;
}

.audit-results {
	margin-top: 16px;
	padding-top: 16px;
	border-top: 1px dashed #e2e7ee;
}

.audit-results__label {
	margin: 0 0 10px;
	font-size: 13px;
	font-weight: 600;
	color: #64748b;
}

.audit-results__state {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 14px 4px;
	font-size: 13px;
	color: #64748b;
}

.audit-results__empty {
	margin: 0;
	padding: 12px 4px;
	font-size: 13px;
	color: #94a3b8;
}

.audit-results__list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 8px;
	max-height: 320px;
	overflow-y: auto;
}

.audit-result {
	display: grid;
	grid-template-columns: 56px minmax(0, 1fr) auto;
	align-items: center;
	gap: 12px;
	padding: 10px;
	border: 1px solid #e2e7ee;
	border-radius: 14px;
	background: #fff;
	cursor: pointer;
	transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

.audit-result:hover {
	background: #f8fafc;
}

.audit-result.is-active {
	border-color: #1f9d57;
	background: #f3fbf6;
	box-shadow: 0 0 0 1px color-mix(in srgb, #1f9d57 18%, transparent);
}

.audit-result__thumb {
	width: 56px;
	height: 56px;
	border-radius: 10px;
	overflow: hidden;
	background: #f1f5f9;
	display: flex;
	align-items: center;
	justify-content: center;
}

.audit-result__thumb img {
	width: 56px;
	height: 56px;
	object-fit: cover;
}

.audit-result__body {
	display: flex;
	flex-direction: column;
	gap: 4px;
	min-width: 0;
}

.audit-result__name {
	font-size: 14px;
	font-weight: 700;
	color: #1e293b;
}

.audit-result__meta {
	font-size: 12px;
	line-height: 1.35;
	color: #64748b;
}

.audit-confirm {
	background: #fff;
	border-radius: 18px;
	box-shadow: 0 8px 24px rgba(15, 23, 42, 0.04);
	padding: 24px 24px 20px;
	max-width: 720px;
}

.audit-identified {
	margin: 4px 0 18px;
}

.audit-identified__label {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	margin: 0 0 10px;
	font-size: 13px;
	font-weight: 600;
	color: #16a34a;
}

.audit-identified__check {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 18px;
	height: 18px;
	border-radius: 50%;
	background: #1f9d57;
	color: #fff;
	font-size: 11px;
	font-weight: 700;
	line-height: 1;
}

.audit-identified__card {
	display: grid;
	grid-template-columns: 56px minmax(0, 1fr) auto;
	align-items: center;
	gap: 12px;
	padding: 12px;
	border: 1px solid #1f9d57;
	border-radius: 12px;
	background: #f3fbf6;
}

.audit-identified__img {
	width: 56px;
	height: 56px;
	border-radius: 10px;
	object-fit: cover;
	background: #f1f5f9;
}

.audit-identified__body {
	min-width: 0;
}

.audit-identified__name {
	margin: 0;
	font-size: 14px;
	font-weight: 700;
	color: #1e293b;
}

.audit-identified__meta {
	margin: 4px 0 0;
	font-size: 12px;
	line-height: 1.4;
	color: #64748b;
}

.audit-identified__stock {
	flex-shrink: 0;
}

.audit-form-card {
	margin-top: 18px;
	padding: 18px 16px 16px;
	border: 1px solid #e2e7ee;
	border-radius: 14px;
	background: rgba(245, 246, 247, 0.6);
}

.audit-form-card__title {
	margin: 0 0 16px;
	font-size: 15px;
	font-weight: 700;
	color: #1e293b;
}

.audit-form-grid {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
	gap: 14px 12px;
	align-items: end;
}

[data-audit-op-panel="out"] .audit-form-grid {
	grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
}

.audit-form-grid .form-field {
	min-width: 0;
}

.audit-form-notes {
	margin-top: 14px;
}

.audit-qty {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	min-height: 48px;
	justify-self: end;
}

.audit-identified__warehouses {
	margin: 4px 0 0;
	font-size: 12px;
	font-weight: 600;
	color: #475569;
}

.audit-result__stock {
	display: flex;
	flex-direction: column;
	align-items: flex-end;
	gap: 4px;
}

.audit-result__warehouses {
	font-size: 11px;
	font-weight: 600;
	color: #64748b;
	white-space: nowrap;
}

.audit-qty--span {
	justify-self: end;
}

.activity-table td {
	vertical-align: middle;
}

.activity-table .parts-table__img {
	width: 40px;
	height: 40px;
	border-radius: 8px;
	object-fit: cover;
	display: block;
	background: #f1f5f9;
}

.activity-part-name {
	display: block;
	max-width: 180px;
	font-size: 13px;
	line-height: 1.35;
	color: #64748b;
}

.activity-table__muted {
	font-size: 12px;
	font-weight: 500;
	color: #94a3b8;
}

.activity-qty {
	font-weight: 700;
	white-space: nowrap;
}

.activity-qty.is-in {
	color: #1f9d57;
}

.activity-qty.is-out {
	color: var(--staffprt-primary);
}

.activity-type {
	display: inline-flex;
	align-items: center;
	padding: 4px 10px;
	border-radius: 999px;
	font-size: 12px;
	font-weight: 600;
	white-space: nowrap;
	background: #eef1f5;
	color: #5e6880;
}

.activity-type--check_in {
	background: #e8f8ef;
	color: #1f9d57;
}

.activity-type--check_out {
	background: #fde8ea;
	color: var(--staffprt-primary);
}

[data-audit-op-panel="out"] .audit-qty--end {
	grid-column: 2;
}

.audit-qty__btn {
	width: 36px;
	height: 36px;
	border: 1px solid #d7dee7;
	border-radius: 50%;
	background: #fff;
	color: #334155;
	font-size: 20px;
	line-height: 1;
	cursor: pointer;
	transition: border-color 0.15s ease, background 0.15s ease;
}

.audit-qty__btn:hover {
	border-color: #94a3b8;
	background: #f8fafc;
}

.audit-qty__input {
	width: 48px;
	border: 0;
	outline: 0;
	background: transparent;
	text-align: center;
	font: inherit;
	font-size: 18px;
	font-weight: 700;
	color: #1e293b;
	appearance: textfield;
}

.audit-qty__input::-webkit-outer-spin-button,
.audit-qty__input::-webkit-inner-spin-button {
	appearance: none;
	margin: 0;
}

.form-field__control--tall {
	min-height: 64px;
	align-items: flex-start;
	padding-top: 14px;
	padding-bottom: 14px;
}

.form-field__control--tall .form-field__input {
	font-weight: 700;
	padding-top: 0;
	padding-bottom: 0;
}

.audit-wo-meta {
	margin: 8px 2px 0;
	font-size: 12px;
	color: #64748b;
	position: absolute;
	bottom: 10px;
	left: 13px;
}

.audit-wo-manual {
	margin-top: 12px;
}

.audit-wo-manual-toggle {
	display: block;
	width: 100%;
	text-align: right;
	margin-top: 12px;
	padding: 0;
	border: 0;
	background: transparent;
	font: inherit;
	font-size: 13px;
	font-weight: 600;
	cursor: pointer;
	color: #5E6880;
}

.audit-wo-manual-toggle span {
	color: var(--staffprt-primary);
}

.audit-wo-manual-toggle:hover {
	text-decoration: underline;
}

.audit-success {
	margin-top: 8px;
}

.audit-success__hero {
	display: flex;
	flex-direction: column;
	align-items: center;
	text-align: center;
	padding: 12px 8px 20px;
}

.audit-success__icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 56px;
	height: 56px;
	margin-bottom: 12px;
	border-radius: 50%;
	background: #1f9d57;
	color: #fff;
	font-size: 28px;
	font-weight: 700;
	line-height: 1;
}

.audit-success__title {
	margin: 0;
	font-size: 18px;
	font-weight: 700;
	color: #1e293b;
}

.audit-success__sub {
	margin: 6px 0 0;
	font-size: 13px;
	color: #64748b;
}

.audit-success__list {
	margin: 0;
	padding: 0;
	background: rgba(245, 246, 247, 0.6);
	border-radius: 14px;
	padding: 12px;
}

.audit-success__row {
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto;
	gap: 16px;
	align-items: baseline;
	padding: 14px 2px;
	border-bottom: 1px solid #eef2f6;
}

.audit-success__label {
	margin: 0;
	font-size: 14px;
	color: #94a3b8;
}

.audit-success__value {
	margin: 0;
	font-size: 14px;
	font-weight: 700;
	color: #1e293b;
	text-align: right;
}

.audit-success__foot {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	flex-wrap: wrap;
	margin-top: 20px;
}

.audit-success__link {
	padding: 0;
	border: 0;
	background: transparent;
	font: inherit;
	font-size: 14px;
	font-weight: 600;
	color: #334155;
	cursor: pointer;
	text-decoration: none;
}

.audit-success__link:hover {
	color: var(--staffprt-primary);
	text-decoration: underline;
}

.audit-success__actions {
	display: flex;
	align-items: center;
	gap: 10px;
	flex-wrap: wrap;
	margin-left: auto;
}

.audit-confirm__foot {
	display: flex;
	justify-content: flex-end;
	gap: 12px;
	margin-top: 18px;
}

@media (max-width: 700px) {
	.audit-identify,
	.audit-confirm {
		max-width: none;
		padding: 18px 16px 16px;
	}

	.audit-option__expand {
		grid-template-columns: 1fr;
	}

	.audit-option__expand .audit-continue {
		width: 100%;
		justify-content: center;
	}

	.audit-identified__card {
		grid-template-columns: 56px minmax(0, 1fr);
	}

	.audit-identified__stock {
		grid-column: 2;
	}

	.audit-form-grid {
		grid-template-columns: 1fr;
	}

	.audit-qty,
	.audit-qty--span {
		justify-self: start;
		grid-column: 1;
	}

	.audit-success__foot {
		flex-direction: column;
		align-items: stretch;
	}

	.audit-success__actions {
		margin-left: 0;
	}

	.audit-success__actions .btn {
		width: 100%;
		justify-content: center;
	}

	.audit-success__link {
		width: 100%;
		text-align: left;
	}
}

/* ── Label preview modal ─────────────────────────────────────────────────── */

.label-preview {
	position: fixed;
	inset: 0;
	z-index: 1000;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 24px;
}

.label-preview[hidden] {
	display: none !important;
}

.label-preview__backdrop {
	position: absolute;
	inset: 0;
	background: rgba(15, 23, 42, 0.55);
}

.label-preview__dialog {
	position: relative;
	z-index: 1;
	width: min(100%, 640px);
	padding: 20px;
	border-radius: 16px;
	background: #fff;
	box-shadow: 0 24px 60px rgba(15, 23, 42, 0.25);
}

.label-preview__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin-bottom: 16px;
}

.label-preview__title {
	margin: 0;
	font-size: 18px;
	font-weight: 700;
	color: #0f172a;
}

.label-preview__x {
	width: 36px;
	height: 36px;
	border: 0;
	border-radius: 10px;
	background: #f1f5f9;
	color: #475569;
	font-size: 22px;
	line-height: 1;
	cursor: pointer;
}

.label-preview__x:hover {
	background: #e2e8f0;
}

.label-preview__body {
	padding: 8px 0 4px;
}

.label-preview__foot {
	display: flex;
	justify-content: flex-end;
	gap: 10px;
	margin-top: 18px;
}

.part-label {
	display: grid;
	grid-template-columns: 1.15fr 0.85fr;
	gap: 16px;
	align-items: stretch;
	width: 100%;
	aspect-ratio: 4 / 2;
	padding: 18px 20px;
	border: 1px solid #dce3eb;
	border-radius: 4px;
	background: #fff;
	overflow: hidden;
}

.part-label__info {
	display: flex;
	flex-direction: column;
	justify-content: flex-start;
	min-width: 0;
}

.part-label__logo {
	margin-bottom: 8px;
}

.part-label__logo-img {
	display: block;
	max-width: 160px;
	max-height: 42px;
	width: auto;
	height: auto;
	object-fit: contain;
}

.part-label__logo-text {
	display: block;
	font-size: 20px;
	font-weight: 800;
	letter-spacing: 0.02em;
	color: #334155;
	text-transform: uppercase;
}

.part-label__part {
	margin: 0;
	font-size: 18px;
	font-weight: 700;
	line-height: 1.2;
	color: #ed1c24;
}

.part-label__name {
	margin: 0;
	font-size: 18px;
	font-weight: 700;
	line-height: 1.25;
	color: #0f172a;
	word-break: break-word;
}

.part-label__size {
	margin: 0;
	font-size: 15px;
	font-weight: 700;
	line-height: 1.3;
	color: #64748b;
	word-break: break-word;
}

.part-label__media {
	display: flex;
	align-items: center;
	justify-content: center;
	min-width: 0;
}

.part-label__image {
	display: block;
	width: 100%;
	height: 100%;
	max-height: 100%;
	object-fit: contain;
}

body.has-label-preview {
	overflow: hidden;
}

@media (max-width: 640px) {
	.label-preview {
		padding: 12px;
	}

	.label-preview__dialog {
		padding: 16px;
	}

	.part-label {
		aspect-ratio: auto;
		min-height: 180px;
		padding: 14px;
		gap: 12px;
	}

	.part-label__part,
	.part-label__name {
		font-size: 15px;
	}

	.part-label__size {
		font-size: 13px;
	}

	.label-preview__foot {
		flex-direction: column-reverse;
	}

	.label-preview__foot .btn {
		width: 100%;
		justify-content: center;
	}
}

@media print {
	@page {
		margin: 0.25in;
		size: auto;
	}

	html,
	body {
		margin: 0 !important;
		padding: 0 !important;
		background: #fff !important;
		height: auto !important;
		min-height: 0 !important;
		overflow: visible !important;
	}

	body.has-label-preview > *:not(.label-preview) {
		display: none !important;
	}

	body.has-label-preview .label-preview {
		position: static !important;
		inset: auto !important;
		display: block !important;
		padding: 0 !important;
		margin: 0 !important;
		background: #fff !important;
		z-index: auto !important;
	}

	body.has-label-preview .label-preview__backdrop,
	body.has-label-preview .label-preview__head,
	body.has-label-preview .label-preview__foot,
	body.has-label-preview .label-preview__x {
		display: none !important;
	}

	body.has-label-preview .label-preview__dialog {
		position: static !important;
		width: auto !important;
		max-width: none !important;
		padding: 0 !important;
		margin: 0 !important;
		border: 0 !important;
		border-radius: 0 !important;
		box-shadow: none !important;
		background: transparent !important;
	}

	body.has-label-preview .label-preview__body {
		padding: 0 !important;
		margin: 0 !important;
	}

	body.has-label-preview .part-label {
		display: grid !important;
		width: 4in !important;
		height: 2in !important;
		aspect-ratio: auto !important;
		margin: 0 !important;
		border-radius: 0 !important;
		page-break-inside: avoid;
		break-inside: avoid;
	}
}

/* ── Purchase Orders ─────────────────────────────────────────────────────── */

.po-stat-grid {
	display: grid;
	grid-template-columns: repeat(5, minmax(0, 1fr));
	gap: 14px;
	margin-bottom: 18px;
}

.po-stat-card {
	background: #fff;
	border-radius: 16px;
	box-shadow: 0 8px 24px rgba(15, 23, 42, 0.04);
	padding: 18px 20px;
}

.po-stat-card__label {
	margin: 0 0 8px;
	font-size: 14px;
	font-weight: 600;
	color: #64748b;
}

.po-stat-card__value {
	margin: 0;
	font-size: 28px;
	font-weight: 800;
	letter-spacing: -0.03em;
	line-height: 1;
	color: #0f172a;
}

.po-stat-card__value--danger {
	color: #ed1c24;
}

.po-stat-card__value--warning {
	color: #f59a1a;
}

.po-pills {
	margin: 14px 0 18px;
}

.po-pills .pill.is-active,
.po-pills a.pill.is-active,
.po-pills a.pill.is-active:visited {
	background: #0f172a;
	border-color: #0f172a;
	color: #fff;
	text-decoration: none;
}

.po-table-wrap {
	overflow-x: auto;
}

.po-table {
	width: 100%;
	border-collapse: separate;
	border-spacing: 0 10px;
	font-size: 14px;
}

.po-table thead th {
	padding: 0 16px 4px;
	font-size: 13px;
	font-weight: 600;
	color: #94a3b8;
	text-align: left;
}

.po-table tbody tr {
	background: #fff;
	box-shadow: 0 4px 16px rgba(15, 23, 42, 0.04);
}

.po-table tbody td {
	padding: 16px;
	color: #0f172a;
	vertical-align: middle;
	border-top: 1px solid #eef2f6;
	border-bottom: 1px solid #eef2f6;
}

.po-table tbody td:first-child {
	border-left: 1px solid #eef2f6;
	border-radius: 14px 0 0 14px;
	font-weight: 700;
}

.po-table tbody td:last-child {
	border-right: 1px solid #eef2f6;
	border-radius: 0 14px 14px 0;
}

.po-table__link {
	color: inherit;
	text-decoration: none;
}

.po-table__link:hover {
	color: var(--staffprt-primary);
}

.po-status {
	display: inline-flex;
	align-items: center;
	height: 28px;
	padding: 0 12px;
	border-radius: 999px;
	font-size: 12px;
	font-weight: 700;
}

.po-status--draft {
	background: #eef2f6;
	color: #64748b;
}

.po-status--pending,
.po-status--pending_approval {
	background: #fff3df;
	color: #c47b00;
}

.po-status--delivered {
	background: #e8f8ef;
	color: #17803d;
}

.po-status--delayed {
	background: #fde8e8;
	color: #c62828;
}

.po-status--ordered {
	background: #e8f1ff;
	color: #2f6fed;
}

.po-status--in_transit {
	background: #f1e8ff;
	color: #7a3ff2;
}

.po-wizard__head {
	margin-bottom: 18px;
}

.po-wizard__title {
	margin: 0 0 18px;
	font-size: 18px;
	font-weight: 700;
	color: #0f172a;
}

.po-stepper {
	display: flex;
	align-items: flex-start;
	gap: 0;
	margin: 0;
	padding: 0;
	list-style: none;
}

.po-stepper__item {
	display: grid;
	grid-template-columns: auto minmax(24px, 1fr);
	grid-template-rows: auto auto;
	column-gap: 0;
	row-gap: 8px;
	flex: 1;
	min-width: 0;
	color: #0f172a;
}

.po-stepper__marker {
	position: relative;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 28px;
	height: 28px;
	border: 2px solid transparent;
	border-radius: 50%;
	flex: 0 0 auto;
	grid-column: 1;
	grid-row: 1;
	background: rgba(94, 104, 128, 0.15);
	z-index: 1;
}

.po-stepper__item::after {
	content: "";
	grid-column: 2;
	grid-row: 1;
	height: 2px;
	margin-left: 12px;
	margin-right: 22px;
	align-self: center;
	background: #e2e8f0;
	border-radius: 2px;
}

.po-stepper__item.is-done::after {
	background: #16a34a;
}

.po-stepper__item.is-active::after {
	background: linear-gradient(to right, var(--staffprt-primary) 0 50%, #e2e8f0 50% 100%);
}

.po-stepper__item.is-active .po-stepper__marker {
	background: #fff;
	border-color: var(--staffprt-primary);
	color: var(--staffprt-primary);
}

.po-stepper__dot {
	width: 10px;
	height: 10px;
	border-radius: 50%;
	background: currentColor;
	opacity: 0;
}

.po-stepper__check {
	position: absolute;
	font-size: 14px;
	font-weight: 700;
	line-height: 1;
	opacity: 0;
}

.po-stepper__item.is-active .po-stepper__dot {
	opacity: 1;
}

.po-stepper__item.is-done .po-stepper__marker {
	background: #16a34a;
	border-color: #16a34a;
	color: #fff;
}

.po-stepper__item.is-done .po-stepper__dot {
	opacity: 0;
}

.po-stepper__item.is-done .po-stepper__check {
	opacity: 1;
}

.po-stepper__text {
	display: flex;
	flex-direction: column;
	gap: 2px;
	grid-column: 1 / -1;
	grid-row: 2;
	min-width: 0;
	padding-right: 12px;
}

.po-stepper__step {
	font-size: 12px;
	font-weight: 500;
	line-height: 1.2;
	color: #5E6880;
}

.po-stepper__label {
	font-size: 14px;
	font-weight: 700;
	line-height: 1.25;
	color: #0f172a;
}

.po-stepper__item.is-active .po-stepper__label {
	color: var(--staffprt-primary);
}

.po-card {
	background: #fff;
	border-radius: 18px;
	box-shadow: 0 8px 24px rgba(15, 23, 42, 0.04);
	padding: 24px;
}

.po-card__head {
	margin-bottom: 22px;
}

.po-divider {
	margin: 24px 0;
	border-color: #F1F3F2;
	border-width: 1px;
	border-style: solid;
}

.po-card__title {
	margin: 0 0 6px;
	font-size: 20px;
	font-weight: 700;
	color: #0f172a;
}

.po-card__subtitle {
	margin: 0;
	font-size: 14px;
	line-height: 1.5;
	color: #64748b;
}

.po-card__foot {
	display: flex;
	justify-content: flex-end;
	gap: 10px;
	flex-wrap: wrap;
	margin-top: 24px;
}

.po-section + .po-section {
	margin-top: 28px;
}

.po-section__title {
	margin: 0 0 16px;
	font-size: 16px;
	font-weight: 700;
	color: #0f172a;
}

.po-form-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 16px 18px;
}

.po-form-grid__full {
	grid-column: 1 / -1;
}

.po-chips-control {
	min-height: 48px;
	padding: 8px 40px 8px 12px;
}

.po-chips {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	width: 100%;
}

.po-chip {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	height: 30px;
	padding: 0 10px;
	border-radius: 999px;
	background: #eef2f6;
	font-size: 13px;
	font-weight: 600;
	color: #334155;
}

.po-chip__remove {
	padding: 0;
	border: 0;
	background: transparent;
	color: #64748b;
	font-size: 16px;
	line-height: 1;
	cursor: pointer;
}

.po-part-rows {
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.po-part-row {
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.po-part-row__main {
	display: flex;
	align-items: stretch;
	gap: 12px;
	padding: 10px;
	border-radius: 24px;
	background: #f1f4f8;
}

.po-part-row.is-error .po-part-row__main {
	background: #fdecec;
}

.po-part-row__icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	margin: auto 0;
	padding: 0;
	border: 0;
	border-radius: 12px;
	background: rgba(94, 104, 128, 0.12);
	cursor: pointer;
	flex: 0 0 auto;
}

.po-part-row.is-error .po-part-row__icon {
	background: rgba(237, 28, 36, 0.1);
}

.po-part-row__body {
	flex: 1;
	min-width: 0;
	display: flex;
	flex-direction: column;
	gap: 14px;
	padding: 14px;
	border-radius: 18px;
	background: #fff;
}

.po-part-row__fields {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr) minmax(0, 1fr) 48px;
	gap: 12px;
	align-items: center;
}

.po-part-row__thumb {
	width: 48px;
	height: 48px;
	border-radius: 10px;
	object-fit: cover;
	background: #f8fafc;
}

.po-part-row__actions {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
}

.po-part-row__delete {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	height: 40px;
	padding: 0 10px;
	border: 0;
	background: transparent;
	color: #ed1c24;
	font: inherit;
	font-size: 14px;
	font-weight: 600;
	cursor: pointer;
	white-space: nowrap;
}

.po-part-row__delete .btn__icon svg path {
	stroke: currentColor;
}

.btn--primary .btn__icon svg path {
	stroke: currentColor;
}

.btn--dark .btn__icon svg path {
	stroke: currentColor;
}

.po-part-row__error {
	display: flex;
	align-items: center;
	gap: 8px;
	margin: 0;
	padding-left: 4px;
	font-size: 13px;
	font-weight: 600;
	color: #ed1c24;
}

.po-qty {
	display: inline-flex;
	align-items: center;
	gap: 10px;
}

.po-qty__btn {
	width: 32px;
	height: 32px;
	border: 1px solid #e2e8f0;
	border-radius: 50%;
	background: #fff;
	font-size: 16px;
	line-height: 1;
	color: #0f172a;
	cursor: pointer;
}

.po-qty__value {
	min-width: 48px;
	text-align: center;
	font-size: 14px;
	font-weight: 600;
	color: #0f172a;
}

.po-add-link {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	margin-top: 14px;
	padding: 0;
	border: 0;
	background: transparent;
	font: inherit;
	font-size: 14px;
	font-weight: 700;
	color: var(--staffprt-primary);
	cursor: pointer;
}

.po-line-table {
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.po-line-table__head {
	display: grid;
	grid-template-columns: minmax(0, 2fr) 80px 140px 100px 110px;
	gap: 12px;
	padding: 0 8px;
	font-size: 12px;
	font-weight: 600;
	color: #94a3b8;
}

.po-line-row {
	display: grid;
	grid-template-columns: minmax(0, 2fr) 80px 140px 100px 110px;
	gap: 12px;
	align-items: center;
	padding: 12px;
	border: 1px solid #F1F3F2;
	border-radius: 14px;
	background: #F4F6F9;
	margin-bottom: 12px;
}

.po-line-row__part {
	display: flex;
	align-items: center;
	gap: 12px;
	min-width: 0;
}

.po-line-row__part img {
	width: 48px;
	height: 48px;
	border-radius: 10px;
	object-fit: cover;
	background: #f8fafc;
}

.po-line-row__name {
	margin: 0 0 4px;
	font-size: 14px;
	font-weight: 700;
	color: #0f172a;
}

.po-line-row__sku {
	margin: 0;
	font-size: 13px;
	color: #64748b;
}

.po-line-row__qty,
.po-line-row__total {
	font-size: 14px;
	font-weight: 600;
	color: #0f172a;
}

.po-line-editor {
	padding: 16px;
	border: 1px solid #0F172A;
	border-radius: 16px;
	background: #fff;
}

.po-line-editor__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin-bottom: 16px;
}

.po-line-editor__title {
	margin: 0;
	font-size: 16px;
	font-weight: 700;
	color: #0f172a;
}

.po-line-editor__fields {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 12px;
	margin-bottom: 14px;
	align-items: start;
}

.po-suggest {
	position: relative;
}

.po-suggest__list {
	position: absolute;
	top: calc(100% + 4px);
	left: 0;
	right: 0;
	z-index: 40;
	margin: 0;
	padding: 6px;
	list-style: none;
	max-height: 240px;
	overflow-y: auto;
	border: 1px solid #dce3eb;
	border-radius: 12px;
	background: #fff;
	box-shadow: 0 12px 28px rgba(15, 23, 42, 0.12);
}

.po-suggest__list[hidden] {
	display: none;
}

.po-suggest__item {
	display: grid;
	grid-template-columns: 36px minmax(0, 1fr);
	align-items: center;
	gap: 10px;
	padding: 8px;
	border: 0;
	border-radius: 10px;
	background: transparent;
	cursor: pointer;
	text-align: left;
	width: 100%;
	font: inherit;
	color: inherit;
}

.po-suggest__item:hover,
.po-suggest__item.is-active {
	background: #f1f5f9;
}

.po-suggest__thumb {
	width: 36px;
	height: 36px;
	border-radius: 8px;
	object-fit: cover;
	background: #f8fafc;
}

.po-suggest__name {
	display: block;
	font-size: 13px;
	font-weight: 600;
	color: #0f172a;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.po-suggest__meta {
	display: block;
	margin-top: 2px;
	font-size: 12px;
	color: #64748b;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.po-suggest__empty,
.po-suggest__loading {
	margin: 0;
	padding: 10px 8px;
	font-size: 13px;
	color: #94a3b8;
}

.po-line-editor__position-row {
	display: flex;
	align-items: stretch;
	gap: 8px;
}

.po-line-editor__position-row .form-field__control {
	flex: 1 1 auto;
	min-width: 0;
}

.po-line-editor__gear {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex: 0 0 44px;
	width: 44px;
	height: 44px;
	padding: 0;
	border: 1px solid #dce3eb;
	border-radius: 10px;
	background: #f8fafc;
	cursor: pointer;
}

.po-line-editor__gear:hover {
	background: #f1f5f9;
}

.po-line-editor__pricing {
	display: grid;
	grid-template-columns: auto 1fr 1fr;
	gap: 12px;
	align-items: end;
	margin-bottom: 14px;
}

.po-line-editor__foot {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	flex-wrap: wrap;
}

.po-line-editor__actions {
	display: flex;
	gap: 10px;
}

/* Scan QR code modal (PO step 2 / Inventory) */
body.po-scan-open,
body.inv-scan-open {
	overflow: hidden;
}

.po-scan-modal {
	position: fixed;
	inset: 0;
	z-index: 1200;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px;
}

.po-scan-modal[hidden] {
	display: none;
}

.po-scan-modal__backdrop {
	position: absolute;
	inset: 0;
	background: rgba(15, 23, 42, 0.55);
}

.po-scan-modal__dialog {
	position: relative;
	z-index: 1;
	display: flex;
	flex-direction: column;
	gap: 18px;
	width: min(520px, 100%);
	max-height: calc(100vh - 40px);
	overflow: auto;
	padding: 22px 22px 18px;
	border-radius: 20px;
	background: #fff;
	box-shadow: 0 24px 60px rgba(15, 23, 42, 0.28);
}

.po-scan-modal__head {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 12px;
}

.po-scan-modal__title {
	margin: 0 0 4px;
	font-size: 20px;
	font-weight: 700;
	color: #0f172a;
}

.po-scan-modal__sub {
	margin: 0;
	font-size: 14px;
	line-height: 1.4;
	color: #64748b;
}

.po-scan-modal__close {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 32px;
	height: 32px;
	padding: 0;
	border: 0;
	border-radius: 8px;
	background: transparent;
	font-size: 24px;
	line-height: 1;
	color: #64748b;
	cursor: pointer;
}

.po-scan-modal__close:hover {
	background: #f1f5f9;
	color: #0f172a;
}

.po-scan-modal__camera {
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.po-scan-modal__frame {
	position: relative;
	overflow: hidden;
	border-radius: 16px;
	background: #0f172a;
	aspect-ratio: 16 / 10;
}

.po-scan-modal__reader {
	width: 100%;
	height: 100%;
}

.po-scan-modal__reader video {
	width: 100% !important;
	height: 100% !important;
	object-fit: cover;
	border-radius: 0;
}

.po-scan-modal__reader #html5-qrcode-button-camera-permission,
.po-scan-modal__reader #html5-qrcode-anchor-scan-type-change,
.po-scan-modal__reader img[alt="Info icon"] {
	display: none !important;
}

.po-scan-modal__laser {
	pointer-events: none;
	position: absolute;
	left: 12%;
	right: 12%;
	top: 50%;
	z-index: 3;
	height: 2px;
	border-radius: 2px;
	background: var(--staffprt-primary);
	box-shadow: 0 0 10px color-mix(in srgb, var(--staffprt-primary) 70%, transparent);
	transform: translateY(-50%);
	animation: po-scan-laser 1.8s ease-in-out infinite;
}

.po-scan-modal__frame::before {
	content: "";
	pointer-events: none;
	position: absolute;
	inset: 14% 10%;
	border: 2px solid rgba(255, 255, 255, 0.92);
	border-radius: 12px;
	z-index: 2;
}

@keyframes po-scan-laser {
	0%,
	100% {
		top: 28%;
	}
	50% {
		top: 72%;
	}
}

.po-scan-modal__cam-error {
	margin: 0;
	padding: 10px 12px;
	border-radius: 10px;
	background: #fef3f2;
	border: 1px solid #fecdca;
	color: #b42318;
	font-size: 13px;
	line-height: 1.4;
}

.po-scan-modal__identified {
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.po-scan-modal__ok {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	margin: 0;
	font-size: 14px;
	font-weight: 700;
	color: #0f172a;
}

.po-scan-modal__ok span[aria-hidden="true"] {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 22px;
	height: 22px;
	border-radius: 50%;
	background: #0f172a;
	color: #fff;
	font-size: 12px;
}

.po-scan-modal__card {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 12px;
	border: 1.5px solid #86efac;
	border-radius: 14px;
	background: #f0fdf4;
}

.po-scan-modal__thumb {
	width: 48px;
	height: 48px;
	border-radius: 10px;
	object-fit: cover;
	background: #fff;
	flex: 0 0 auto;
}

.po-scan-modal__card-body {
	flex: 1 1 auto;
	min-width: 0;
}

.po-scan-modal__card-name {
	margin: 0 0 4px;
	font-size: 14px;
	font-weight: 700;
	color: #0f172a;
}

.po-scan-modal__card-meta {
	margin: 0;
	font-size: 12px;
	color: #64748b;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.po-scan-modal__stock {
	flex: 0 0 auto;
	padding: 4px 10px;
	border-radius: 999px;
	background: #dcfce7;
	color: #166534;
	font-size: 12px;
	font-weight: 700;
	white-space: nowrap;
}

.po-scan-modal__foot {
	display: flex;
	align-items: center;
	justify-content: flex-end;
	gap: 10px;
	flex-wrap: wrap;
}

.po-scan-modal__foot .btn--muted:first-child {
	margin-right: auto;
}

.po-review-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 16px;
	margin-bottom: 22px;
}

.po-box {
	padding: 16px 18px;
	border: 1px solid #eef2f6;
	border-radius: 14px;
	background: #fff;
}

.po-unic .po-box {
	background: rgba(244, 246, 249, 0.7);
}

.po-box__title {
	margin: 0 0 14px;
	font-size: 15px;
	font-weight: 700;
	color: #0f172a;
}

.po-unic .po-box__title {
	color: #5E6880;
	margin-bottom: 24px;
}

.po-supplier-list {
	margin: 0;
	padding: 0;
	list-style: none;
}

.po-supplier-list__item {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 10px 0;
	font-size: 14px;
	font-weight: 600;
	color: #0f172a;
	border-top: 1px solid #eef2f6;
}

.po-unic .po-supplier-list__item {
	padding: 16px 0;
}

.po-supplier-list__item:first-child {
	border-top: 0;
	padding-top: 0;
}

.po-supplier-list__name {
	min-width: 0;
	line-height: 1.35;
	color: #0f172a;
}

.po-meta-list {
	margin: 0;
}

.po-meta-list__row {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr);
	gap: 12px;
	padding: 10px 0;
	border-top: 1px solid #eef2f6;
}

.po-unic .po-meta-list__row {
	padding: 16px 0;
}

.po-meta-list__row:first-child {
	border-top: 0;
	padding-top: 0;
}

.po-meta-list__row dt {
	margin: 0;
	font-size: 13px;
	color: #64748b;
}

.po-meta-list__row dd {
	margin: 0;
	font-size: 14px;
	font-weight: 600;
	color: #0f172a;
	text-align: right;
}

.po-lines__title {
	margin: 0 0 12px;
	font-size: 15px;
	font-weight: 700;
	color: #5E6880;
}

.po-lines__list {
	margin: 0;
	padding: 0;
	list-style: none;
}

.po-lines__item {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	padding: 14px 0;
	border-top: 1px solid #eef2f6;
	font-size: 14px;
}

/* .po-lines__item:first-child {
	border-top: 0;
	padding-top: 0;
} */

.po-lines__name {
	font-weight: 600;
	color: #0f172a;
}

.po-lines__meta {
	display: inline-flex;
	align-items: center;
	gap: 20px;
	white-space: nowrap;
	color: #0f172a;
	font-weight: 600;
}

.po-lines__qty {
	color: #64748b;
}

.po-lines__price {
	min-width: 45px;
	text-align: right;
}

.po-lines__sep {
	color: #cbd5e1;
}

.po-totals {
	margin-top: 12px;
	padding: 14px 16px;
	border-radius: 12px;
	background: #f8fafc;
}

.po-totals__row {
	display: flex;
	justify-content: space-between;
	gap: 12px;
	padding: 6px 0;
	font-size: 14px;
	color: #475569;
}

.po-totals__row--total {
	margin-top: 4px;
	padding-top: 10px;
	border-top: 1px solid #e2e8f0;
	font-size: 16px;
	font-weight: 700;
	color: #0f172a;
}

.po-totals__row--total span:last-child {
	color: var(--staffprt-primary);
}

.po-success__hero {
	display: flex;
	flex-direction: column;
	align-items: center;
	text-align: center;
	padding: 28px 12px 8px;
}

.po-success__icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 64px;
	height: 64px;
	margin-bottom: 16px;
	border-radius: 50%;
	background: #e8f8ef;
	color: #16a34a;
	font-size: 28px;
	font-weight: 700;
}

.po-success__title {
	margin: 0 0 8px;
	font-size: 22px;
	font-weight: 700;
	color: #0f172a;
}

.po-success__sub {
	margin: 0;
	font-size: 14px;
	color: #64748b;
}

.po-success__foot {
	display: flex;
	justify-content: center;
	gap: 10px;
	flex-wrap: wrap;
	margin-top: 28px;
}

.po-print {
	display: none;
	color: #0f172a;
	background: #fff;
}

.po-print__title {
	margin: 0 0 8px;
	font-size: 22px;
	font-weight: 700;
	color: #0f172a;
}

.po-print__meta,
.po-print__lines {
	width: 100%;
	border-collapse: collapse;
	margin: 16px 0;
	font-size: 13px;
}

.po-print__meta th,
.po-print__meta td,
.po-print__lines th,
.po-print__lines td {
	border: 1px solid #cbd5e1;
	padding: 8px 10px;
	text-align: left;
	vertical-align: top;
}

@media print {
	body * {
		visibility: hidden !important;
	}

	.po-print,
	.po-print * {
		visibility: visible !important;
	}

	.po-print {
		display: block !important;
		position: absolute;
		left: 0;
		top: 0;
		width: 100%;
		padding: 24px;
		color: #0f172a;
		background: #fff;
	}
}

.po-detail__nav {
	margin-bottom: 16px;
}

.po-detail__back {
	display: inline-flex;
	margin-bottom: 10px;
	font-size: 14px;
	font-weight: 600;
	color: #475569;
	text-decoration: none;
}

.po-detail__back:hover {
	color: var(--staffprt-primary);
}

.po-status-preview {
	margin: 10px 0 0;
}

.po-detail__heading {
	display: flex;
	align-items: center;
	gap: 12px;
	flex-wrap: wrap;
}

.po-detail__title-wrap {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 8px;
	min-width: 0;
}

.po-detail__title-row {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	min-width: 0;
}

.po-detail__heading .btn {
	margin-left: auto;
}

.po-detail__heading .po-detail__rename {
	margin-left: 0;
	padding: 6px 8px;
}

.po-detail__heading .po-detail__rename-field .btn {
	margin-left: 0;
}

.po-detail__id {
	margin: 0;
	font-size: 22px;
	font-weight: 700;
	color: #0f172a;
}

.po-detail__rename-field {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
	max-width: 420px;
}

.po-detail__rename-field[hidden] {
	display: none !important;
}

.po-detail__rename-input {
	min-width: 200px;
	flex: 1 1 180px;
	height: 36px;
	padding: 0 12px;
	border: 1px solid #c9d2dd;
	border-radius: 10px;
	font: inherit;
	color: #0f172a;
	background: #fff;
}

.po-detail__rename-input:focus {
	outline: none;
	border-color: var(--staffprt-primary);
	box-shadow: 0 0 0 3px color-mix(in srgb, var(--staffprt-primary) 18%, transparent);
}

.po-detail__rename-hint {
	flex: 1 1 100%;
	margin: 0;
	font-size: 12px;
	color: #64748b;
}

.po-detail__rename-hint.is-error {
	color: var(--staffprt-primary);
}

@media (max-width: 1100px) {
	.po-stat-grid {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}

	.po-part-row__main {
		flex-direction: column;
		align-items: stretch;
	}

	.po-part-row__icon {
		margin: 0;
	}

	.po-part-row__fields {
		grid-template-columns: 1fr;
	}

	.po-part-row__thumb {
		justify-self: start;
	}

	.po-line-table__head,
	.po-line-row {
		grid-template-columns: minmax(0, 1.6fr) 70px 120px 90px 100px;
	}
}

@media (max-width: 800px) {
	.po-stat-grid,
	.po-form-grid,
	.po-review-grid,
	.po-line-editor__fields,
	.po-line-editor__pricing {
		grid-template-columns: 1fr;
	}

	.po-scan-modal__dialog {
		padding: 18px 16px 14px;
	}

	.po-scan-modal__foot {
		flex-direction: column-reverse;
		align-items: stretch;
	}

	.po-scan-modal__foot .btn--muted:first-child {
		margin-right: 0;
	}

	.po-scan-modal__card {
		flex-wrap: wrap;
	}

	.po-stepper {
		flex-direction: column;
		align-items: flex-start;
		gap: 12px;
	}

	.po-stepper__item {
		width: 100%;
	}

	.po-stepper__item::after {
		display: none;
	}

	.po-line-table__head {
		display: none;
	}

	.po-line-row {
		grid-template-columns: 1fr;
	}

	.po-card__foot,
	.po-success__foot {
		justify-content: stretch;
	}

	.po-card__foot .btn,
	.po-success__foot .btn {
		width: 100%;
		justify-content: center;
	}
}


