/* Light theme = default/fallback. Monochrome (black/white) brand accent. */
:root {
	--bg: #f4f5f7;
	--surface: #ffffff;
	--surface-2: #eef0f3;
	--border: #d9dde3;
	--text: #1b1e24;
	--muted: #5e6672;
	--primary: #17191e;        /* near-black accent */
	--primary-hover: #000000;
	--on-primary: #ffffff;     /* text/icon on the accent */
	--danger: #c23535;
	--ok: #1f9d57;
	--overlay: rgba(244, 245, 247, .97);
	--radius: 10px;
	--list-row-hover: #e8eaed;
}

/* Dark theme = softened slate (not pure black), near-white accent. */
:root[data-theme="dark"] {
	--bg: #15171c;
	--surface: #1d2027;
	--surface-2: #262a32;
	--border: #333945;
	--text: #e7e9ee;
	--muted: #99a2af;
	--primary: #ededf0;        /* near-white accent */
	--primary-hover: #ffffff;
	--on-primary: #15171c;
	--danger: #f87171;
	--ok: #4ade80;
	--overlay: rgba(21, 23, 28, .97);
	--list-row-hover: #2a2f36;
}

* { box-sizing: border-box; }

body {
	margin: 0;
	font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
	background: var(--bg);
	color: var(--text);
	line-height: 1.5;
	transition: background-color .15s ease, color .15s ease;
}

a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }

code { background: var(--surface-2); padding: .1rem .35rem; border-radius: 5px; font-size: .85em; }

.muted { color: var(--muted); }

.skip-link {
	position: absolute; left: -9999px; top: auto; width: 1px; height: 1px; overflow: hidden;
}
.skip-link:focus {
	left: 1rem; top: 1rem; width: auto; height: auto; z-index: 10001;
	padding: .5rem .75rem; background: var(--surface); border: 1px solid var(--border); border-radius: 8px;
}

/* ---- App shell (sidebar + main) ---- */
.admin-shell {
	min-height: 100vh;
	background: var(--bg);
}

.sidebar {
	position: fixed;
	inset: 0 auto 0 0;
	z-index: 1000;
	width: 16rem;
	display: flex;
	flex-direction: column;
	background: #12141a;
	color: #e7e9ee;
	border-right: 1px solid #2a2f38;
	transition: transform .2s ease;
}
:root[data-theme="dark"] .sidebar {
	background: #0e1014;
	border-right-color: #2a2f38;
}

.sidebar-brand {
	padding: 1.1rem 1.15rem 1rem;
	border-bottom: 1px solid rgba(255, 255, 255, .08);
	font-weight: 700;
	font-size: 1rem;
	letter-spacing: -.01em;
}
.sidebar-brand a {
	color: #fff;
	text-decoration: none;
}
.sidebar-brand a:hover {
	color: #fff;
	opacity: .85;
	text-decoration: none;
}

.sidebar-nav {
	flex: 1;
	overflow-y: auto;
	padding: .75rem 0 1rem;
}
.sidebar-groups,
.sidebar-children,
.sidebar-child-item {
	list-style: none;
	margin: 0;
	padding: 0;
}

.sidebar-group {
	margin: 0 0 .15rem;
}

.sidebar-parent-link {
	font-weight: 600;
}
.sidebar-parent-link.is-in-section {
	color: #fff;
	background: rgba(255, 255, 255, .08);
	border-left-color: rgba(255, 255, 255, .55);
	font-weight: 700;
}

.sidebar-group.is-active .sidebar-children {
	margin: .15rem .55rem .45rem;
	padding: .2rem 0 .35rem;
	background: rgba(0, 0, 0, .28);
	border-radius: 8px;
	border: 1px solid rgba(255, 255, 255, .06);
}

.sidebar-details {
	border: 0;
	margin: 0;
}
.sidebar-details > summary {
	list-style: none;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: .5rem;
	padding: .5rem 1.15rem;
	color: rgba(255, 255, 255, .82);
	font-size: .9rem;
	font-weight: 600;
	user-select: none;
}
.sidebar-details > summary::-webkit-details-marker { display: none; }
.sidebar-details > summary::marker { content: ''; }
.sidebar-details > summary:hover {
	color: #fff;
	background: rgba(255, 255, 255, .06);
}
.sidebar-details[open] > summary {
	color: #fff;
	background: rgba(255, 255, 255, .08);
}
.sidebar-chevron {
	flex-shrink: 0;
	width: .45rem;
	height: .45rem;
	border-right: 2px solid currentColor;
	border-bottom: 2px solid currentColor;
	transform: rotate(-45deg);
	transition: transform .15s ease;
	margin-right: .2rem;
	opacity: .75;
}
.sidebar-details[open] .sidebar-chevron {
	transform: rotate(45deg);
	margin-top: -.15rem;
}

.sidebar-section-label {
	padding: .65rem 1.15rem .35rem;
	font-size: .68rem;
	font-weight: 700;
	letter-spacing: .08em;
	text-transform: uppercase;
	color: rgba(255, 255, 255, .42);
}

.sidebar-link,
.sidebar-child {
	display: block;
	padding: .5rem 1.15rem;
	color: rgba(255, 255, 255, .72);
	font-size: .9rem;
	font-weight: 500;
	text-decoration: none;
	border-left: 3px solid transparent;
	transition: background .12s ease, color .12s ease, border-color .12s ease;
}
.sidebar-child {
	padding: .4rem 1rem .4rem 1.35rem;
	font-size: .86rem;
	font-weight: 500;
	color: rgba(255, 255, 255, .58);
}
.sidebar-subgroup-label {
	padding: .5rem 1rem .15rem 1.1rem;
	font-size: .62rem;
	font-weight: 700;
	letter-spacing: .08em;
	text-transform: uppercase;
	color: rgba(255, 255, 255, .48);
	list-style: none;
}
.sidebar-subgroup-label:first-child {
	padding-top: .2rem;
}
.sidebar-link:hover,
.sidebar-child:hover {
	color: #fff;
	background: rgba(255, 255, 255, .06);
	text-decoration: none;
}
.sidebar-link.is-active,
.sidebar-child.is-active,
.sidebar-parent-link.is-active {
	color: #fff;
	background: rgba(255, 255, 255, .1);
	border-left-color: #fff;
	font-weight: 600;
}

