.woocommerce_page_wc-settings .form-table .select2-container {
	min-width: 320px;
}

.woocommerce_page_wc-settings .ordergrace-help {
	max-width: 720px;
}

.ordergrace-dashboard-wrap {
	max-width: none;
	width: auto;
	box-sizing: border-box;
	overflow-x: hidden;
	overflow-x: clip;
}

.ordergrace-dashboard-wrap .description {
	max-width: none;
	margin-bottom: 22px;
	font-size: 14px;
}

.ordergrace-dashboard-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
	gap: 14px;
	max-width: none;
	width: 100%;
	margin-top: 16px;
}

.ordergrace-stat-card {
	position: relative;
	display: flex;
	flex-direction: column;
	justify-content: center;
	align-items: center;
	text-align: center;
	gap: 8px;
	overflow: hidden;
	background: linear-gradient(155deg, #ffffff 0%, #f4f9ff 55%, #eef6ff 100%);
	border: 1px solid #cbdcec;
	border-radius: 12px;
	padding: 14px 12px;
	box-shadow: 0 6px 18px rgba(15, 61, 98, 0.1);
	min-height: 116px;
	transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.ordergrace-stat-card::before {
	content: "";
	position: absolute;
	inset: 0;
	background: radial-gradient(circle at 15% 0%, rgba(15, 108, 157, 0.12), transparent 48%);
	pointer-events: none;
}

.ordergrace-stat-card:hover {
	transform: translateY(-2px);
	border-color: #a9c6df;
	box-shadow: 0 10px 24px rgba(15, 61, 98, 0.16);
}

.ordergrace-stat-card:nth-child(2n) {
	background: linear-gradient(155deg, #ffffff 0%, #f7fcf8 55%, #edf8f0 100%);
	border-color: #cbe2d2;
}

.ordergrace-stat-card:nth-child(3n) {
	background: linear-gradient(155deg, #ffffff 0%, #fffaf3 55%, #fff4e2 100%);
	border-color: #ead7b9;
}

.ordergrace-stat-card > * {
	position: relative;
	z-index: 1;
}

.ordergrace-stat-card__label {
	margin: 0;
	color: #45637d;
	font-size: 11px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	line-height: 1.25;
}

.ordergrace-stat-card__value {
	margin: 0;
	font-size: clamp(28px, 2.5vw, 36px);
	line-height: 1.05;
	font-weight: 800;
	letter-spacing: -0.02em;
	color: #0d4f77;
	text-wrap: balance;
}

.ordergrace-stat-card__hint {
	margin: 0;
	font-size: clamp(12px, 1vw, 13px);
	line-height: 1.35;
	font-weight: 500;
	color: #4f5e6c;
	max-width: 28ch;
}

.ordergrace-dashboard-actions {
	margin-top: 22px;
	display: flex;
	gap: 12px;
	flex-wrap: wrap;
}

.ordergrace-dashboard-actions .button {
	height: 36px;
	display: inline-flex;
	align-items: center;
}

.ordergrace-dashboard-actions .button-primary {
	background: #0f6c9d;
	border-color: #0f6c9d;
	box-shadow: 0 4px 12px rgba(15, 108, 157, 0.28);
}

.ordergrace-dashboard-actions .button-primary:hover,
.ordergrace-dashboard-actions .button-primary:focus {
	background: #0a5a83;
	border-color: #0a5a83;
}

.ordergrace-onboarding-overlay {
	position: fixed;
	inset: 0;
	background: rgba(8, 22, 34, 0.52);
	display: grid;
	place-items: center;
	z-index: 100000;
	padding: 18px;
}

.ordergrace-onboarding-modal {
	position: relative;
	width: min(700px, 96vw);
	background: linear-gradient(170deg, #ffffff 0%, #eff8ff 100%);
	border: 1px solid #bfd8ec;
	border-radius: 18px;
	box-shadow: 0 24px 60px rgba(8, 22, 34, 0.28);
	padding: 24px;
}

.ordergrace-onboarding-close {
	position: absolute;
	right: 12px;
	top: 10px;
	border: 0;
	background: transparent;
	font-size: 24px;
	line-height: 1;
	cursor: pointer;
	color: #34566f;
}

.ordergrace-onboarding-kicker {
	margin: 0;
	font-size: 11px;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	font-weight: 700;
	color: #0f6c9d;
}

.ordergrace-onboarding-modal h2 {
	margin: 8px 0 12px;
	font-size: 26px;
	line-height: 1.3;
	color: #143f5e;
}

.ordergrace-onboarding-checklist {
	margin: 0;
	padding-left: 18px;
	display: grid;
	gap: 10px;
	font-size: 14px;
	line-height: 1.45;
	color: #2f4658;
}

.ordergrace-onboarding-actions {
	margin-top: 18px;
	display: flex;
	gap: 10px;
	flex-wrap: wrap;
}

@media (max-width: 782px) {
	.ordergrace-dashboard-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 10px;
	}

	.ordergrace-stat-card {
		min-height: 106px;
		padding: 12px 10px;
		border-radius: 10px;
	}

	.ordergrace-stat-card__value {
		font-size: 30px;
	}

	.ordergrace-stat-card__hint {
		font-size: 12px;
	}

	.ordergrace-onboarding-modal {
		padding: 18px;
	}
}

@media (max-width: 560px) {
	.ordergrace-dashboard-grid {
		grid-template-columns: 1fr;
	}

	.ordergrace-stat-card {
		min-height: 100px;
	}
}

body.ordergrace-assets-loaded .ordergrace-dashboard-wrap h1 {
	text-decoration: underline;
	text-decoration-thickness: 2px;
	text-underline-offset: 6px;
	text-decoration-color: #0f6c9d;
}
