.embp-admin-shell {
	--embp-paper: #fbf8f4;
	--embp-surface: #fff;
	--embp-ink: #1f1b16;
	--embp-ink-soft: #5c554b;
	--embp-line: #e8e1d6;
	--embp-ember: #c43e15;
	--embp-ember-hover: #a93410;
	--embp-success: #2f7d55;

	box-sizing: border-box;
	max-width: 1180px;
	margin-top: 20px;
	color: var(--embp-ink);
}

.embp-admin-shell *,
.embp-admin-shell *::before,
.embp-admin-shell *::after {
	box-sizing: border-box;
}

.embp-admin-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 24px;
	padding: 20px 24px;
	background: var(--embp-surface);
	border: 1px solid var(--embp-line);
	border-radius: 12px 12px 0 0;
}

.embp-admin-brand {
	display: flex;
	align-items: center;
	gap: 12px;
}

.embp-admin-brand__mark {
	display: block;
	flex: 0 0 auto;
	width: 40px;
	height: 40px;
	object-fit: contain;
}

.embp-admin-brand h1 {
	margin: 0;
	color: var(--embp-ink);
	font-size: 24px;
	line-height: 1.2;
}

.embp-admin-brand p,
.embp-view-heading p {
	margin: 4px 0 0;
	color: var(--embp-ink-soft);
}

.embp-admin-header__actions {
	display: flex;
	align-items: center;
	gap: 12px;
}

.embp-admin-header .button-primary,
.embp-admin-content .button-primary {
	background: var(--embp-ember);
	border-color: var(--embp-ember);
}

.embp-admin-header .button-primary:hover,
.embp-admin-header .button-primary:focus,
.embp-admin-content .button-primary:hover,
.embp-admin-content .button-primary:focus {
	background: var(--embp-ember-hover);
	border-color: var(--embp-ember-hover);
}

.embp-plan-badge {
	display: inline-flex;
	align-items: center;
	min-height: 28px;
	padding: 2px 10px;
	background: var(--embp-paper);
	border: 1px solid var(--embp-line);
	border-radius: 999px;
	color: var(--embp-ink-soft);
	font-size: 12px;
	font-weight: 600;
}

.embp-admin-nav {
	display: flex;
	gap: 4px;
	padding: 0 20px;
	background: var(--embp-surface);
	border-right: 1px solid var(--embp-line);
	border-bottom: 1px solid var(--embp-line);
	border-left: 1px solid var(--embp-line);
}

.embp-admin-nav__link {
	position: relative;
	display: inline-flex;
	align-items: center;
	min-height: 48px;
	padding: 0 14px;
	color: var(--embp-ink-soft);
	font-weight: 500;
	text-decoration: none;
}

.embp-admin-nav__link:hover,
.embp-admin-nav__link:focus {
	color: var(--embp-ember);
}

.embp-admin-nav__link.is-active {
	color: var(--embp-ember);
	font-weight: 600;
}

.embp-admin-nav__link.is-active::after {
	position: absolute;
	right: 12px;
	bottom: -1px;
	left: 12px;
	height: 3px;
	background: var(--embp-ember);
	border-radius: 3px 3px 0 0;
	content: '';
}

.embp-admin-content {
	padding: 24px;
	background: var(--embp-paper);
	border-right: 1px solid var(--embp-line);
	border-bottom: 1px solid var(--embp-line);
	border-left: 1px solid var(--embp-line);
	border-radius: 0 0 12px 12px;
}

.embp-view-heading {
	margin-bottom: 20px;
}

.embp-view-heading h2 {
	margin: 0;
	font-size: 20px;
	line-height: 1.3;
}

.embp-admin-content .components-card,
.embp-settings-panel {
	background: var(--embp-surface);
	border: 1px solid var(--embp-line);
	border-radius: 10px;
	box-shadow: 0 14px 32px -24px rgb(31 27 22 / 28%);
}

.embp-settings-panel {
	padding: 8px 24px 20px;
}

.embp-settings-panel .form-table th {
	width: 190px;
}

.embp-wizard,
.embp-history-screen {
	box-sizing: border-box;
	width: 100%;
	max-width: 100%;
	overflow: hidden;
}

.embp-wizard *,
.embp-history-screen * {
	box-sizing: border-box;
}