.sidebar-foot {
	padding: .9rem 1.15rem 1.1rem;
	border-top: 1px solid rgba(255, 255, 255, .08);
	font-size: .82rem;
}
.sidebar-user .who {
	display: block;
	color: rgba(255, 255, 255, .55);
	margin-bottom: .4rem;
	word-break: break-word;
	font-size: .8rem;
}
.sidebar-user .tag {
	background: rgba(255, 255, 255, .14);
	color: #fff;
}
.sidebar-user-links {
	display: flex;
	gap: .85rem;
	flex-wrap: wrap;
	align-items: center;
}
.sidebar-foot-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: .75rem;
}
.sidebar-foot-theme {
	flex-shrink: 0;
	margin-left: auto;
}
.sidebar-foot .theme-toggle {
	padding: .3rem .5rem;
	font-size: .95rem;
	line-height: 1;
	background: transparent;
	border: 1px solid rgba(255, 255, 255, .22);
	border-radius: 8px;
	color: rgba(255, 255, 255, .78);
	cursor: pointer;
}
.sidebar-foot .theme-toggle:hover {
	color: #fff;
	border-color: rgba(255, 255, 255, .45);
}
.sidebar-user-links a {
	color: rgba(255, 255, 255, .72);
	font-weight: 600;
	font-size: .82rem;
	text-decoration: none;
}
.sidebar-user-links a:hover {
	color: #fff;
	text-decoration: underline;
}

.admin-main {
	min-height: 100vh;
	margin-left: 16rem;
	min-width: 0;
	display: flex;
	flex-direction: column;
}

.admin-topbar {
	display: flex;
	align-items: center;
	gap: 1rem;
	padding: 0 1.25rem;
	min-height: 56px;
	background: var(--surface);
	border-bottom: 1px solid var(--border);
	position: sticky;
	top: 0;
	z-index: 20;
}
.admin-topbar-title { flex: 1; min-width: 0; }
.admin-topbar-actions {
	display: flex;
	flex-wrap: wrap;
	gap: .5rem;
	align-items: center;
	justify-content: flex-end;
	margin-left: auto;
}
.admin-topbar-actions form { display: inline; margin: 0; }
.admin-topbar .btn { text-decoration: none; }
.admin-topbar .btn:hover { text-decoration: none; }
.page-title {
	margin: 0;
	font-size: 1.15rem;
	font-weight: 700;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.sidebar-toggle {
	display: none;
	flex-direction: column;
	justify-content: center;
	gap: 4px;
	width: 2.25rem;
	height: 2.25rem;
	padding: .35rem;
	background: transparent;
	border: 1px solid var(--border);
	border-radius: 8px;
}
.sidebar-toggle-bar {
	display: block;
	height: 2px;
	background: var(--text);
	border-radius: 1px;
}
.sidebar-backdrop {
	position: fixed;
	inset: 0;
	z-index: 999;
	background: rgba(0, 0, 0, .45);
}

.userbox { display: flex; align-items: center; gap: .75rem; font-size: .9rem; }
.userbox .who { color: var(--muted); }
.page-meta { margin: 0 0 1rem; font-size: .82rem; }

.page-tabs { display: flex; flex-wrap: wrap; gap: .35rem; margin: 0 0 1.25rem; }
.page-tab {
	padding: .45rem .85rem; border-radius: 999px; border: 1px solid var(--border);
	background: var(--surface); color: inherit; text-decoration: none; font-size: .85rem; font-weight: 600;
}
.page-tab:hover { border-color: var(--text); }
.page-tab.is-active { background: var(--surface-2); border-color: var(--text); }

.filter-bar { display: flex; flex-wrap: wrap; gap: .5rem 1rem; align-items: flex-end; }
.filter-bar label {
	flex: 0 1 auto;
	margin: 0;
	display: flex;
	flex-direction: column;
	gap: .2rem;
	font-size: .78rem;
	color: var(--muted);
	min-width: 0;
}
.filter-actions {
	display: flex;
	flex-wrap: wrap;
	gap: .5rem;
	align-items: center;
	flex: 0 0 auto;
}
.filter-bar label select {
	width: auto;
	min-width: 9rem;
	max-width: 16rem;
	margin: 0;
}
.filter-bar label input[type=search],
.filter-bar label input[type=text]:not([type=hidden]) {
	width: auto;
	min-width: 10rem;
	max-width: 20rem;
	margin: 0;
}
.input,
.select,
textarea.input,
input[type=text],
input[type=email],
input[type=password],
input[type=search],
input[type=number],
input[type=date],
input[type=url],
select,
textarea {
	display: block;
	width: 100%;
	padding: .5rem .65rem;
	font-size: .9rem;
	font-family: inherit;
	line-height: 1.4;
	color: var(--text);
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: 8px;
	transition: border-color .12s ease;
}
.input-sm,
.input.input-sm,
select.input-sm {
	padding: .4rem .55rem;
	font-size: .85rem;
	border-radius: 6px;
}
.input:focus,
.select:focus,
input:focus,
select:focus,
textarea:focus {
	outline: none;
	border-color: var(--primary);
}
input:disabled,
select:disabled,
textarea:disabled,
.input:disabled {
	opacity: .65;
	cursor: not-allowed;
}
label.check input[type=checkbox],
label.check input[type=radio] {
	width: auto;
	margin: 0;
}

/* ---- Unified buttons ---- */
button,
.btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: .35rem;
	cursor: pointer;
	padding: .5rem .85rem;
	font-size: .88rem;
	font-weight: 600;
	font-family: inherit;
	line-height: 1.3;
	text-decoration: none;
	text-transform: capitalize;
	background: var(--surface);
	color: var(--text);
	border: 1px solid var(--border);
	border-radius: 8px;
}
button:hover,
.btn:hover {
	border-color: var(--primary);
	text-decoration: none;
}
.btn-primary,
button[type=submit]:not(.btn-link-danger):not(.btn-trash):not(.theme-toggle):not(.sidebar-toggle) {
	background: var(--primary);
	border-color: var(--primary);
	color: var(--on-primary);
}
.btn-primary:hover,
button[type=submit]:not(.btn-link-danger):not(.btn-trash):not(.theme-toggle):not(.sidebar-toggle):hover {
	background: var(--primary-hover);
	border-color: var(--primary-hover);
	color: var(--on-primary);
}
.btn-sm {
	padding: .35rem .65rem;
	font-size: .82rem;
	border-radius: 6px;
}
button.btn-link-danger,
.btn-link-danger {
	background: transparent;
	border: none;
	padding: 0;
	color: var(--danger);
	font-weight: 600;
	cursor: pointer;
}
button.btn-link-danger:hover,
.btn-link-danger:hover {
	background: transparent;
	border: none;
	text-decoration: underline;
}

