/* Reset — isolates the plugin UI from theme styles that might otherwise
   strip spacing or override how form elements lay out. */
.ebm-wrap,
.ebm-wrap *,
.ebm-wrap *::before,
.ebm-wrap *::after {
	box-sizing: border-box;
}
.ebm-wrap form {
	margin: 0;
	padding: 0;
}
.ebm-wrap label {
	display: block;
	margin: 0;
}
.ebm-wrap p {
	margin: 0 0 8px;
}
.ebm-wrap button,
.ebm-wrap input,
.ebm-wrap select {
	font-family: inherit;
	font-size: 15px;
	line-height: normal;
	margin: 0;
}
.ebm-wrap button {
	-webkit-appearance: none;
	appearance: none;
}
.ebm-wrap ul {
	margin: 0;
}

.ebm-wrap {
	width: 80%;
	max-width: 1600px;
	margin: 0 auto;
	font-size: 16px;
	color: #1f2937;
}
.ebm-heading {
	margin: 0 0 4px;
}
.ebm-muted {
	color: #6b7280;
}
.ebm-form {
	display: flex;
	flex-direction: column;
	gap: 12px;
}
.ebm-pin-gate .ebm-form {
	max-width: 360px;
}
.ebm-field {
	display: flex;
	flex-direction: column;
	gap: 6px;
}
.ebm-field span {
	font-size: 12px;
	font-weight: 600;
	color: #4b5563;
	text-transform: uppercase;
	letter-spacing: 0.02em;
}
.ebm-field span em {
	color: #dc2626;
	font-style: normal;
}
.ebm-field input,
.ebm-field select {
	padding: 10px 12px;
	font-size: 15px;
	border: 1px solid #d1d5db;
	border-radius: 8px;
	background: #fff;
	width: 100%;
	box-sizing: border-box;
}
.ebm-field input:focus,
.ebm-field select:focus,
.ebm-search-input:focus,
.ebm-search-bar-filters select:focus {
	outline: none;
	border-color: #2563eb;
	box-shadow: 0 0 0 3px rgba( 37, 99, 235, 0.15 );
}
.ebm-form-grid {
	display: grid;
	grid-template-columns: repeat( 3, 1fr );
	gap: 18px 20px;
	margin-bottom: 18px;
}
@media ( max-width: 900px ) {
	.ebm-form-grid {
		grid-template-columns: repeat( 2, 1fr );
	}
}
@media ( max-width: 560px ) {
	.ebm-form-grid {
		grid-template-columns: 1fr;
	}
}
.ebm-field-wide {
	grid-column: 1 / -1;
}
.ebm-mobile-row {
	display: flex;
	gap: 8px;
}
.ebm-mobile-row select {
	flex: 0 0 auto;
	max-width: 45%;
}
.ebm-mobile-row input {
	flex: 1 1 auto;
	min-width: 0;
}
.ebm-btn {
	display: inline-block;
	padding: 10px 18px;
	font-size: 15px;
	border-radius: 8px;
	border: 1px solid #d1d5db;
	background: #fff;
	cursor: pointer;
	text-decoration: none;
	color: #1f2937;
}
.ebm-btn-sm {
	padding: 5px 12px;
	font-size: 13px;
	border-radius: 6px;
}
.ebm-btn-primary {
	background: #2563eb;
	border-color: #2563eb;
	color: #fff;
}
.ebm-btn-link {
	border: none;
	background: none;
	color: #2563eb;
	padding: 0;
}
.ebm-btn-secondary {
	background: #f3f4f6;
	border-color: #e5e7eb;
	color: #374151;
}
.ebm-btn:disabled {
	opacity: 0.6;
	cursor: not-allowed;
}
.ebm-icon-btn {
	width: 32px;
	height: 32px;
	line-height: 1;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border: none;
	background: transparent;
	color: #6b7280;
	font-size: 22px;
	cursor: pointer;
	border-radius: 8px;
}
.ebm-icon-btn:hover {
	background: #e5e7eb;
	color: #1f2937;
}
.ebm-error {
	color: #b91c1c;
	font-size: 14px;
}
.ebm-toolbar {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 16px;
	flex-wrap: wrap;
	gap: 10px;
}
.ebm-toolbar-actions {
	display: flex;
	gap: 12px;
	align-items: center;
}
.ebm-new-entry {
	margin-bottom: 20px;
	padding: 20px 24px 24px;
	border: 1px solid #e5e7eb;
	border-radius: 14px;
	background: #f9fafb;
	box-shadow: 0 1px 2px rgba( 16, 24, 40, 0.05 );
}
.ebm-new-entry-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 16px;
	padding-bottom: 12px;
	border-bottom: 1px solid #e5e7eb;
}
.ebm-new-entry-header .ebm-heading {
	margin: 0;
}
.ebm-form-actions {
	display: flex;
	gap: 10px;
	margin-top: 4px;
}
.ebm-search-input {
	width: 100%;
	padding: 14px 16px;
	font-size: 18px;
	border: 1px solid #d1d5db;
	border-radius: 10px;
	box-sizing: border-box;
}
.ebm-group-filter {
	display: flex;
	gap: 8px;
	margin: 12px 0;
	flex-wrap: wrap;
}
.ebm-chip {
	padding: 6px 14px;
	border-radius: 999px;
	border: 1px solid #d1d5db;
	background: #fff;
	cursor: pointer;
	font-size: 14px;
}
.ebm-chip.is-active {
	background: #1f2937;
	color: #fff;
	border-color: #1f2937;
}
.ebm-pill {
	display: inline-block;
	padding: 3px 10px;
	border-radius: 999px;
	color: #fff;
	font-size: 12px;
	font-weight: 600;
}
.ebm-reissue-count {
	color: #b45309;
	font-size: 12px;
}
.ebm-summary-cards {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	margin-bottom: 20px;
}
.ebm-card {
	flex: 1 1 120px;
	border: 1px solid #e5e7eb;
	border-top: 4px solid #2563eb;
	border-radius: 10px;
	padding: 12px 16px;
	background: #fff;
}
.ebm-card-label {
	display: block;
	font-size: 12px;
	color: #6b7280;
	text-transform: uppercase;
}
.ebm-card-value {
	display: block;
	font-size: 22px;
	font-weight: 700;
}
.ebm-search-bar {
	display: flex;
	flex-direction: column;
	gap: 12px;
	margin-bottom: 8px;
	padding: 16px;
	border: 1px solid #e5e7eb;
	border-radius: 12px;
	background: #f9fafb;
}
.ebm-search-input-wrap {
	width: 100%;
}
.ebm-search-bar-filters {
	display: flex;
	gap: 10px;
	flex-wrap: wrap;
	align-items: center;
}
.ebm-search-bar-filters select {
	padding: 9px 12px;
	font-size: 14px;
	border: 1px solid #d1d5db;
	border-radius: 8px;
	background: #fff;
}
.ebm-report-title {
	margin: 0;
	font-size: 20px;
}
.ebm-table-wrap {
	overflow-x: auto;
	border: 1px solid #e5e7eb;
	border-radius: 10px;
}
.ebm-table {
	width: 100%;
	border-collapse: collapse;
	font-size: 14px;
}
.ebm-table th {
	text-align: left;
	padding: 10px;
	background: #f9fafb;
	font-size: 12px;
	text-transform: uppercase;
	letter-spacing: 0.02em;
	color: #4b5563;
	border-bottom: 1px solid #e5e7eb;
	white-space: nowrap;
}
.ebm-table td {
	text-align: left;
	padding: 10px;
	border-bottom: 1px solid #e5e7eb;
	white-space: nowrap;
}
.ebm-table tbody tr:last-child td {
	border-bottom: none;
}
.ebm-table tbody tr:hover {
	background: #f9fafb;
}
.ebm-status-collected {
	color: #16a34a;
	font-weight: 600;
}
.ebm-status-pending {
	color: #b45309;
	font-weight: 600;
}
.ebm-btn-block {
	display: block;
	width: 100%;
	text-align: center;
	box-sizing: border-box;
}
.ebm-results-meta {
	color: #6b7280;
	font-size: 13px;
	margin: 4px 0 12px;
}
.ebm-cards-grid {
	display: grid;
	grid-template-columns: repeat( 4, 1fr );
	gap: 18px;
	margin-bottom: 20px;
}
@media ( max-width: 1100px ) {
	.ebm-cards-grid {
		grid-template-columns: repeat( 3, 1fr );
	}
}
@media ( max-width: 820px ) {
	.ebm-cards-grid {
		grid-template-columns: repeat( 2, 1fr );
	}
}
@media ( max-width: 520px ) {
	.ebm-cards-grid {
		grid-template-columns: 1fr;
	}
}
.ebm-card-item {
	background: #fff;
	border: 1px solid #e5e7eb;
	border-radius: 14px;
	padding: 18px;
	box-shadow: 0 1px 2px rgba( 16, 24, 40, 0.05 );
	display: flex;
	flex-direction: column;
	transition: box-shadow 0.15s ease, border-color 0.15s ease;
}
.ebm-card-item:hover {
	box-shadow: 0 4px 12px rgba( 16, 24, 40, 0.08 );
	border-color: #d1d5db;
}
.ebm-card-top {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 10px;
}
.ebm-card-top .ebm-status-collected,
.ebm-card-top .ebm-status-pending {
	font-size: 18px;
	line-height: 1;
}
.ebm-card-name {
	margin: 0 0 8px;
	font-size: 17px;
	font-weight: 700;
	color: #111827;
}
.ebm-card-meta {
	font-size: 13px;
	color: #6b7280;
	margin-bottom: 4px;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}
.ebm-card-actions {
	margin-top: 12px;
}
.ebm-card-status-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 8px;
	font-size: 14px;
}
.ebm-pagination {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 16px;
	margin: 24px 0;
}
.ebm-pagination-status {
	color: #6b7280;
	font-size: 14px;
}
.ebm-history {
	margin-top: 10px;
	border-top: 1px solid #f3f4f6;
	padding-top: 8px;
}
.ebm-history summary {
	cursor: pointer;
	font-size: 12px;
	color: #2563eb;
	font-weight: 600;
	list-style: none;
}
.ebm-history summary::-webkit-details-marker {
	display: none;
}
.ebm-history summary::before {
	content: '▸ ';
}
.ebm-history[open] summary::before {
	content: '▾ ';
}
.ebm-history ul {
	margin: 8px 0 0;
	padding-left: 16px;
	font-size: 12px;
	color: #4b5563;
}
.ebm-history li {
	margin-bottom: 4px;
}