.embp-wizard-steps {
	display: flex;
	flex-wrap: wrap;
	gap: 8px 24px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.embp-wizard-steps__item {
	color: #757575;
}

.embp-wizard-steps__item.is-active {
	font-weight: 600;
	color: #1e1e1e;
}

.embp-wizard-steps__item.is-complete {
	color: #007017;
}

.embp-upload-sample {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px 16px;
	margin-bottom: 16px;
	padding: 12px 16px;
	background: #f0f6fc;
	border: 1px solid #c5d9ed;
	border-radius: 4px;
}

.embp-upload-sample p {
	flex: 1 1 100%;
	margin: 0;
}

.embp-supplier-picker {
	margin-bottom: 16px;
}

.embp-supplier-picker__modes {
	display: flex;
	gap: 16px;
	margin-bottom: 8px;
}

.embp-dropzone {
	width: 100%;
	max-width: 100%;
	margin-bottom: 16px;
	padding: 24px;
	border: 2px dashed #949494;
	border-radius: 4px;
	text-align: center;
}

.embp-dropzone input {
	max-width: 100%;
}

.embp-progress {
	position: relative;
	height: 20px;
	margin-bottom: 16px;
	background: #f0f0f0;
	border-radius: 4px;
	overflow: hidden;
}

.embp-progress__bar {
	height: 100%;
	background: #007cba;
	transition: width 0.2s ease;
}

.embp-progress__label {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 12px;
}

.embp-mapping-table-wrap {
	margin-bottom: 16px;
	overflow-x: auto;
}

.embp-mapping-table {
	border-collapse: collapse;
	width: 100%;
}

.embp-mapping-table th,
.embp-mapping-table td {
	padding: 6px 8px;
	border: 1px solid #e0e0e0;
	white-space: nowrap;
	text-align: left;
}

.embp-mapping-table th {
	background: #f6f7f7;
	vertical-align: top;
}

.embp-mapping-table__header {
	display: block;
	margin-bottom: 6px;
	font-weight: 600;
}

.embp-review-llm {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px 12px;
	margin-bottom: 12px;
	padding: 8px 12px;
	background: #f0f6fc;
	border: 1px solid #c5d9ea;
	border-radius: 4px;
}

.embp-review-counters {
	display: flex;
	flex-wrap: wrap;
	gap: 8px 16px;
	margin-bottom: 12px;
}

.embp-review-counter {
	padding: 2px 8px;
	background: #f0f0f0;
	border-radius: 12px;
	font-size: 12px;
}

.embp-review-table-wrap {
	margin: 16px 0;
	overflow-x: auto;
}

.embp-review-table {
	border-collapse: collapse;
	width: 100%;
}

.embp-review-table th,
.embp-review-table td {
	padding: 6px 8px;
	border: 1px solid #e0e0e0;
	text-align: left;
	vertical-align: top;
}

.embp-review-table th {
	background: #f6f7f7;
}

.embp-review-row {
	cursor: pointer;
}

.embp-review-row.is-focused {
	background: #e7f2fa;
	outline: 2px solid #007cba;
	outline-offset: -2px;
}

.embp-review-row__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 4px;
	align-items: flex-start;
}

.embp-product-assign-picker {
	width: 100%;
	margin-top: 8px;
	padding: 8px;
	background: #fff;
	border: 1px solid #ddd;
	border-radius: 4px;
}

.embp-product-assign-picker__results {
	margin: 8px 0;
	padding: 0;
	list-style: none;
	max-height: 180px;
	overflow-y: auto;
}

.embp-review-pagination {
	display: flex;
	align-items: center;
	gap: 12px;
	margin: 16px 0;
}

.embp-review-shortcuts {
	color: #757575;
	font-size: 12px;
}

.embp-rule-fields {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
	gap: 12px 16px;
	margin-bottom: 16px;
	align-items: start;
}

.embp-rule-override {
	margin-bottom: 16px;
	padding: 12px;
	border: 1px solid #e0e0e0;
	border-radius: 4px;
}

.embp-rules-step__actions {
	margin-top: 16px;
}

.embp-preview-table-wrap {
	margin: 16px 0;
	overflow-x: auto;
}

.embp-preview-table {
	border-collapse: collapse;
	width: 100%;
}

.embp-preview-table th,
.embp-preview-table td {
	padding: 6px 8px;
	border: 1px solid #e0e0e0;
	text-align: left;
}

.embp-preview-table th {
	background: #f6f7f7;
}

.embp-preview-pagination {
	display: flex;
	align-items: center;
	gap: 12px;
	margin: 16px 0;
}

.embp-history-table-wrap {
	margin: 16px 0;
	overflow-x: auto;
}

.embp-history-table {
	border-collapse: collapse;
	width: 100%;
}

.embp-history-table th,
.embp-history-table td {
	padding: 6px 8px;
	border: 1px solid #e0e0e0;
	text-align: left;
	vertical-align: top;
}

.embp-history-table th {
	background: #f6f7f7;
}

.embp-history-table__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 4px;
}

.embp-history-table__totals {
	margin: 0;
	white-space: pre-wrap;
}

.embp-history-details p {
	margin: 0 0 8px;
}

.embp-history-pagination {
	display: flex;
	align-items: center;
	gap: 12px;
	margin-top: 16px;
}

@media (max-width: 480px) {
	.embp-admin-shell {
		margin-right: 10px;
	}

	.embp-admin-header {
		align-items: flex-start;
		padding: 16px;
	}

	.embp-admin-brand__mark {
		width: 36px;
		height: 36px;
	}

	.embp-admin-brand p {
		display: none;
	}

	.embp-admin-header__actions {
		flex-direction: column;
		align-items: flex-end;
	}

	.embp-admin-nav {
		overflow-x: auto;
		padding: 0 8px;
	}

	.embp-admin-nav__link {
		flex: 0 0 auto;
	}

	.embp-admin-content {
		padding: 16px;
	}

	.embp-settings-panel {
		padding: 4px 16px 16px;
	}

	.embp-settings-panel .form-table th,
	.embp-settings-panel .form-table td {
		display: block;
		width: 100%;
		padding-right: 0;
		padding-left: 0;
	}

	.embp-wizard .components-card__header,
	.embp-wizard .components-card__body,
	.embp-history-screen .components-card__header,
	.embp-history-screen .components-card__body {
		min-width: 0;
		padding-right: 12px;
		padding-left: 12px;
	}

	.embp-upload-sample,
	.embp-dropzone {
		padding: 12px;
	}

	.embp-supplier-picker__modes,
	.embp-review-pagination,
	.embp-preview-pagination,
	.embp-history-pagination {
		flex-wrap: wrap;
	}
}