.pager { display: flex; gap: .5rem; margin: 1rem 0; }

.admin-topbar .inline-form { display: inline; margin: 0; }
.admin-topbar .inline-form button { margin: 0; }

.sync-log {
	white-space: pre-wrap; font-size: .78rem; background: var(--surface-2);
	padding: .75rem; border-radius: 6px; max-height: 12rem; overflow: auto;
}

.vendor-shell { display: grid; grid-template-columns: 11rem minmax(0, 1fr); gap: 1.25rem; align-items: start; }
@media (max-width: 720px) { .vendor-shell { grid-template-columns: 1fr; } }
.vendor-subnav ul { list-style: none; margin: 0; padding: 0; }
.vendor-subnav-link {
	display: block; padding: .45rem .65rem; margin-bottom: .2rem; border-radius: 6px;
	text-decoration: none; color: inherit; font-size: .88rem; font-weight: 600;
	border-left: 3px solid transparent;
}
.vendor-subnav-link:hover { background: var(--surface-2); }
.vendor-subnav-link.is-active {
	background: var(--surface-2); border-left-color: var(--accent, #0d9488); color: var(--text);
}
.vendor-content { min-width: 0; }
.vendor-content > .alert,
.vendor-content > .card,
.vendor-content > #inv-feed-panel,
.vendor-content > form.card,
.vendor-content > form.form-narrow {
	margin-bottom: 1rem;
}

.map-inline-form {
	display: flex;
	flex-wrap: nowrap;
	gap: .35rem;
	align-items: center;
	max-width: 100%;
}
.map-inline-form .map-code-input,
.map-inline-form input[type=text] {
	display: block;
	width: 8rem;
	min-width: 5rem;
	max-width: 14rem;
	flex: 1 1 8rem;
	margin: 0;
}
.map-inline-form .btn,
.map-inline-form button[type=submit] {
	flex: 0 0 auto;
	margin: 0;
	white-space: nowrap;
}

.products-meta-bar {
	display: flex; flex-wrap: wrap; align-items: center; gap: .5rem .75rem; margin: 0 0 .75rem;
	padding: .55rem .85rem; background: var(--surface-2); border-radius: var(--radius);
	font-size: .85rem;
}
.products-meta-bar .status-pill { margin-left: auto; }
.products-meta-count { flex: 1 1 auto; min-width: 0; }
.products-catalog > .products-meta-bar { margin-bottom: .75rem; }
.products-catalog.is-loading { opacity: .55; pointer-events: none; transition: opacity .15s; }
.products-catalog-foot { margin-top: .75rem; }
.products-table-wrap { overflow-x: auto; }
.product-compare-cell { display: flex; flex-direction: column; gap: .12rem; font-size: .82rem; line-height: 1.35; white-space: normal; max-width: 22rem; overflow: visible; word-break: break-word; }
.product-compare-line.compare-mismatch {
	color: var(--error, #c53030);
	font-weight: 600;
}
.product-code-sub { margin-top: .15rem; font-size: .75rem; line-height: 1.3; }
.product-map-link { font-weight: 600; text-decoration: none; }
.product-map-link:hover { text-decoration: underline; }
.catalog-badge {
	display: inline-block;
	font-size: .68rem;
	font-weight: 600;
	white-space: nowrap;
	padding: .15rem .45rem;
	border-radius: 4px;
	line-height: 1.35;
}
.catalog-badge--unmapped { background: #d6a03c; color: #1a1d21; }
.catalog-badge--updated { background: #1f9d57; color: #fff; }
.catalog-badge--never { background: #c23535; color: #fff; }
.products-updated-cell { white-space: nowrap; width: 1%; vertical-align: middle; }
.products-push-select { width: 2.25rem; min-width: 2.25rem; text-align: center; vertical-align: middle; padding: .35rem .25rem; box-shadow: none !important; background: transparent; }
.products-push-select input[type=checkbox] { margin: 0; vertical-align: middle; cursor: pointer; accent-color: var(--primary); }
.products-table td:has(.product-compare-cell) { vertical-align: top; min-width: 7.5rem; }
.products-table .products-push-select,
.products-table .products-push-select + .product-code-cell { border-left: none; box-shadow: none; }
.products-table .products-push-select { border-right-color: transparent; }
.products-table-filters th {
	white-space: nowrap;
	padding: .35rem .5rem;
	background: var(--surface-2);
	vertical-align: middle;
}
.products-table-filters-tail {
	background: var(--surface-2);
}
.products-table-filters-row {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: .5rem;
}
.products-table-filters-row select[name="manufacturer"],
.products-table-filters-row select[name="catalog_view"],
.products-table-filters-row .btn {
	width: auto;
	flex: 0 0 auto;
}
.products-table .product-name-cell { max-width: 16rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.products-dashboard { margin-bottom: 1.25rem; grid-template-columns: repeat(4, 1fr); }
@media (max-width: 960px) { .products-dashboard { grid-template-columns: repeat(2, 1fr); } }
.products-dash-stat { display: flex; flex-direction: column; gap: .2rem; padding: 1rem 1.15rem; }
.products-dash-label { font-size: .78rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.products-dash-value { font-size: 1.65rem; font-weight: 700; line-height: 1.15; }
.products-dash-value-sm { font-size: 1rem; font-weight: 600; }
.products-dash-sub { font-size: .78rem; }

.product-detail { display: flex; flex-direction: column; gap: 1rem; max-width: 52rem; }
.product-detail-head { padding: 1rem 1.15rem 1.15rem; }
.product-detail-title { margin: 0 0 .85rem; font-size: 1.25rem; line-height: 1.3; }
.product-detail-panel-title { margin: 0 0 .85rem; font-size: 1rem; font-weight: 600; }
.product-detail-facts {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(10rem, 1fr));
	gap: .65rem 1.25rem;
	margin: 0 0 1rem;
	padding: 0;
}
.product-detail-fact { margin: 0; min-width: 0; }
.product-detail-fact dt {
	margin: 0 0 .15rem;
	font-size: .72rem;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: .04em;
	color: var(--muted);
}
.product-detail-fact dd { margin: 0; font-size: .92rem; line-height: 1.4; }
.product-detail-actions {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: .5rem;
	padding-top: .15rem;
}
.product-detail-actions .btn,
.product-detail-actions a.btn {
	background: var(--primary);
	border-color: var(--primary);
	color: var(--on-primary);
}
.product-detail-actions .btn:hover,
.product-detail-actions a.btn:hover {
	background: var(--primary-hover);
	border-color: var(--primary-hover);
	color: var(--on-primary);
}
.product-detail-meta { margin: 0; font-size: .9rem; }
.product-detail-compare { padding: 1rem 1.15rem; overflow-x: auto; }
.product-detail-compare-table { margin: 0; }
.product-detail-compare-table th[scope=row] { text-align: left; color: var(--muted); font-weight: 500; white-space: nowrap; }
.product-detail-compare-table td.compare-mismatch,
.product-detail-compare-table th.compare-mismatch {
	background: var(--text, #1a1d21);
	color: #fff;
	font-weight: 600;
}
.product-detail-map { padding: 1rem 1.15rem; }
.product-map-form { max-width: 24rem; }
.product-map-label { display: flex; flex-direction: column; gap: .25rem; }
.product-map-current { margin: .5rem 0 0; font-size: .9rem; }
.product-map-selected { margin: .35rem 0 0; font-size: .88rem; }
.product-map-dialog { border: 1px solid var(--border); border-radius: var(--radius); padding: 0; max-width: min(42rem, calc(100vw - 2rem)); width: 100%; background: var(--surface); color: var(--text); box-shadow: 0 12px 40px rgba(0,0,0,.18); }
.product-map-dialog::backdrop { background: rgba(0,0,0,.35); }
.product-map-dialog-inner { padding: 1rem 1.15rem 1.15rem; margin: 0; }
.product-map-dialog-head { display: flex; align-items: center; justify-content: space-between; gap: .75rem; margin-bottom: .85rem; }
.product-map-dialog-title { margin: 0; font-size: 1rem; }
.product-map-dialog-close { padding: .15rem .55rem; font-size: 1.25rem; line-height: 1; background: transparent; }
.product-map-search-label { display: flex; flex-direction: column; gap: .25rem; margin-bottom: .75rem; }
.product-map-results { max-height: min(24rem, 50vh); overflow: auto; }
.product-map-results-table { margin: 0; font-size: .85rem; }
.product-map-results-table .product-map-name { max-width: 16rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.product-map-empty { margin: .5rem 0; font-size: .88rem; }
.product-map-warn { font-size: .75rem; color: var(--error, #c53030); }
.product-detail-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); gap: 1rem; }
.product-detail-panel { padding: 1rem 1.15rem; }
.product-detail-synced { margin: -.35rem 0 .65rem; font-size: .78rem; }
.product-detail-dl { display: grid; grid-template-columns: auto 1fr; gap: .35rem .85rem; margin: 0; font-size: .9rem; }
.product-detail-dl dt { margin: 0; color: var(--muted); }
.product-detail-dl dd { margin: 0; }
.product-detail-vendors { padding: 1rem 1.15rem; overflow-x: auto; }
.product-compare-table { margin: 0; font-size: .88rem; }
.product-compare-table td, .product-compare-table th { white-space: nowrap; }
.brand-review-table { font-size: .88rem; }
.brand-review-table .product-name-cell { max-width: 14rem; }
.compare-feed.compare-mismatch { background: rgba(214, 74, 74, .12); font-weight: 600; }
.compare-row-mismatch .compare-feed.compare-mismatch { box-shadow: inset 3px 0 0 var(--error, #c53030); }
.brand-review-meta { margin-bottom: .75rem; }
.brand-review-filters { margin-bottom: 1rem; }
.products-table { margin: 0; }
.products-table-filters .input { margin: 0; }
.products-table-labels th { font-size: .78rem; text-transform: uppercase; letter-spacing: .03em; }
.product-sku-link { font-weight: 600; text-decoration: none; }
.product-sku-link:hover { text-decoration: underline; }
.product-name-cell { max-width: 18rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tag {
	display: inline-block; font-size: .68rem; text-transform: uppercase; letter-spacing: .04em;
	background: var(--primary); color: var(--on-primary); padding: .05rem .4rem; border-radius: 999px; vertical-align: middle;
}
.theme-toggle { padding: .3rem .55rem; font-size: 1rem; line-height: 1; background: transparent; border-color: var(--border); }
.login-page .theme-toggle { position: fixed; top: 1rem; right: 1rem; }

/* Dashboard home */
.dash-home { max-width: 52rem; display: flex; flex-direction: column; gap: 1rem; }
.dash-products-stats { margin: 0; }
.dash-stat-link { text-decoration: none; color: inherit; transition: border-color .15s, box-shadow .15s; }
.dash-stat-link:hover { border-color: var(--primary); box-shadow: 0 0 0 1px var(--primary); }
.dash-greeting { margin: 0 0 1.25rem; font-size: .95rem; }
.dash-status-title { margin: 0; font-size: 1.05rem; text-transform: none; letter-spacing: -.01em; }
.dash-status-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	flex-wrap: wrap;
	margin-bottom: .75rem;
}
.dash-status-counts { display: flex; gap: .4rem; flex-wrap: wrap; }
.dash-status-lead { margin: 0; }
.dash-alert-table { margin: 0; }
.dash-alert-table td:last-child { width: 1%; white-space: nowrap; text-align: right; }
.dash-status-badge {
	display: inline-block;
	padding: .35rem .65rem;
	font-size: .82rem;
	font-weight: 600;
	line-height: 1.2;
	border-radius: 8px;
	white-space: nowrap;
	border: none;
	text-transform: none;
}
.dash-status-badge-warn {
	background: var(--primary);
	color: var(--on-primary);
}
.dash-alert-table td:nth-child(2) { white-space: nowrap; }
.dash-alert-table .catalog-badge { text-transform: none; }
.dash-alert-list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	gap: .5rem;
}
.dash-alert {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: .75rem;
	padding: .7rem .85rem;
	border-radius: 8px;
	border: 1px solid var(--border);
	background: var(--surface-2);
}
.dash-alert-body {
	display: flex;
	flex-direction: column;
	gap: .15rem;
	min-width: 0;
}
.dash-alert-error { border-color: rgba(194,53,53,.35); background: rgba(194,53,53,.08); }
.dash-alert-warn { border-color: rgba(214,158,46,.35); background: rgba(214,158,46,.08); }

/* Full-page busy overlay (nav clicks + form submits on slow pages) */
body.admin-is-busy { overflow: hidden; }
.admin-page-busy {
	position: fixed;
	inset: 0;
	z-index: 11000;
	display: flex;
	align-items: center;
	justify-content: center;
	background: var(--overlay);
	backdrop-filter: blur(3px);
}
.admin-page-busy[hidden] { display: none !important; }
.admin-page-busy-card {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: .75rem;
	padding: 1.5rem 2rem;
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: var(--radius);
	box-shadow: 0 12px 40px rgba(0, 0, 0, .18);
}
.admin-page-busy-spinner {
	width: 2rem;
	height: 2rem;
	border: 3px solid var(--border);
	border-top-color: var(--primary);
	border-radius: 50%;
	animation: admin-spin .7s linear infinite;
}
.admin-page-busy-text { margin: 0; font-weight: 600; color: var(--text); }
@keyframes admin-spin { to { transform: rotate(360deg); } }

@media (max-width: 960px) {
	.sidebar {
		transform: translateX(-100%);
		box-shadow: 0 8px 32px rgba(0, 0, 0, .35);
	}
	body.sidebar-open .sidebar { transform: translateX(0); }
	.admin-main { margin-left: 0; }
	.sidebar-toggle { display: inline-flex; }
}

/* Legacy top bar (unused; kept for any stragglers) */
.topbar {
	display: flex;
	align-items: center;
	gap: 1.5rem;
	padding: 0 1.25rem;
	height: 56px;
	background: var(--surface);
	border-bottom: 1px solid var(--border);
}
.brand a { font-weight: 700; color: var(--text); }
.mainnav { display: flex; gap: 1rem; flex: 1; flex-wrap: wrap; }
.mainnav a { color: var(--muted); font-size: .92rem; }
.mainnav a:hover { color: var(--text); text-decoration: none; }

/* ---- Content ---- */
.content { flex: 1; width: 90%; max-width: none; margin: 0 auto; padding: 1.5rem 0 2.5rem; }
.content > h1:first-child { font-size: 1.35rem; margin-top: 0; }
h1 { font-size: 1.5rem; margin: 0 0 1rem; }
h2 { font-size: 1.1rem; }

.page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; margin-bottom: 1.25rem; flex-wrap: wrap; }
.page-head h1 { margin: 0; }
.page-head-titles { min-width: 0; }
.page-head-meta { margin: .2rem 0 0; font-size: .82rem; }
.page-head .actions { display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; }
.actions { display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; }

/* ---- Cards / tiles ---- */
.card {
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: var(--radius);
	padding: 1.25rem;
}
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 1rem; }
.tile { display: flex; align-items: center; justify-content: center; min-height: 90px; text-align: center; transition: border-color .15s, transform .05s; }
.tile:hover { border-color: var(--primary); text-decoration: none; transform: translateY(-1px); }
.tile-title { font-weight: 600; color: var(--text); }

/* ---- Forms ---- */
.form-narrow { max-width: 34rem; }
form.card label,
#inv-feed-panel label,
.form-wide label {
	display: block;
	margin: 0 0 .9rem;
	font-size: .9rem;
	color: var(--muted);
}
form.card label .input,
form.card label input,
form.card label select,
#inv-feed-panel label .input,
#inv-feed-panel label input,
#inv-feed-panel label select,
.form-wide label .input,
.form-wide label input,
.form-wide label select {
	margin-top: .3rem;
}
label.check { display: flex; align-items: center; gap: .5rem; color: var(--text); }
fieldset.roles { border: 1px solid var(--border); border-radius: 8px; padding: .9rem 1rem; margin: 0 0 1rem; }
fieldset.roles legend { padding: 0 .4rem; color: var(--muted); font-size: .85rem; }
.hint { font-size: .8rem; color: var(--muted); margin: .25rem 0 1rem; }

.content > .card + .card, .content > form.card + .card { margin-top: 1rem; }

/* ---- Cash dashboard ---- */
.cash-banner { border-radius: var(--radius); padding: 1.25rem 1.5rem; margin: 0 0 1.25rem; border: 1px solid var(--border); }
.cash-banner-status { font-size: .8rem; font-weight: 700; letter-spacing: .08em; opacity: .85; }
.cash-banner-action { font-size: 1.5rem; font-weight: 700; margin-top: .15rem; }
.cash-banner-secondary { margin-top: .35rem; font-size: 1rem; opacity: .9; }
.cash-green  { background: rgba(31,157,87,.12);  border-color: rgba(31,157,87,.45); }
.cash-yellow { background: rgba(214,158,46,.14); border-color: rgba(214,158,46,.5); }
.cash-red    { background: rgba(194,53,53,.14);  border-color: rgba(194,53,53,.5); }
.cash-green .cash-banner-status  { color: var(--ok); }
.cash-yellow .cash-banner-status { color: #b9842b; }
.cash-red .cash-banner-status    { color: var(--danger); }
.cash-metric { display: flex; flex-direction: column; gap: .15rem; }
.cash-value { font-size: 1.6rem; font-weight: 700; }
.cash-value.cash-neg { color: var(--danger); }
.cash-rec { font-size: 1.15rem; font-weight: 600; margin: .25rem 0 .5rem; }
.cash-rec-secondary { font-weight: 600; color: var(--muted); margin: 0 0 .5rem; }
.cash-reasons { margin: .25rem 0 0; padding-left: 1.1rem; color: var(--muted); font-size: .9rem; }
.cash-reasons li { margin: .15rem 0; }
.cash-banner-bullets { margin: .5rem 0 0; padding-left: 1.1rem; font-size: .95rem; opacity: .95; }
.cash-banner-bullets li { margin: .15rem 0; }
.cash-section-title { margin: 1.5rem 0 .5rem; font-size: 1.05rem; color: var(--muted); }
.cash-forecast .cash-value { font-size: 1.9rem; }
.cash-warn { color: #b9842b; }
.cash-value.cash-pos, .trend-good { color: var(--ok); }
.cash-value.trend-bad, .trend-bad { color: var(--danger); }
.cash-value.trend-flat, .trend-flat { color: var(--muted); }
.cash-rec-amount .cash-value { font-size: 2rem; }
.cash-rec { font-size: 1.15rem; font-weight: 600; margin: 0 0 .5rem; }

/* What-if calculator */
.whatif-grid { display: flex; flex-wrap: wrap; gap: 1rem; }
.whatif-grid label { flex: 1 1 180px; }
.whatif-out { display: flex; gap: 2rem; align-items: center; margin: .75rem 0 .25rem; }
.whatif-out div { display: flex; flex-direction: column; gap: .2rem; }
.whatif-out strong { font-size: 1.4rem; }
.wi-red { color: var(--danger); border-color: rgba(194,53,53,.5); }
.wi-yellow { color: #b9842b; border-color: rgba(214,158,46,.5); }
.wi-green { color: var(--ok); border-color: rgba(31,157,87,.5); }
tr.ob-soon td { background: rgba(214,158,46,.10); }

/* Progressive-disclosure home: today decision + capacity cards */
.cash-today { border-radius: var(--radius); padding: 1.5rem 1.75rem; margin: 0 0 1rem; border: 1px solid var(--border); background: var(--surface); }
.cash-today-label { font-size: .72rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.cash-today-action { font-size: 2.4rem; line-height: 1.1; font-weight: 800; margin: .35rem 0 .75rem; }
.cash-today-reason, .cash-today-next { margin: 0 0 .35rem; font-size: 1rem; }
.cash-today-math { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; margin: 1.1rem 0 0; padding: 1rem 0 0; border-top: 1px solid var(--border); }
.cash-today-math dt { margin: 0; font-size: .75rem; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.cash-today-math dd { margin: .2rem 0 0; font-size: 1.5rem; font-weight: 700; }
.cash-today.cash-green .cash-today-action  { color: var(--ok); }
.cash-today.cash-yellow .cash-today-action { color: #b9842b; }
.cash-today.cash-red .cash-today-action    { color: var(--danger); }
@media (max-width: 560px) { .cash-today-math { grid-template-columns: 1fr; } }

.cash-cards-min { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; margin-bottom: 1rem; }
.cash-card-min { display: flex; flex-direction: column; gap: .35rem; padding: 1.1rem 1.25rem; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); text-decoration: none; color: inherit; }
.cash-card-min-label { font-size: .8rem; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.cash-card-min-value { font-size: 1.75rem; font-weight: 700; line-height: 1.15; }
.cash-card-min-primary { border-color: var(--text); }
.cash-card-min-tag { font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.cash-card-min-muted { opacity: .9; }
.cash-home-foot { margin: 0; font-size: .9rem; }
.cash-home-foot a { font-weight: 600; }
@media (max-width: 900px) { .cash-cards-min { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .cash-cards-min { grid-template-columns: 1fr; } }

.cash-hero { border-radius: var(--radius); padding: 1.75rem 1.75rem 1.5rem; margin: 0 0 1.25rem; border: 1px solid var(--border); }
.cash-hero-status { font-size: .8rem; font-weight: 700; letter-spacing: .1em; opacity: .85; }
.cash-hero-label { font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.cash-hero-action { font-size: 2.1rem; line-height: 1.15; font-weight: 800; margin: .25rem 0; }
.cash-hero-reason { font-size: 1.05rem; opacity: .9; }
.cash-hero-more { display: inline-block; margin-top: .9rem; font-weight: 600; }
.cash-hero.cash-green .cash-hero-status  { color: var(--ok); }
.cash-hero.cash-yellow .cash-hero-status { color: #b9842b; }
.cash-hero.cash-red .cash-hero-status    { color: var(--danger); }

.cash-deployable { display: flex; flex-direction: column; gap: .25rem; padding: 1.25rem 1.5rem; margin-bottom: 1.25rem; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); text-decoration: none; color: inherit; transition: border-color .12s ease; }
.cash-deployable:hover { border-color: var(--text); }
.cash-deployable .cash-bal-value { font-size: 2.2rem; }

.cash-balances { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; margin-bottom: 1.25rem; }
.cash-bal { display: flex; flex-direction: column; gap: .25rem; padding: 1.1rem 1.25rem; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); text-decoration: none; color: inherit; transition: border-color .12s ease; }
.cash-bal:hover { border-color: var(--text); }
.cash-bal-label { font-size: .8rem; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.cash-bal-value { font-size: 1.7rem; font-weight: 700; }
.cash-bal-sub { font-size: .82rem; color: var(--muted); font-weight: 600; }
.cash-bal-primary { border-color: var(--text); }
.cash-bal-secondary { opacity: .88; }
.cash-bal-secondary .cash-bal-value { font-size: 1.35rem; }
.muted-value { color: var(--muted); }
@media (max-width: 720px) { .cash-balances { grid-template-columns: repeat(2, 1fr); } }

.cash-home-owed { margin: 0 0 1.25rem; padding: 1.1rem 1.25rem; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
.cash-home-owed-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; margin-bottom: .75rem; }
.cash-home-owed-head h2 { margin: 0; font-size: 1.05rem; }
.cash-subhead { margin: 1rem 0 .35rem; font-size: .92rem; color: var(--muted); }
.cash-owed-summary { margin-bottom: .5rem; }
.cash-owed-summary .card { padding: .85rem 1rem; }

.cash-drill { display: flex; flex-wrap: wrap; gap: .5rem; }
.cash-drill a { padding: .55rem .9rem; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); text-decoration: none; color: inherit; font-weight: 600; font-size: .9rem; }
.cash-drill a:hover { border-color: var(--text); }
.cash-asof { margin-top: 1rem; }
.cash-updated { margin: .15rem 0 0; font-size: .82rem; color: var(--muted); }

.cash-details-panel { margin: 0 0 1rem; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.cash-details-panel > summary { padding: .85rem 1.1rem; font-weight: 700; cursor: pointer; list-style: none; }
.cash-details-panel > summary::-webkit-details-marker { display: none; }
.cash-details-panel > summary::before { content: '▸ '; color: var(--muted); }
.cash-details-panel[open] > summary::before { content: '▾ '; }
.cash-details-panel .cash-details-body { padding: 0 1.1rem 1.1rem; }
.cash-details-panel .cash-details-body .card { margin: 0; border: none; padding: 0; }
.cash-details-panel .cash-details-body .card h2 { font-size: 1rem; margin: 0 0 .5rem; }
.table .right { text-align: right; }

/* ---- Status pill ---- */
.status-pill { display: inline-block; font-size: .72rem; font-weight: 600; padding: .1rem .5rem; border-radius: 999px; border: 1px solid transparent; }
.status-complete { background: #1f9d57; color: #fff; border-color: #1a8a4c; }
.status-error { background: #c23535; color: #fff; border-color: #a72c2c; }
.status-warn { background: #d69e2e; color: #fff; border-color: #bd8a22; }
.status-running { background: #d69e2e; color: #fff; border-color: #bd8a22; }
.status-paused { background: var(--surface-2); color: var(--muted); border-color: var(--border); }
.status-new { background: var(--surface-2); color: var(--muted); border-color: var(--border); }

/* ---- Table ---- */
.table { width: 100%; border-collapse: collapse; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.table th, .table td { text-align: left; padding: .7rem .9rem; border-bottom: 1px solid var(--border); font-size: .9rem; }
.table th { background: var(--surface-2); color: var(--muted); font-weight: 600; }
.table tbody tr:hover > td,
.table tbody tr:hover > th[scope=row] {
	background: var(--list-row-hover, #e8eaed);
}
.table tr:last-child td { border-bottom: none; }
[data-theme="dark"] .table tbody tr:hover > td,
[data-theme="dark"] .table tbody tr:hover > th[scope=row] {
	background: var(--list-row-hover, #2a2f36);
}

/* ---- Alerts ---- */
.alert { padding: .7rem .9rem; border-radius: 8px; margin: 0 0 1rem; font-size: .9rem; }
.alert-error { background: rgba(194,53,53,.12); border: 1px solid rgba(194,53,53,.4); color: var(--danger); }
.alert-ok { background: rgba(31,157,87,.12); border: 1px solid rgba(31,157,87,.4); color: var(--ok); }

/* ---- Idle auto-logout overlay ---- */
#idle-logout-overlay {
	position: fixed; inset: 0; z-index: 9999;
	display: flex; align-items: center; justify-content: center;
	/* Near-opaque: hides on-screen data while the user is away. */
	background: var(--overlay);
	backdrop-filter: blur(4px);
}
#idle-logout-overlay .idle-box {
	background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
	padding: 1.75rem 2rem; max-width: 24rem; text-align: center;
}
#idle-logout-overlay h2 { margin: 0 0 .5rem; }
#idle-logout-overlay [data-count] { color: var(--primary); }
#idle-logout-overlay .idle-actions { display: flex; gap: .75rem; justify-content: center; margin-top: 1.25rem; }

/* ---- Login ---- */
.login-page { display: flex; align-items: center; justify-content: center; min-height: 100vh; padding: 1rem; }
.login-card { width: 100%; max-width: 22rem; }
.login-card h1 { text-align: center; margin-bottom: 1.25rem; }
.login-card label { display: block; margin-bottom: .9rem; font-size: .9rem; color: var(--muted); }
.login-card label .input,
.login-card input { margin-top: .3rem; }
.login-card button { width: 100%; margin-top: .5rem; }
.login-card .ms-btn { display: block; width: 100%; text-align: center; margin-bottom: .25rem; }
.login-card .ms-btn:hover { text-decoration: none; }
.or-sep { text-align: center; color: var(--muted); font-size: .8rem; margin: .9rem 0; position: relative; }
.or-sep::before, .or-sep::after { content: ""; position: absolute; top: 50%; width: 42%; height: 1px; background: var(--border); }
.or-sep::before { left: 0; } .or-sep::after { right: 0; }

/* ---- QBO app inside admin shell ---- */
.qbo-app .meta { margin: 0 0 1rem; }
.qbo-app .filter-bar,
.qbo-app .vendor-filter {
	display: flex;
	flex-wrap: wrap;
	gap: .5rem 1rem;
	align-items: flex-end;
	margin: 0 0 1rem;
}
.qbo-app .filter-bar label,
.qbo-app .vendor-filter label {
	display: flex;
	flex-direction: column;
	gap: .2rem;
	margin: 0;
	font-size: .78rem;
	color: var(--muted);
	flex: 0 1 auto;
	min-width: 0;
}
.qbo-app .filter-bar label select,
.qbo-app .vendor-filter label select {
	display: block;
	width: auto;
	min-width: 9.5rem;
	max-width: 15rem;
	margin: 0;
}
.qbo-app .filter-actions {
	display: flex;
	flex-wrap: wrap;
	gap: .5rem;
	align-items: center;
	flex: 0 0 auto;
}
.qbo-app .toolbar-meta {
	display: flex;
	flex-wrap: wrap;
	gap: .35rem 1rem;
	align-items: center;
	margin: 0 0 .75rem;
	padding: .45rem .75rem;
	background: var(--surface-2);
	border-radius: var(--radius);
	font-size: .85rem;
}
.qbo-app .card,
.qbo-app .vendor-block {
	margin: 0 0 1rem;
}
.qbo-app .qbo-toolbar {
	display: none;
}
.qbo-app .topbar { display: none; }
.qbo-app .btn { text-decoration: none; }
.qbo-app .btn:hover { text-decoration: none; }

.qbo-setup-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(17rem, 1fr));
	gap: 1rem;
	margin-top: 1rem;
}
.qbo-setup-card h2 {
	margin: 0 0 .5rem;
	font-size: 1rem;
}
.qbo-setup-intro { margin-bottom: 0; }

/* Vendor inventory — Spark-style column settings */
.form-wide { max-width: 52rem; }
.inv-col-settings h2 { margin: 0 0 .75rem; font-size: 1.05rem; }
.inv-col-settings-head {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: .75rem;
	margin-bottom: 1rem;
}
.inv-col-panel {
	margin: 0 0 1rem;
	border: 1px solid var(--border);
	border-radius: 8px;
	overflow: hidden;
	background: var(--surface);
}
.inv-col-panel-head {
	padding: .45rem .85rem;
	font-size: .78rem;
	font-weight: 700;
	letter-spacing: .06em;
	text-transform: uppercase;
	color: #fff;
	background: #2a6464;
}
.inv-col-panel-body { padding: 1rem 1.1rem 1.1rem; }
.inv-col-panel-note {
	margin: 0 0 .85rem;
	font-size: .82rem;
	color: var(--muted);
}
.inv-col-field { margin: 0 0 1rem; }
.inv-col-field:last-child { margin-bottom: 0; }
.inv-col-field > label {
	display: block;
	margin: 0 0 .35rem;
	font-size: .88rem;
	font-weight: 600;
	color: var(--text);
}
.inv-col-field select {
	display: block;
	width: 100%;
	max-width: 100%;
	margin: 0;
}
.inv-col-field .hint { margin: .35rem 0 0; }
.inv-col-inline {
	display: flex;
	flex-wrap: nowrap;
	align-items: center;
	gap: .45rem .55rem;
}
.inv-col-field .inv-col-inline select,
.inv-col-inline select {
	display: inline-block;
	width: auto;
	min-width: 10rem;
	max-width: 100%;
	flex: 1 1 12rem;
	margin: 0;
}
.inv-col-field .inv-col-inline .inv-col-discount-pct,
.inv-col-discount-pct {
	display: inline-block;
	width: 4.25rem;
	flex: 0 0 4.25rem;
	margin: 0;
}
.inv-col-inline-suffix {
	font-size: .9rem;
	color: var(--muted);
	white-space: nowrap;
}
.inv-file-actions {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: flex-end;
	gap: .35rem;
	white-space: nowrap;
}
.inv-file-actions .inline-form {
	display: inline-flex;
	margin: 0;
	vertical-align: middle;
}
.inv-file-actions .inv-file-delete-form {
	margin-left: auto;
}
.btn-trash {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: .15rem;
	margin: 0;
	border: none !important;
	background: transparent !important;
	color: var(--muted);
	cursor: pointer;
	line-height: 1;
	box-shadow: none;
	min-width: 0;
}
.btn-trash:hover {
	color: var(--error, #c53030);
	background: transparent !important;
}
.btn-trash svg {
	display: block;
	width: 1.05rem;
	height: 1.05rem;
	fill: currentColor;
}
.inv-col-preview {
	margin: 0 0 1rem;
	font-size: .92rem;
}
.inv-col-preview table { margin-top: .5rem; }
.inv-col-advanced {
	margin-top: 1rem;
	padding-top: .75rem;
	border-top: 1px dashed var(--border);
}
.inv-col-advanced summary {
	cursor: pointer;
	font-size: .85rem;
	font-weight: 600;
	color: var(--muted);
	margin-bottom: .5rem;
}

/* ---- Table row actions (PO management, etc.) ---- */
.po-row-actions { white-space: nowrap; vertical-align: middle; }
.po-row-actions-bar {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: .35rem;
}
.po-row-actions-bar .btn {
	flex-shrink: 0;
}
.qbo-app .btn-receive-stock,
.qbo-app .btn-receive-bill {
	text-transform: none;
	white-space: nowrap;
	color: #fff;
	border: 1px solid transparent;
}
.qbo-app .btn-receive-stock {
	background: #15803d;
	border-color: #15803d;
}
.qbo-app .btn-receive-stock:hover {
	background: #166534;
	border-color: #166534;
	color: #fff;
}
.qbo-app .btn-receive-bill {
	background: #2563eb;
	border-color: #2563eb;
}
.qbo-app .btn-receive-bill:hover {
	background: #1d4ed8;
	border-color: #1d4ed8;
	color: #fff;
}
.action-menu {
	position: relative;
	display: inline-block;
}
.action-menu > summary {
	list-style: none;
}
.action-menu > summary::-webkit-details-marker { display: none; }
.action-menu > summary::marker { content: ''; }
.action-menu-panel {
	position: absolute;
	top: calc(100% + .25rem);
	right: 0;
	z-index: 50;
	min-width: 15rem;
	max-width: 22rem;
	padding: .4rem 0;
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: 8px;
	box-shadow: 0 10px 28px rgba(0, 0, 0, .14);
}
.action-menu-group {
	padding: .45rem .75rem;
	border-bottom: 1px solid var(--border);
}
.action-menu-group:last-child { border-bottom: none; }
.action-menu-label {
	display: block;
	font-size: .68rem;
	font-weight: 700;
	letter-spacing: .04em;
	text-transform: uppercase;
	color: var(--muted);
	margin-bottom: .4rem;
}
.action-menu-links {
	display: flex;
	flex-wrap: wrap;
	gap: .35rem;
}
.action-menu-links .btn { text-decoration: none; }
.action-menu-email {
	display: flex;
	flex-wrap: wrap;
	gap: .35rem;
	align-items: center;
}
.action-menu-email input[type='text'],
.action-menu-email input[type='email'] {
	flex: 1 1 9rem;
	min-width: 0;
	max-width: 100%;
	padding: .35rem .5rem;
	font-size: .82rem;
	border: 1px solid var(--border);
	border-radius: 6px;
	background: var(--surface);
	color: var(--text);
}
.action-menu-danger {
	padding-top: .35rem;
}
.action-menu-danger .btn-link-danger {
	font-size: .82rem;
	padding: .25rem 0;
}
