/**
 * Match Me Admin Styles — Fully scoped under #matchme-wrap.
 * Redux style left sidebar nav. Frello design system.
 * No global resets, no !important, no framework dependencies.
 */

/* Prevent FOUC before JS initialises */
#matchme-wrap { opacity: 0; }

#matchme-wrap {
	opacity: 1 !important;
	transition: opacity 0.15s ease-in;
	--mm-color-bg:            #F8FAFC;
	--mm-color-card:          #FFFFFF;
	--mm-color-banner:        #1E293B;
	--mm-color-primary:       #3B82F6;
	--mm-color-primary-hover: #2563EB;
	--mm-color-primary-light: #EFF6FF;
	--mm-color-success:       #10B981;
	--mm-color-success-light: #ECFDF5;
	--mm-color-warning:       #F59E0B;
	--mm-color-danger:        #EF4444;
	--mm-color-danger-hover:  #DC2626;
	--mm-color-text:          #475569;
	--mm-color-text-sec:      #94A3B8;
	--mm-color-heading:       #0F172A;
	--mm-color-label:         #334155;
	--mm-color-border:        #E2E8F0;
	--mm-color-border-light:  #EDF2F7;
	--mm-font-family:         -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen-Sans, Ubuntu, Cantarell, 'Helvetica Neue', sans-serif;
	--mm-radius-lg:           14px;
	--mm-radius-md:           10px;
	--mm-radius-sm:           8px;
	--mm-radius-badge:        9999px;
	--mm-shadow-sm:           0 1px 2px rgba(0,0,0,0.04);
	--mm-shadow-card:         0 1px 3px rgba(0,0,0,0.05), 0 1px 2px rgba(0,0,0,0.03);
	--mm-shadow-lg:           0 4px 12px rgba(0,0,0,0.08);

	max-width: 1100px;
	margin: 20px auto 40px;
	padding: 0 20px;
	font-family: var(--mm-font-family);
	color: var(--mm-color-text);
	font-size: 14px;
	line-height: 1.5;
}

#matchme-wrap *,
#matchme-wrap *::before,
#matchme-wrap *::after {
	box-sizing: border-box;
}

/* ===== HEADER ===== */
#matchme-wrap .matchme-header {
	margin-bottom: 0;
}

#matchme-wrap .matchme-header-inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	background: var(--mm-color-banner);
	color: #FFFFFF;
	padding: 20px 28px;
	border-radius: var(--mm-radius-lg) var(--mm-radius-lg) 0 0;
	box-shadow: var(--mm-shadow-lg);
}

#matchme-wrap .matchme-header-left {
	display: flex;
	align-items: center;
	gap: 16px;
}

#matchme-wrap .matchme-header h1 {
	margin: 0;
	padding: 0;
	font-size: 21px;
	font-weight: 700;
	color: #FFFFFF;
	letter-spacing: -0.03em;
	line-height: 1.2;
}

#matchme-wrap .matchme-header-subtitle {
	margin: 3px 0 0;
	padding: 0;
	font-size: 13px;
	color: #94A3B8;
	font-weight: 400;
}

#matchme-wrap .matchme-version {
	font-size: 11px;
	color: #94A3B8;
	font-weight: 600;
	padding: 4px 10px;
	background: rgba(255,255,255,0.08);
	border: 1px solid rgba(255,255,255,0.15);
	border-radius: 6px;
}

#matchme-wrap .matchme-platform-badge {
	font-size: 10px;
	font-weight: 700;
	color: #FFFFFF;
	padding: 3px 10px;
	background: var(--mm-color-primary);
	border-radius: var(--mm-radius-badge);
	text-transform: uppercase;
	letter-spacing: 0.04em;
}

#matchme-wrap .matchme-header-brand {
	font-size: 12px;
	color: #FFFFFF;
	text-decoration: none;
	font-weight: 600;
	padding: 7px 14px;
	background: rgba(255,255,255,0.1);
	border: 1px solid rgba(255,255,255,0.25);
	border-radius: var(--mm-radius-badge);
	transition: background 0.15s ease, border-color 0.15s ease;
	white-space: nowrap;
}

#matchme-wrap .matchme-header-brand:hover {
	color: #FFFFFF;
	background: rgba(255,255,255,0.18);
	border-color: rgba(255,255,255,0.4);
}

/* ===== REDUX STYLE LAYOUT ===== */
#matchme-wrap .matchme-layout {
	display: flex;
	border: 1px solid var(--mm-color-border);
	border-top: none;
	border-radius: 0 0 var(--mm-radius-lg) var(--mm-radius-lg);
	overflow: hidden;
	background: var(--mm-color-bg);
	min-height: 500px;
}

/* ===== LEFT SIDEBAR NAV ===== */
#matchme-wrap .matchme-sidebar {
	width: 220px;
	flex-shrink: 0;
	background: #F1F5F9;
	border-right: 1px solid var(--mm-color-border);
	display: flex;
	flex-direction: column;
	padding: 8px 0;
}

#matchme-wrap .matchme-nav-divider {
	height: 0;
	margin: 4px 0;
}

#matchme-wrap .matchme-nav-item {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 12px 20px;
	border: none;
	border-bottom: 1px solid rgba(226, 232, 240, 0.6);
	background: none;
	font-family: var(--mm-font-family);
	font-size: 13px;
	font-weight: 500;
	color: #475569;
	cursor: pointer;
	transition: all 0.12s ease;
	text-align: left;
	border-left: 3px solid transparent;
	white-space: nowrap;
}

#matchme-wrap .matchme-nav-item:last-child {
	border-bottom: none;
}

#matchme-wrap .matchme-nav-item svg {
	flex-shrink: 0;
	transition: opacity 0.12s ease, color 0.12s ease;
}

/* Per tab icon colors */
#matchme-wrap .matchme-nav-item[data-section="general"] svg { color: #6366F1; stroke: #6366F1; opacity: 0.7; }
#matchme-wrap .matchme-nav-item[data-section="field-selection"] svg { color: #10B981; stroke: #10B981; opacity: 0.7; }
#matchme-wrap .matchme-nav-item[data-section="field-weights"] svg { color: #F59E0B; stroke: #F59E0B; opacity: 0.7; }
#matchme-wrap .matchme-nav-item[data-section="display"] svg { color: #EC4899; stroke: #EC4899; opacity: 0.7; }
#matchme-wrap .matchme-nav-item[data-section="cache"] svg { color: #0EA5E9; stroke: #0EA5E9; opacity: 0.7; }
#matchme-wrap .matchme-nav-item[data-section="help"] svg { color: #8B5CF6; stroke: #8B5CF6; opacity: 0.7; }

#matchme-wrap .matchme-nav-item:hover {
	color: var(--mm-color-heading);
	background: rgba(226, 232, 240, 0.5);
}

#matchme-wrap .matchme-nav-item:hover svg {
	opacity: 1;
}

#matchme-wrap .matchme-nav-item.active {
	color: var(--mm-color-heading);
	font-weight: 600;
	background: #fff;
	border-left-color: var(--mm-color-primary);
}

#matchme-wrap .matchme-nav-item.active svg {
	opacity: 1;
}

/* ===== RIGHT CONTENT AREA ===== */
#matchme-wrap .matchme-content {
	flex: 1;
	min-width: 0;
	padding: 24px;
}

/* ===== SECTION PANELS ===== */
#matchme-wrap .matchme-section {
	animation: matchme-fade-in 0.15s ease;
}

@keyframes matchme-fade-in {
	from { opacity: 0; transform: translateY(4px); }
	to { opacity: 1; transform: translateY(0); }
}

/* ===== CARDS ===== */
#matchme-wrap .matchme-card {
	background: var(--mm-color-card);
	border: 1px solid var(--mm-color-border);
	border-radius: var(--mm-radius-lg);
	box-shadow: var(--mm-shadow-card);
	overflow: hidden;
	margin-bottom: 16px;
}

#matchme-wrap .matchme-card:last-child {
	margin-bottom: 0;
}

#matchme-wrap .matchme-card-header {
	display: flex;
	align-items: center;
	gap: 8px;
	background: transparent;
	color: #334155;
	padding: 16px 22px;
	font-size: 11.5px;
	font-weight: 700;
	letter-spacing: 0.05em;
	text-transform: uppercase;
	border-bottom: 1px solid #F1F5F9;
}

#matchme-wrap .matchme-card-header svg {
	color: var(--mm-color-primary);
	stroke: var(--mm-color-primary);
	opacity: 0.6;
}

/* Header save button (top-right, blue) */
#matchme-wrap .matchme-btn-header-save {
	margin-left: auto;
	padding: 7px 18px;
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.02em;
	background: var(--mm-color-primary);
	color: #FFFFFF;
	border: none;
	border-radius: var(--mm-radius-sm);
	box-shadow: 0 2px 6px rgba(59,130,246,0.35);
	transition: all 0.15s ease;
}

#matchme-wrap .matchme-btn-header-save:hover {
	background: var(--mm-color-primary-hover);
	box-shadow: 0 4px 12px rgba(59,130,246,0.4);
	transform: translateY(-1px);
}

#matchme-wrap .matchme-card-body {
	padding: 22px;
	display: flex;
	flex-direction: column;
	gap: 18px;
}

/* ===== FORM FIELDS ===== */
#matchme-wrap .matchme-field {
	display: flex;
	flex-direction: column;
	gap: 6px;
}

#matchme-wrap .matchme-field > label {
	font-size: 13px;
	font-weight: 600;
	color: var(--mm-color-label);
	margin: 0;
}

#matchme-wrap .matchme-help {
	font-size: 12.5px;
	color: var(--mm-color-text-sec);
	margin: 0;
}

/* ===== INPUTS ===== */
#matchme-wrap input[type="number"],
#matchme-wrap input[type="text"],
#matchme-wrap textarea {
	width: auto;
	padding: 10px 14px;
	border: 1px solid var(--mm-color-border);
	border-radius: var(--mm-radius-sm);
	font-family: var(--mm-font-family);
	font-size: 14px;
	color: var(--mm-color-heading);
	background: #F8FAFC;
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

#matchme-wrap input[type="number"]:focus,
#matchme-wrap input[type="text"]:focus,
#matchme-wrap textarea:focus {
	background: #FFFFFF;
}

#matchme-wrap select {
	padding: 10px 14px;
	padding-right: 40px;
	border: 1px solid var(--mm-color-border);
	border-radius: var(--mm-radius-sm);
	font-family: var(--mm-font-family);
	font-size: 14px;
	color: var(--mm-color-heading);
	background: #FFFFFF;
	appearance: none;
	-webkit-appearance: none;
	cursor: pointer;
	background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1.5 1.75L6 6.25l4.5-4.5' stroke='%23475569' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 14px center;
	background-size: 12px;
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

#matchme-wrap input:focus,
#matchme-wrap select:focus,
#matchme-wrap textarea:focus {
	outline: none;
	border-color: var(--mm-color-primary);
	box-shadow: 0 0 0 3px rgba(59,130,246,0.1);
}

#matchme-wrap .matchme-input-sm {
	width: 100%;
}

/* General settings two-column grid */
#matchme-wrap .matchme-general-grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 20px 32px;
	align-items: start;
}

#matchme-wrap .matchme-general-grid > .matchme-field {
	min-height: 0;
}


@media (max-width: 768px) {
	#matchme-wrap .matchme-general-grid {
		grid-template-columns: 1fr;
	}
}

#matchme-wrap .matchme-input-xs {
	width: 56px;
	padding: 6px 6px;
	font-size: 13px;
	text-align: center;
}

/* ===== RANGE SLIDER ===== */
#matchme-wrap .matchme-range-wrap {
	display: flex;
	align-items: center;
	gap: 14px;
}

#matchme-wrap .matchme-range-wrap input[type="range"] {
	-webkit-appearance: none;
	appearance: none;
	flex: 1;
	height: 6px;
	border-radius: 3px;
	outline: none;
	border: none;
	padding: 0;
	background: linear-gradient(to right, var(--mm-color-primary) 0%, var(--mm-color-primary) var(--range-pct, 0%), #CBD5E1 var(--range-pct, 0%), #CBD5E1 100%);
}

#matchme-wrap .matchme-range-wrap input[type="range"]::-moz-range-track {
	height: 6px;
	border-radius: 3px;
	background: #CBD5E1;
}

#matchme-wrap .matchme-range-wrap input[type="range"]::-moz-range-progress {
	height: 6px;
	border-radius: 3px;
	background: var(--mm-color-primary);
}

#matchme-wrap .matchme-range-wrap input[type="range"]::-webkit-slider-thumb {
	-webkit-appearance: none;
	width: 18px;
	height: 18px;
	border-radius: 50%;
	background: var(--mm-color-primary);
	cursor: pointer;
	border: 2px solid #FFFFFF;
	box-shadow: 0 1px 4px rgba(0,0,0,0.2);
	transition: box-shadow 0.15s ease;
}

#matchme-wrap .matchme-range-wrap input[type="range"]::-webkit-slider-thumb:hover {
	box-shadow: 0 0 0 4px rgba(59,130,246,0.15), 0 1px 4px rgba(0,0,0,0.2);
}

#matchme-wrap .matchme-range-wrap input[type="range"]::-moz-range-thumb {
	width: 18px;
	height: 18px;
	border-radius: 50%;
	background: var(--mm-color-primary);
	cursor: pointer;
	border: 2px solid #FFFFFF;
	box-shadow: 0 1px 4px rgba(0,0,0,0.2);
}

#matchme-wrap .matchme-range-value {
	font-size: 14px;
	font-weight: 700;
	color: var(--mm-color-primary);
	min-width: 44px;
	text-align: right;
}

/* ===== TOGGLE SWITCH ===== */
#matchme-wrap .matchme-toggle-label {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	cursor: pointer;
	font-size: 14px;
	font-weight: 500;
	color: var(--mm-color-heading);
	margin-bottom: 0;
	user-select: none;
}

#matchme-wrap .matchme-toggle-label input[type="checkbox"] {
	opacity: 0;
	width: 0;
	height: 0;
	position: absolute;
}

#matchme-wrap .matchme-toggle-switch {
	position: relative;
	display: inline-block;
	width: 44px;
	height: 24px;
	background: #A0AEC0;
	border-radius: var(--mm-radius-badge);
	transition: background-color 0.2s ease;
	flex-shrink: 0;
}

#matchme-wrap .matchme-toggle-switch::after {
	content: '';
	position: absolute;
	height: 18px;
	width: 18px;
	left: 3px;
	bottom: 3px;
	background: #FFFFFF;
	border-radius: 50%;
	transition: transform 0.2s ease;
	box-shadow: 0 1px 3px rgba(0,0,0,0.15);
}

#matchme-wrap .matchme-toggle-label input:checked + .matchme-toggle-switch {
	background: var(--mm-color-primary);
}

#matchme-wrap .matchme-toggle-label input:checked + .matchme-toggle-switch::after {
	transform: translateX(20px);
}

#matchme-wrap .matchme-toggle-label input:focus-visible + .matchme-toggle-switch {
	box-shadow: 0 0 0 3px rgba(59,130,246,0.2);
}

/* Small toggle */
#matchme-wrap .matchme-toggle-sm .matchme-toggle-switch {
	width: 34px;
	height: 18px;
	background: #94A3B8;
}

#matchme-wrap .matchme-toggle-sm .matchme-toggle-switch::after {
	width: 14px;
	height: 14px;
	left: 2px;
	bottom: 2px;
}

#matchme-wrap .matchme-toggle-sm input:checked + .matchme-toggle-switch::after {
	transform: translateX(16px);
}

/* Red toggle variant for restrictive settings */
#matchme-wrap .matchme-toggle-restrict input:checked + .matchme-toggle-switch {
	background: #EF4444;
}

#matchme-wrap .matchme-toggle-restrict input:focus-visible + .matchme-toggle-switch {
	box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.2);
}

/* ===== TOGGLE GRID (role restrictions etc.) ===== */
#matchme-wrap .matchme-toggle-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
	gap: 10px 24px;
}

/* ===== BUTTONS ===== */
#matchme-wrap .matchme-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	border: none;
	border-radius: 8px;
	font-family: var(--mm-font-family);
	font-size: 13px;
	font-weight: 600;
	cursor: pointer;
	transition: all 0.15s ease;
	line-height: 1.4;
	text-decoration: none;
	white-space: nowrap;
	padding: 9px 18px;
}

#matchme-wrap .matchme-btn:disabled {
	opacity: 0.55;
	cursor: not-allowed;
	transform: none;
}

/* Saving state — spinner to the left of button */
#matchme-wrap .matchme-btn-saving {
	pointer-events: none;
	opacity: 0.85;
}

#matchme-wrap .matchme-btn-saving::before {
	content: '';
	position: absolute;
	right: calc(100% + 10px);
	top: 50%;
	width: 16px;
	height: 16px;
	margin-top: -8px;
	border: 2.5px solid var(--mm-color-border);
	border-top-color: var(--mm-color-primary);
	border-radius: 50%;
	animation: matchme-spin 0.6s linear infinite;
}

/* Ensure buttons can anchor the spinner */
#matchme-wrap .matchme-btn {
	position: relative;
}

/* Header save button spinner — white on dark */
#matchme-wrap .matchme-btn-header-save.matchme-btn-saving::before {
	border-color: rgba(255,255,255,0.25);
	border-top-color: #FFFFFF;
}

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

#matchme-wrap .matchme-btn-primary {
	background: var(--mm-color-primary);
	color: #FFFFFF;
	box-shadow: 0 1px 3px rgba(59,130,246,0.3);
}

#matchme-wrap .matchme-btn-primary:hover {
	background: var(--mm-color-primary-hover);
	box-shadow: 0 3px 8px rgba(59,130,246,0.3);
	transform: translateY(-1px);
}

#matchme-wrap .matchme-btn-primary:active {
	transform: translateY(0);
	box-shadow: 0 1px 3px rgba(59,130,246,0.3);
}

#matchme-wrap .matchme-btn-danger {
	background: #FFFFFF;
	color: var(--mm-color-danger);
	border: 1px solid #FECACA;
	box-shadow: none;
}

#matchme-wrap .matchme-btn-danger:hover {
	background: #FEF2F2;
	border-color: #FCA5A5;
	transform: translateY(-1px);
}

#matchme-wrap .matchme-btn-danger:active {
	transform: translateY(0);
}

#matchme-wrap .matchme-btn-secondary {
	background: #FFFFFF;
	color: var(--mm-color-label);
	border: 1px solid var(--mm-color-border);
	box-shadow: var(--mm-shadow-sm);
}

#matchme-wrap .matchme-btn-secondary:hover {
	background: var(--mm-color-bg);
	border-color: #CBD5E1;
	transform: translateY(-1px);
}

#matchme-wrap .matchme-btn-sm {
	padding: 7px 14px;
	font-size: 13px;
	border-radius: var(--mm-radius-sm);
}

#matchme-wrap .matchme-card-body > .matchme-btn {
	align-self: flex-end;
}

#matchme-wrap .matchme-section > .matchme-btn {
	margin-top: 16px;
	align-self: flex-end;
}

#matchme-wrap .matchme-section {
	display: flex;
	flex-direction: column;
}

#matchme-wrap .matchme-actions-row {
	display: flex;
	gap: 10px;
	flex-wrap: wrap;
}

/* ===== WEIGHT BAR ===== */
#matchme-wrap .matchme-weight-bar-wrap {
	display: flex;
	align-items: center;
	gap: 14px;
	padding: 14px 18px;
	background: var(--mm-color-card);
	border-radius: var(--mm-radius-sm);
	border: 1px solid var(--mm-color-border);
	box-shadow: var(--mm-shadow-card);
}

/* Weight bar inside card body or section */
#matchme-wrap .matchme-section > .matchme-weight-bar-wrap,
#matchme-wrap .matchme-card-body > .matchme-weight-bar-wrap {
	margin-bottom: 4px;
}

#matchme-wrap .matchme-weight-bar {
	flex: 1;
	height: 8px;
	background: var(--mm-color-border);
	border-radius: 4px;
	overflow: hidden;
}

#matchme-wrap .matchme-weight-bar-fill {
	height: 100%;
	border-radius: 4px;
	transition: width 0.3s ease, background 0.3s ease;
	background: var(--mm-color-success);
}

#matchme-wrap .matchme-weight-bar-fill.over {
	background: var(--mm-color-danger);
}

#matchme-wrap .matchme-weight-bar-fill.under {
	background: var(--mm-color-warning);
}

#matchme-wrap .matchme-weight-label {
	font-size: 14px;
	font-weight: 700;
	min-width: 50px;
	text-align: right;
}

/* ===== FIELDS TABLE ===== */
#matchme-wrap .matchme-fields-table-wrap {
	overflow-x: auto;
}

#matchme-wrap .matchme-card-body > .matchme-fields-table-wrap {
	margin: 0 -22px;
}

#matchme-wrap .matchme-fields-table {
	width: 100%;
	border-collapse: collapse;
	font-size: 13px;
	table-layout: fixed;
}

/* Column widths for weight tables (5 columns) */
#matchme-wrap .matchme-group-body .matchme-fields-table col.col-field { width: 38%; }
#matchme-wrap .matchme-group-body .matchme-fields-table col.col-weight { width: 12%; }
#matchme-wrap .matchme-group-body .matchme-fields-table col.col-mode { width: 20%; }
#matchme-wrap .matchme-group-body .matchme-fields-table col.col-hard-exclude { width: 15%; }
#matchme-wrap .matchme-group-body .matchme-fields-table col.col-dealbreaker { width: 15%; }

/* Column widths for selection table (2 columns) */
#matchme-wrap .matchme-card-body .matchme-fields-table col.col-field { width: 80%; }
#matchme-wrap .matchme-card-body .matchme-fields-table col.col-include { width: 20%; }

/* Selection table: stronger column header contrast inside group panels */
#matchme-wrap .matchme-group-body .matchme-selection-table th {
	color: #1E293B;
	font-size: 11px;
	background: #E2E8F0;
	border-bottom: 2px solid #94A3B8;
}

/* Selection ratio badge in group header — uses group accent color */
#matchme-wrap .matchme-sel-ratio {
	font-size: 11px;
	font-weight: 700;
	color: #fff;
	background: var(--mm-group-accent);
	padding: 4px 10px;
	border-radius: var(--mm-radius-badge);
	border: none;
}

#matchme-wrap .matchme-fields-table th {
	text-align: center;
	font-weight: 700;
	padding: 10px 12px;
	border-bottom: 2px solid var(--mm-color-border);
	color: #64748B;
	font-size: 10px;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	white-space: nowrap;
	background: var(--mm-color-bg);
}

#matchme-wrap .matchme-fields-table th:first-child {
	text-align: left;
	padding-left: 18px;
}

#matchme-wrap .matchme-fields-table td {
	padding: 10px 12px;
	border-bottom: 1px solid var(--mm-color-border-light);
	vertical-align: middle;
	text-align: center;
	line-height: 1.3;
}

#matchme-wrap .matchme-fields-table td:first-child {
	text-align: left;
	padding-left: 18px;
}

#matchme-wrap .matchme-fields-table tbody tr:last-child td {
	border-bottom: none;
}

#matchme-wrap .matchme-fields-table tbody tr:nth-child(even) td {
	background: #FAFBFD;
}

#matchme-wrap .matchme-fields-table tbody tr:hover td {
	background: var(--mm-color-primary-light);
}

#matchme-wrap .matchme-group-row td {
	font-weight: 700;
	color: var(--mm-color-banner);
	background: #E0E7FF;
	font-size: 11px;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	padding: 10px 18px;
}

#matchme-wrap .matchme-field-name {
	font-weight: 600;
	font-size: 13px;
	color: var(--mm-color-heading);
}

#matchme-wrap .matchme-type-badge {
	display: inline-block;
	background: #E0E7FF;
	color: #4338CA;
	font-size: 9px;
	font-weight: 700;
	padding: 2px 6px;
	border-radius: 4px;
	margin-left: 6px;
	text-transform: uppercase;
	letter-spacing: 0.03em;
	vertical-align: middle;
}

/* Clean number inputs — no spinners */
#matchme-wrap .matchme-fields-table input[type="number"]::-webkit-inner-spin-button,
#matchme-wrap .matchme-fields-table input[type="number"]::-webkit-outer-spin-button {
	-webkit-appearance: none;
	margin: 0;
}

#matchme-wrap .matchme-fields-table input[type="number"] {
	-moz-appearance: textbox;
	padding: 6px 6px;
	font-size: 13px;
	font-weight: 600;
	line-height: 1.3;
	color: var(--mm-color-heading);
	border-color: #CBD5E1;
}

#matchme-wrap .matchme-fields-table select {
	padding: 6px 26px 6px 8px;
	font-size: 12px;
	font-weight: 600;
	line-height: 1.3;
	min-width: 80px;
	border-radius: 6px;
	background-position: right 8px center;
	background-size: 10px;
	color: var(--mm-color-heading);
	border-color: #CBD5E1;
}

/* Center toggles in table cells */
#matchme-wrap .matchme-fields-table td .matchme-toggle-label {
	justify-content: center;
}

/* Mode + tolerance inline cell */
#matchme-wrap .matchme-mode-cell {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 4px;
	flex-wrap: wrap;
}

#matchme-wrap .matchme-mode-cell .matchme-field-tolerance {
	width: 48px;
}

#matchme-wrap .matchme-range-warn {
	display: block;
	width: 100%;
	font-size: 9px;
	color: var(--mm-color-warning);
	margin-top: 1px;
	font-weight: 500;
	text-align: center;
}

/* ===== MODE DESCRIPTIONS (dark dramatic) ===== */
#matchme-wrap .matchme-mode-descriptions {
	margin-top: 4px;
}

#matchme-wrap .matchme-mode-descriptions details {
	background: var(--mm-color-banner);
	border-radius: var(--mm-radius-lg);
	overflow: hidden;
	box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}

#matchme-wrap .matchme-mode-descriptions summary {
	display: flex;
	align-items: center;
	gap: 10px;
	cursor: pointer;
	font-size: 11px;
	font-weight: 700;
	color: #94A3B8;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	padding: 16px 22px;
	background: rgba(255,255,255,0.03);
	border-bottom: 1px solid transparent;
	transition: all 0.15s ease;
	list-style: none;
}

#matchme-wrap .matchme-mode-descriptions summary::-webkit-details-marker {
	display: none;
}

#matchme-wrap .matchme-mode-descriptions summary::before {
	content: '';
	display: inline-block;
	width: 0;
	height: 0;
	border-left: 5px solid #64748B;
	border-top: 4px solid transparent;
	border-bottom: 4px solid transparent;
	transition: transform 0.15s ease;
	flex-shrink: 0;
}

#matchme-wrap .matchme-mode-descriptions details[open] > summary::before {
	transform: rotate(90deg);
}

#matchme-wrap .matchme-mode-descriptions summary:hover {
	color: #CBD5E1;
	background: rgba(255,255,255,0.06);
}

#matchme-wrap .matchme-mode-descriptions details[open] > summary {
	border-bottom-color: rgba(255,255,255,0.08);
}

#matchme-wrap .matchme-mode-descriptions summary > svg {
	color: #64748B;
	flex-shrink: 0;
}

#matchme-wrap .matchme-mode-grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 0;
}

#matchme-wrap .matchme-mode-item {
	display: flex;
	align-items: flex-start;
	gap: 14px;
	padding: 20px 22px;
	border-bottom: 1px solid rgba(255,255,255,0.06);
	border-right: 1px solid rgba(255,255,255,0.06);
}

#matchme-wrap .matchme-mode-item:nth-child(2n) {
	border-right: none;
}

#matchme-wrap .matchme-mode-item:nth-last-child(-n+2) {
	border-bottom: none;
}

#matchme-wrap .matchme-mode-icon {
	width: 36px;
	height: 36px;
	border-radius: 10px;
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
}

#matchme-wrap .matchme-mode-icon-exact {
	background: rgba(16,185,129,0.15);
	color: #34D399;
}

#matchme-wrap .matchme-mode-icon-overlap {
	background: rgba(59,130,246,0.15);
	color: #60A5FA;
}

#matchme-wrap .matchme-mode-icon-range {
	background: rgba(245,158,11,0.15);
	color: #FBBF24;
}

#matchme-wrap .matchme-mode-icon-partial {
	background: rgba(168,85,247,0.15);
	color: #C084FC;
}

#matchme-wrap .matchme-mode-text {
	display: flex;
	flex-direction: column;
	gap: 4px;
	min-width: 0;
}

#matchme-wrap .matchme-mode-name {
	font-size: 13px;
	font-weight: 700;
	color: #F1F5F9;
}

#matchme-wrap .matchme-mode-desc {
	font-size: 12.5px;
	color: #94A3B8;
	line-height: 1.5;
}

@media (max-width: 600px) {
	#matchme-wrap .matchme-mode-grid {
		grid-template-columns: 1fr;
	}
	#matchme-wrap .matchme-mode-item {
		border-right: none;
	}
	#matchme-wrap .matchme-mode-item:nth-last-child(-n+2) {
		border-bottom: 1px solid rgba(255,255,255,0.06);
	}
	#matchme-wrap .matchme-mode-item:last-child {
		border-bottom: none;
	}
}

/* ===== GROUP ACCORDION PANELS ===== */
#matchme-wrap .matchme-group-panel {
	border: 1px solid var(--mm-color-border);
	border-radius: var(--mm-radius-md);
	box-shadow: var(--mm-shadow-sm);
	overflow: hidden;
	margin-bottom: 12px;
}

#matchme-wrap .matchme-group-panel:last-of-type {
	margin-bottom: 0;
}

/* Color cycle for group accent borders */
#matchme-wrap .matchme-group-panel { --mm-group-accent: #3B82F6; }
#matchme-wrap .matchme-group-panel:nth-child(6n+2 of .matchme-group-panel) { --mm-group-accent: #1E293B; }
#matchme-wrap .matchme-group-panel:nth-child(6n+3 of .matchme-group-panel) { --mm-group-accent: #10B981; }
#matchme-wrap .matchme-group-panel:nth-child(6n+4 of .matchme-group-panel) { --mm-group-accent: #F59E0B; }
#matchme-wrap .matchme-group-panel:nth-child(6n+5 of .matchme-group-panel) { --mm-group-accent: #EF4444; }
#matchme-wrap .matchme-group-panel:nth-child(6n+6 of .matchme-group-panel) { --mm-group-accent: #06B6D4; }

/* Fallback for older browsers via PHP classes */
#matchme-wrap .matchme-group-c0 { --mm-group-accent: #3B82F6; }
#matchme-wrap .matchme-group-c1 { --mm-group-accent: #1E293B; }
#matchme-wrap .matchme-group-c2 { --mm-group-accent: #10B981; }
#matchme-wrap .matchme-group-c3 { --mm-group-accent: #F59E0B; }
#matchme-wrap .matchme-group-c4 { --mm-group-accent: #EF4444; }
#matchme-wrap .matchme-group-c5 { --mm-group-accent: #06B6D4; }

#matchme-wrap .matchme-group-header {
	display: flex;
	align-items: center;
	gap: 12px;
	width: 100%;
	padding: 16px 20px;
	border: none;
	border-left: 4px solid var(--mm-group-accent);
	background: var(--mm-color-card);
	font-family: var(--mm-font-family);
	font-size: 13px;
	font-weight: 700;
	color: var(--mm-color-heading);
	cursor: pointer;
	text-align: left;
	transition: background 0.12s ease;
}

#matchme-wrap .matchme-group-header:hover {
	background: var(--mm-color-bg);
}

#matchme-wrap .matchme-group-chevron {
	flex-shrink: 0;
	color: var(--mm-color-text-sec);
	transition: transform 0.2s ease;
}

#matchme-wrap .matchme-group-panel.open .matchme-group-chevron {
	transform: rotate(0deg);
}

#matchme-wrap .matchme-group-panel:not(.open) .matchme-group-chevron {
	transform: rotate(-90deg);
}

#matchme-wrap .matchme-group-title {
	flex: 1;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	font-size: 12px;
}

#matchme-wrap .matchme-group-pct {
	font-size: 11px;
	font-weight: 700;
	color: #475569;
	background: #F1F5F9;
	padding: 4px 10px;
	border-radius: var(--mm-radius-badge);
	border: 1px solid #CBD5E1;
}

#matchme-wrap .matchme-group-count {
	font-size: 11px;
	font-weight: 700;
	color: #FFFFFF;
	background: var(--mm-group-accent);
	min-width: 26px;
	height: 26px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border-radius: 50%;
}

#matchme-wrap .matchme-group-body {
	background: var(--mm-color-card);
	overflow: hidden;
	transition: max-height 0.25s ease;
}

#matchme-wrap .matchme-group-panel:not(.open) .matchme-group-body {
	max-height: 0;
}

#matchme-wrap .matchme-group-panel.open .matchme-group-body {
	max-height: 2000px;
}

#matchme-wrap .matchme-group-body .matchme-fields-table-wrap {
	margin: 0;
}

/* ===== FIELD SELECTION TOOLBAR ===== */
#matchme-wrap .matchme-field-selection-toolbar {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 14px 18px;
	background: var(--mm-color-bg);
	border-radius: var(--mm-radius-sm);
	border: 1px solid var(--mm-color-border-light);
}

#matchme-wrap .matchme-selection-count {
	flex: 1;
	font-size: 14px;
	font-weight: 700;
	color: var(--mm-color-heading);
}

/* ===== EMPTY STATE ===== */
#matchme-wrap .matchme-empty-state {
	text-align: center;
	padding: 60px 24px;
	background: var(--mm-color-card);
	border: 1px solid var(--mm-color-border);
	border-radius: var(--mm-radius-lg);
	box-shadow: var(--mm-shadow-card);
}

#matchme-wrap .matchme-empty-state p {
	margin: 0 0 8px;
	font-size: 15px;
	color: var(--mm-color-text-sec);
}

#matchme-wrap .matchme-empty-state a {
	color: var(--mm-color-primary);
	font-weight: 600;
	text-decoration: none;
}

#matchme-wrap .matchme-empty-state a:hover {
	text-decoration: underline;
}

/* ===== STYLE CARDS ===== */
#matchme-wrap .matchme-style-cards {
	display: flex;
	gap: 12px;
	flex-wrap: wrap;
}

#matchme-wrap .matchme-style-card {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 8px;
	padding: 16px 20px;
	border: 2px solid var(--mm-color-border);
	border-radius: var(--mm-radius-lg);
	cursor: pointer;
	transition: all 0.15s ease;
	min-width: 100px;
	position: relative;
	background: var(--mm-color-card);
}

#matchme-wrap .matchme-style-card input[type="radio"] {
	display: none;
}

#matchme-wrap .matchme-style-card.active,
#matchme-wrap .matchme-style-card:has(input:checked) {
	border-color: var(--mm-color-primary);
	background: var(--mm-color-primary-light);
}

#matchme-wrap .matchme-style-card:hover {
	border-color: #94A3B8;
}

#matchme-wrap .matchme-style-card span {
	font-size: 12px;
	font-weight: 600;
	color: var(--mm-color-label);
}

#matchme-wrap .matchme-style-pro {
	opacity: 0.5;
	cursor: default;
	pointer-events: none;
	position: relative;
}

#matchme-wrap .matchme-style-pro::after {
	content: "Pro";
	position: absolute;
	top: 6px;
	right: 6px;
	font-size: 9px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	color: #3B82F6;
	background: #EFF6FF;
	padding: 1px 6px;
	border-radius: 4px;
}

#matchme-wrap .matchme-pro-badge {
	position: absolute;
	top: 6px;
	right: 6px;
	background: var(--mm-color-warning);
	color: #FFFFFF;
	font-size: 9px;
	font-weight: 700;
	padding: 2px 6px;
	border-radius: 4px;
	text-transform: uppercase;
	letter-spacing: 0.03em;
}


#matchme-wrap .matchme-style-preview {
	display: flex;
	align-items: center;
	justify-content: center;
	height: 48px;
}

/* ===== COLOR THRESHOLD CARDS ===== */
#matchme-wrap .matchme-color-cards {
	display: flex;
	gap: 12px;
	flex-wrap: wrap;
}

#matchme-wrap .matchme-color-card {
	display: flex;
	align-items: center;
	gap: 12px;
	flex: 1;
	min-width: 160px;
	padding: 14px 16px;
	background: var(--mm-color-card);
	border: 1px solid var(--mm-color-border);
	border-radius: var(--mm-radius-md);
	box-shadow: var(--mm-shadow-sm);
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

#matchme-wrap .matchme-color-card:hover {
	border-color: #CBD5E1;
	box-shadow: var(--mm-shadow-card);
}

#matchme-wrap .matchme-color-card-swatch {
	width: 36px;
	height: 36px;
	border-radius: 10px;
	flex-shrink: 0;
	box-shadow: inset 0 0 0 1px rgba(0,0,0,0.08);
}

#matchme-wrap .matchme-color-card-body {
	display: flex;
	flex-direction: column;
	gap: 2px;
	flex: 1;
	min-width: 0;
}

#matchme-wrap .matchme-color-card-label {
	font-size: 13px;
	font-weight: 700;
	color: var(--mm-color-heading);
}

#matchme-wrap .matchme-color-card-range {
	font-size: 12px;
	color: var(--mm-color-text-sec);
	font-weight: 500;
	display: flex;
	align-items: center;
	gap: 2px;
}

#matchme-wrap .matchme-color-card-range .matchme-input-xs {
	width: 42px;
	padding: 2px 4px;
	font-size: 12px;
	border-radius: 4px;
}

#matchme-wrap .matchme-color-picker {
	width: 32px;
	height: 32px;
	padding: 2px;
	border: 2px solid var(--mm-color-border);
	border-radius: 8px;
	cursor: pointer;
	background: var(--mm-color-card);
	flex-shrink: 0;
	transition: border-color 0.15s ease;
}

#matchme-wrap .matchme-color-picker:hover {
	border-color: var(--mm-color-primary);
}

/* ===== KPI GRID ===== */
#matchme-wrap .matchme-kpi-grid {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 14px;
	margin-bottom: 20px;
}

#matchme-wrap .matchme-kpi {
	display: grid;
	grid-template-columns: 40px 1fr;
	grid-template-rows: auto auto;
	column-gap: 12px;
	row-gap: 1px;
	align-items: center;
	padding: 16px 18px;
	background: var(--mm-color-card);
	border: 1px solid var(--mm-color-border);
	border-radius: var(--mm-radius-lg);
	box-shadow: var(--mm-shadow-card);
	position: relative;
}

#matchme-wrap .matchme-kpi-icon {
	grid-row: 1 / -1;
	width: 40px;
	height: 40px;
	border-radius: 10px;
	display: flex;
	align-items: center;
	justify-content: center;
}

#matchme-wrap .matchme-kpi-blue .matchme-kpi-icon   { background: #EFF6FF; color: #3B82F6; }
#matchme-wrap .matchme-kpi-amber .matchme-kpi-icon  { background: #FFFBEB; color: #F59E0B; }
#matchme-wrap .matchme-kpi-emerald .matchme-kpi-icon { background: #ECFDF5; color: #10B981; }
#matchme-wrap .matchme-kpi-purple .matchme-kpi-icon  { background: #F5F3FF; color: #8B5CF6; }

#matchme-wrap .matchme-kpi-value {
	font-size: 18px;
	font-weight: 800;
	color: var(--mm-color-heading);
	line-height: 1.2;
	align-self: end;
}

#matchme-wrap .matchme-kpi-label {
	font-size: 10px;
	font-weight: 600;
	color: var(--mm-color-text-sec);
	align-self: start;
	text-transform: uppercase;
	letter-spacing: 0.04em;
}

/* ===== TOOLS GRID (2 column) ===== */
#matchme-wrap .matchme-tools-grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 16px;
	align-items: start;
}

#matchme-wrap .matchme-tools-grid .matchme-card {
	margin-bottom: 0;
}

/* ===== RESET BAR ===== */
#matchme-wrap .matchme-reset-bar {
	display: flex;
	align-items: center;
	gap: 16px;
	padding: 14px 20px;
	background: #FFFBEB;
	border: 1px solid #FDE68A;
	border-radius: var(--mm-radius-lg);
	margin-top: 16px;
}

#matchme-wrap .matchme-reset-bar-text {
	display: flex;
	align-items: center;
	gap: 8px;
	flex: 1;
	font-size: 13px;
	color: #92400E;
}

#matchme-wrap .matchme-reset-bar-text svg {
	flex-shrink: 0;
	stroke: #D97706;
}

#matchme-wrap .matchme-reset-bar .matchme-confirm {
	flex-basis: 100%;
}

/* ===== DEBUG LIST ===== */
#matchme-wrap .matchme-debug-list {
	display: flex;
	flex-direction: column;
	gap: 0;
}

#matchme-wrap .matchme-debug-row {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 8px 0;
	border-bottom: 1px solid var(--mm-color-border-light);
	font-size: 13px;
}

#matchme-wrap .matchme-debug-row:last-child {
	border-bottom: none;
}

#matchme-wrap .matchme-debug-key {
	color: var(--mm-color-text-sec);
	font-weight: 500;
}

#matchme-wrap .matchme-debug-val {
	color: var(--mm-color-heading);
	font-weight: 600;
}

/* ===== INLINE CONFIRMATION ===== */
#matchme-wrap .matchme-confirm {
	background: #FEF2F2;
	border: 1px solid #FECACA;
	border-radius: var(--mm-radius-sm);
	padding: 14px 18px;
	margin-top: 12px;
	display: flex;
	align-items: center;
	gap: 12px;
}

#matchme-wrap .matchme-confirm p {
	margin: 0;
	font-size: 13px;
	font-weight: 500;
	color: #991B1B;
	flex: 1;
}


/* ===== TOAST NOTIFICATIONS ===== */
#matchme-toasts {
	position: fixed;
	top: 40px;
	right: 20px;
	z-index: 999999;
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.matchme-toast {
	padding: 12px 22px;
	border-radius: var(--mm-radius-md);
	font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
	font-size: 13px;
	font-weight: 600;
	color: #fff;
	box-shadow: 0 4px 16px rgba(0,0,0,0.18);
	animation: matchme-toast-in 0.25s ease;
	max-width: 340px;
}

.matchme-toast-success { background: var(--mm-color-success); }
.matchme-toast-error { background: var(--mm-color-danger); }
.matchme-toast-info { background: var(--mm-color-primary); }

@keyframes matchme-toast-in {
	from { transform: translateX(100%); opacity: 0; }
	to { transform: translateX(0); opacity: 1; }
}

@keyframes matchme-toast-out {
	from { transform: translateX(0); opacity: 1; }
	to { transform: translateX(100%); opacity: 0; }
}

/* ===== RESPONSIVE ===== */
@media (max-width: 782px) {

	#matchme-wrap {
		padding: 0 10px;
		margin: 10px auto 30px;
	}

	/* Header */
	#matchme-wrap .matchme-header-inner {
		flex-direction: column;
		gap: 12px;
		padding: 16px 18px;
		text-align: center;
	}

	#matchme-wrap .matchme-header-left {
		flex-direction: column;
		gap: 10px;
	}

	#matchme-wrap .matchme-header h1 {
		font-size: 17px;
	}

	/* Layout: stack sidebar above content */
	#matchme-wrap .matchme-layout {
		flex-direction: column;
	}

	#matchme-wrap .matchme-sidebar {
		width: 100%;
		flex-direction: row;
		overflow-x: auto;
		-webkit-overflow-scrolling: touch;
		border-right: none;
		border-bottom: 1px solid var(--mm-color-border);
		padding: 0;
		gap: 0;
	}

	#matchme-wrap .matchme-nav-item {
		border-left: none;
		border-bottom: 3px solid transparent;
		padding: 10px 14px;
		font-size: 11px;
		gap: 6px;
	}

	#matchme-wrap .matchme-nav-item svg {
		width: 14px;
		height: 14px;
	}

	#matchme-wrap .matchme-nav-item.active {
		border-left-color: transparent;
		border-bottom-color: var(--mm-color-primary);
	}

	/* Content area */
	#matchme-wrap .matchme-content {
		padding: 16px;
	}

	/* Weight bar */
	#matchme-wrap .matchme-weight-bar-wrap {
		flex-wrap: wrap;
		padding: 12px 14px;
		gap: 10px;
	}

	#matchme-wrap .matchme-weight-bar {
		flex-basis: 100%;
		order: 1;
	}

	#matchme-wrap .matchme-weight-label {
		order: 2;
	}

	#matchme-wrap .matchme-weight-bar-wrap .matchme-btn {
		order: 3;
		margin-left: auto;
	}

	/* Group accordion headers */
	#matchme-wrap .matchme-group-header {
		padding: 14px 14px;
		gap: 8px;
	}

	#matchme-wrap .matchme-group-title {
		font-size: 11px;
	}

	#matchme-wrap .matchme-group-count {
		min-width: 22px;
		height: 22px;
		font-size: 10px;
	}

	#matchme-wrap .matchme-group-pct {
		font-size: 10px;
		padding: 2px 7px;
	}

	/* ---- Field Weights: stacked card layout on mobile ---- */
	#matchme-wrap .matchme-group-body .matchme-fields-table {
		table-layout: auto;
	}

	#matchme-wrap .matchme-group-body .matchme-fields-table colgroup {
		display: none;
	}

	#matchme-wrap .matchme-group-body .matchme-fields-table thead {
		display: none;
	}

	#matchme-wrap .matchme-group-body .matchme-fields-table tbody {
		display: flex;
		flex-direction: column;
		gap: 0;
	}

	#matchme-wrap .matchme-group-body .matchme-fields-table .matchme-field-row {
		display: grid;
		grid-template-columns: 1fr 1fr;
		gap: 0;
		padding: 14px 16px;
		border-bottom: 1px solid var(--mm-color-border-light);
	}

	#matchme-wrap .matchme-group-body .matchme-fields-table .matchme-field-row td {
		display: flex;
		align-items: center;
		border: none;
		padding: 0;
		text-align: left;
	}

	/* Field name spans full width */
	#matchme-wrap .matchme-group-body .matchme-fields-table .matchme-field-row td:first-child {
		grid-column: 1 / -1;
		margin-bottom: 10px;
		padding: 0;
	}

	/* Weight + Mode row */
	#matchme-wrap .matchme-group-body .matchme-fields-table .matchme-field-row td:nth-child(2) {
		justify-content: flex-start;
		gap: 6px;
	}

	#matchme-wrap .matchme-group-body .matchme-fields-table .matchme-field-row td:nth-child(2)::before {
		content: 'Wt';
		font-size: 10px;
		font-weight: 700;
		color: var(--mm-color-text-sec);
		text-transform: uppercase;
		letter-spacing: 0.04em;
	}

	#matchme-wrap .matchme-group-body .matchme-fields-table .matchme-field-row td:nth-child(3) {
		justify-content: flex-end;
	}

	/* Hard Exclude + Deal Breaker row */
	#matchme-wrap .matchme-group-body .matchme-fields-table .matchme-field-row td:nth-child(4),
	#matchme-wrap .matchme-group-body .matchme-fields-table .matchme-field-row td:nth-child(5) {
		margin-top: 8px;
		gap: 6px;
	}

	#matchme-wrap .matchme-group-body .matchme-fields-table .matchme-field-row td:nth-child(4)::before {
		content: 'Hard Excl';
		font-size: 10px;
		font-weight: 700;
		color: var(--mm-color-text-sec);
		text-transform: uppercase;
		letter-spacing: 0.04em;
	}

	#matchme-wrap .matchme-group-body .matchme-fields-table .matchme-field-row td:nth-child(5)::before {
		content: 'Breaker';
		font-size: 10px;
		font-weight: 700;
		color: var(--mm-color-text-sec);
		text-transform: uppercase;
		letter-spacing: 0.04em;
	}

	#matchme-wrap .matchme-group-body .matchme-fields-table .matchme-field-row td:nth-child(5) {
		justify-content: flex-end;
	}

	/* Zebra on mobile cards */
	#matchme-wrap .matchme-group-body .matchme-fields-table .matchme-field-row:nth-child(even) td {
		background: none;
	}

	#matchme-wrap .matchme-group-body .matchme-fields-table .matchme-field-row:nth-child(even) {
		background: #FAFBFD;
	}

	/* Mode cell flex on mobile */
	#matchme-wrap .matchme-mode-cell {
		flex-wrap: nowrap;
	}

	/* ---- Field Selection: keep as table but tighten ---- */
	#matchme-wrap .matchme-card-body .matchme-fields-table td {
		padding: 8px 12px;
	}

	#matchme-wrap .matchme-field-selection-toolbar {
		flex-wrap: wrap;
		padding: 10px 14px;
		gap: 8px;
	}

	#matchme-wrap .matchme-selection-count {
		flex-basis: 100%;
		font-size: 13px;
	}

	/* Cards */
	#matchme-wrap .matchme-card-body {
		padding: 16px;
		gap: 14px;
	}

	#matchme-wrap .matchme-card-body > .matchme-fields-table-wrap {
		margin: 0 -16px;
	}

	/* KPIs */
	#matchme-wrap .matchme-kpi-grid {
		grid-template-columns: repeat(2, 1fr);
		gap: 10px;
	}

	#matchme-wrap .matchme-kpi {
		padding: 12px 14px;
		grid-template-columns: 32px 1fr;
		column-gap: 10px;
	}

	#matchme-wrap .matchme-kpi-value {
		font-size: 16px;
	}

	#matchme-wrap .matchme-kpi-icon {
		width: 32px;
		height: 32px;
	}

	/* Tools */
	#matchme-wrap .matchme-tools-grid {
		grid-template-columns: 1fr;
	}

	#matchme-wrap .matchme-reset-bar {
		flex-direction: column;
		text-align: center;
	}

	#matchme-wrap .matchme-actions-row {
		flex-direction: column;
	}

	#matchme-wrap .matchme-confirm {
		flex-direction: column;
		gap: 8px;
		text-align: center;
	}

	/* Style cards */
	#matchme-wrap .matchme-style-cards {
		gap: 8px;
	}

	#matchme-wrap .matchme-style-card {
		min-width: 70px;
		padding: 10px;
	}

	/* Color cards */
	#matchme-wrap .matchme-color-cards {
		flex-direction: column;
	}

	#matchme-wrap .matchme-color-card {
		min-width: 0;
	}

	/* Toggle grid */
	#matchme-wrap .matchme-toggle-grid {
		grid-template-columns: 1fr;
	}

	/* Range wrap */
	#matchme-wrap .matchme-range-wrap {
		gap: 10px;
	}

	/* Mode descriptions */
	#matchme-wrap .matchme-mode-grid {
		grid-template-columns: 1fr;
	}

	#matchme-wrap .matchme-mode-item {
		border-right: none;
		padding: 14px 18px;
	}

	#matchme-wrap .matchme-mode-item:nth-last-child(-n+2) {
		border-bottom: 1px solid rgba(255,255,255,0.06);
	}

	#matchme-wrap .matchme-mode-item:last-child {
		border-bottom: none;
	}

	/* Buttons full width on mobile */
	#matchme-wrap .matchme-section > .matchme-btn,
	#matchme-wrap .matchme-card-body > .matchme-btn {
		width: 100%;
	}

	/* Empty state */
	#matchme-wrap .matchme-empty-state {
		padding: 40px 16px;
	}

	/* Pro tier grid */
	#matchme-wrap .matchme-tier-grid {
		grid-template-columns: 1fr;
		gap: 16px;
	}

	#matchme-wrap .matchme-tier-card-pro {
		order: -1;
	}

	#matchme-wrap .matchme-addon-callout {
		flex-direction: column;
		text-align: center;
		padding: 20px;
	}

	#matchme-wrap .matchme-addon-callout::before {
		top: 0;
		left: 0;
		right: 0;
		bottom: auto;
		width: auto;
		height: 4px;
		border-radius: 4px 4px 0 0;
	}
}

/* ===== PRO TAB ===== */

/* Nav badge */
#matchme-wrap .matchme-nav-pro-badge {
	background: linear-gradient(135deg, #6366F1, #4F46E5);
	color: #FFFFFF;
	font-size: 9px;
	font-weight: 700;
	padding: 3px 8px;
	border-radius: var(--mm-radius-badge);
	text-transform: uppercase;
	letter-spacing: 0.04em;
	line-height: 1.4;
	margin-left: auto;
	box-shadow: 0 1px 4px rgba(99, 102, 241, 0.3);
}

/* Pro nav item */
#matchme-wrap .matchme-nav-item[data-section="pro"] svg {
	opacity: 0.7;
	color: #6366F1;
	stroke: #6366F1;
}

#matchme-wrap .matchme-nav-item[data-section="pro"]:hover {
	background: #EEF2FF;
	color: #4338CA;
}

#matchme-wrap .matchme-nav-item[data-section="pro"].active {
	background: #EEF2FF;
	border-left-color: #4F46E5;
	color: #4338CA;
}

#matchme-wrap .matchme-nav-item[data-section="pro"].active svg {
	opacity: 1;
	color: #4F46E5;
	stroke: #4F46E5;
}

/* ── Pro section header ── */
#matchme-wrap .matchme-pro-header {
	background: linear-gradient(160deg, #0F172A 0%, #1E293B 40%, #334155 100%);
	color: #FFFFFF;
	padding: 44px 32px 40px;
	border-radius: 16px;
	margin-bottom: 24px;
	text-align: center;
	position: relative;
	overflow: hidden;
}

#matchme-wrap .matchme-pro-header::before {
	content: "";
	position: absolute;
	inset: 0;
	background:
		radial-gradient(ellipse 60% 50% at 20% 0%, rgba(99, 102, 241, 0.15), transparent),
		radial-gradient(ellipse 50% 60% at 80% 100%, rgba(59, 130, 246, 0.1), transparent);
	pointer-events: none;
}

#matchme-wrap .matchme-pro-header svg {
	color: #FBBF24;
	margin-bottom: 14px;
	filter: drop-shadow(0 0 8px rgba(251, 191, 36, 0.4));
}

#matchme-wrap .matchme-pro-header h2 {
	font-size: 24px;
	font-weight: 800;
	margin: 0 0 8px;
	color: #FFFFFF;
	letter-spacing: -0.02em;
	position: relative;
}

#matchme-wrap .matchme-pro-header p {
	font-size: 14px;
	margin: 0;
	color: #94A3B8;
	position: relative;
}

/* ── Tier comparison grid ── */
#matchme-wrap .matchme-tier-grid {
	display: grid;
	grid-template-columns: 1fr 1fr 1fr;
	gap: 20px;
	margin-bottom: 24px;
	align-items: stretch;
}

/* ── Tier card base ── */
#matchme-wrap .matchme-tier-card {
	padding: 28px 24px 32px;
	background: #FFFFFF;
	border: 1px solid #E2E8F0;
	border-radius: 14px;
	box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
	transition: transform 0.25s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.25s cubic-bezier(0.22, 1, 0.36, 1);
	position: relative;
	display: flex;
	flex-direction: column;
}

#matchme-wrap .matchme-tier-card:hover {
	transform: translateY(-2px);
	box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08), 0 2px 8px rgba(15, 23, 42, 0.04);
}

/* ── Pro card: dark elevated treatment ── */
#matchme-wrap .matchme-tier-card-pro {
	background: linear-gradient(165deg, #1E293B 0%, #0F172A 100%);
	border: 1px solid rgba(99, 102, 241, 0.25);
	box-shadow:
		0 0 0 1px rgba(99, 102, 241, 0.1),
		0 8px 32px rgba(15, 23, 42, 0.2),
		0 2px 8px rgba(99, 102, 241, 0.08);
	overflow: hidden;
}

#matchme-wrap .matchme-tier-card-pro::before {
	content: "";
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	height: 3px;
	background: linear-gradient(90deg, #6366F1, #3B82F6, #06B6D4);
	border-radius: 14px 14px 0 0;
}

#matchme-wrap .matchme-tier-card-pro::after {
	content: "";
	position: absolute;
	inset: 0;
	background: radial-gradient(ellipse 80% 60% at 50% -10%, rgba(99, 102, 241, 0.12), transparent);
	pointer-events: none;
}

#matchme-wrap .matchme-tier-card-pro:hover {
	transform: translateY(-3px);
	box-shadow:
		0 0 0 1px rgba(99, 102, 241, 0.15),
		0 12px 40px rgba(15, 23, 42, 0.25),
		0 4px 12px rgba(99, 102, 241, 0.12);
}

#matchme-wrap .matchme-tier-card-pro .matchme-tier-name {
	color: #FFFFFF;
}

#matchme-wrap .matchme-tier-card-pro .matchme-tier-desc {
	color: #94A3B8;
}

#matchme-wrap .matchme-tier-card-pro .matchme-tier-features li {
	color: #CBD5E1;
}

/* ── Tier badge row ── */
#matchme-wrap .matchme-tier-badges {
	display: flex;
	align-items: center;
	align-self: flex-start;
	gap: 8px;
	margin-bottom: 14px;
	position: relative;
	z-index: 1;
}

/* ── Tier badge pills ── */
#matchme-wrap .matchme-tier-badge {
	display: inline-flex;
	align-items: center;
	align-self: flex-start;
	font-size: 10px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	padding: 4px 10px;
	border-radius: 6px;
	margin-bottom: 14px;
	position: relative;
	z-index: 1;
}

#matchme-wrap .matchme-tier-badges .matchme-tier-badge {
	margin-bottom: 0;
}

#matchme-wrap .matchme-tier-badge-free {
	background: #ECFDF5;
	color: #059669;
	border: 1px solid #A7F3D0;
}

#matchme-wrap .matchme-tier-badge-pro {
	background: rgba(99, 102, 241, 0.15);
	color: #C7D2FE;
}

#matchme-wrap .matchme-tier-badge-business {
	background: #F5F3FF;
	color: #7C3AED;
}

/* ── Tier name & desc ── */
#matchme-wrap .matchme-tier-name {
	font-size: 20px;
	font-weight: 800;
	margin: 0 0 6px;
	color: #0F172A;
	letter-spacing: -0.02em;
	position: relative;
	z-index: 1;
}

#matchme-wrap .matchme-tier-desc {
	font-size: 13px;
	color: #64748B;
	margin: 0 0 20px;
	line-height: 1.55;
	position: relative;
	z-index: 1;
}

/* ── Tier feature list ── */
#matchme-wrap .matchme-tier-features {
	list-style: none;
	margin: 0;
	padding: 16px 0 0;
	border-top: 1px solid #F1F5F9;
	flex: 1;
	position: relative;
	z-index: 1;
}

#matchme-wrap .matchme-tier-card-pro .matchme-tier-features {
	border-top-color: rgba(148, 163, 184, 0.15);
}

#matchme-wrap .matchme-tier-features li {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	font-size: 13px;
	color: #334155;
	line-height: 1.55;
	margin-bottom: 10px;
}

#matchme-wrap .matchme-tier-features li:last-child {
	margin-bottom: 0;
}

/* ── Feature icons ── */
#matchme-wrap .matchme-tier-features .matchme-tier-icon {
	width: 16px;
	height: 16px;
	flex-shrink: 0;
	margin-top: 2px;
	fill: none;
	stroke: #10B981;
	stroke-width: 2;
	stroke-linecap: round;
	stroke-linejoin: round;
}

#matchme-wrap .matchme-tier-card-pro .matchme-tier-features .matchme-tier-icon {
	stroke: #60A5FA;
}

/* ── "Coming soon" label ── */
#matchme-wrap .matchme-tier-soon {
	display: inline-flex;
	align-items: center;
	font-size: 10px;
	font-weight: 600;
	letter-spacing: 0.02em;
	padding: 3px 9px;
	border-radius: 6px;
	color: #B45309;
	background: #FEF3C7;
}

#matchme-wrap .matchme-tier-card-pro .matchme-tier-soon {
	color: #FCD34D;
	background: rgba(252, 211, 77, 0.12);
}

/* ── Addon callout ── */
#matchme-wrap .matchme-addon-callout {
	display: flex;
	align-items: center;
	gap: 18px;
	padding: 22px 28px;
	background: linear-gradient(135deg, #FFFFFF 0%, #FEFCE8 100%);
	border: 1px solid #E2E8F0;
	border-radius: 14px;
	box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
	transition: transform 0.25s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.25s cubic-bezier(0.22, 1, 0.36, 1);
	position: relative;
	overflow: hidden;
}

#matchme-wrap .matchme-addon-callout::before {
	content: "";
	position: absolute;
	top: 0;
	left: 0;
	bottom: 0;
	width: 4px;
	background: linear-gradient(180deg, #F43F5E, #FB923C);
	border-radius: 4px 0 0 4px;
}

#matchme-wrap .matchme-addon-callout:hover {
	transform: translateY(-1px);
	box-shadow: 0 6px 20px rgba(15, 23, 42, 0.06);
}

#matchme-wrap .matchme-addon-icon {
	width: 46px;
	height: 46px;
	border-radius: 12px;
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
	background: linear-gradient(135deg, #FFF1F2, #FFE4E6);
	color: #F43F5E;
	box-shadow: 0 2px 8px rgba(244, 63, 94, 0.12);
}

#matchme-wrap .matchme-addon-text {
	display: flex;
	flex-direction: column;
	gap: 3px;
	flex: 1;
	min-width: 0;
}

#matchme-wrap .matchme-addon-text strong {
	font-size: 14px;
	font-weight: 700;
	color: #0F172A;
}

#matchme-wrap .matchme-addon-text span {
	font-size: 12.5px;
	color: #64748B;
	line-height: 1.55;
}

#matchme-wrap .matchme-addon-badge {
	flex-shrink: 0;
	font-size: 10px;
	font-weight: 700;
	letter-spacing: 0.02em;
	padding: 5px 14px;
	border-radius: 6px;
	background: linear-gradient(135deg, #FFF7ED, #FEF3C7);
	color: #B45309;
	white-space: nowrap;
	border: 1px solid rgba(245, 158, 11, 0.15);
}

/* ── Help & Guide ── */

/* Getting Started steps */
#matchme-wrap .matchme-help-steps {
	display: flex;
	flex-direction: column;
	gap: 0;
}

#matchme-wrap .matchme-help-step {
	display: flex;
	align-items: flex-start;
	gap: 14px;
	padding: 16px 0;
	border-bottom: 1px solid #F1F5F9;
}

#matchme-wrap .matchme-help-step:last-child {
	border-bottom: none;
	padding-bottom: 0;
}

#matchme-wrap .matchme-help-step:first-child {
	padding-top: 0;
}

#matchme-wrap .matchme-help-step-num {
	flex-shrink: 0;
	width: 28px;
	height: 28px;
	border-radius: 8px;
	background: #EEF2FF;
	color: #4F46E5;
	font-size: 13px;
	font-weight: 700;
	display: flex;
	align-items: center;
	justify-content: center;
}

#matchme-wrap .matchme-help-step strong {
	display: block;
	font-size: 13.5px;
	font-weight: 600;
	color: var(--mm-color-heading);
	margin-bottom: 2px;
}

#matchme-wrap .matchme-help-step p {
	margin: 0;
	font-size: 13px;
	color: var(--mm-color-text);
	line-height: 1.5;
}

/* Comparison modes */
#matchme-wrap .matchme-help-modes {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 12px;
}

#matchme-wrap .matchme-help-mode {
	padding: 14px;
	border: 1px solid #F1F5F9;
	border-radius: var(--mm-radius-md);
	background: #FAFBFC;
}

#matchme-wrap .matchme-help-mode p {
	margin: 8px 0 0;
	font-size: 12.5px;
	color: var(--mm-color-text);
	line-height: 1.5;
}

#matchme-wrap .matchme-help-mode-label {
	display: inline-block;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.03em;
	padding: 3px 10px;
	border-radius: 6px;
	text-transform: uppercase;
}

#matchme-wrap .matchme-help-mode-exact {
	background: #DBEAFE;
	color: #1D4ED8;
}

#matchme-wrap .matchme-help-mode-overlap {
	background: #D1FAE5;
	color: #047857;
}

#matchme-wrap .matchme-help-mode-range {
	background: #FEF3C7;
	color: #B45309;
}

#matchme-wrap .matchme-help-mode-partial {
	background: #EDE9FE;
	color: #6D28D9;
}

/* Shortcodes & API table */
#matchme-wrap .matchme-help-table {
	width: 100%;
	border-collapse: collapse;
	font-size: 13px;
}

#matchme-wrap .matchme-help-table th {
	text-align: left;
	font-size: 11px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	color: #94A3B8;
	padding: 0 12px 10px;
	border-bottom: 1px solid #E2E8F0;
}

#matchme-wrap .matchme-help-table td {
	padding: 10px 12px;
	vertical-align: top;
	border-bottom: 1px solid #F1F5F9;
}

#matchme-wrap .matchme-help-table tr:last-child td {
	border-bottom: none;
}

#matchme-wrap .matchme-help-table code {
	background: #F1F5F9;
	padding: 3px 8px;
	border-radius: 5px;
	font-size: 12px;
	font-family: "SF Mono", "Fira Code", monospace;
	color: #334155;
	white-space: nowrap;
}

#matchme-wrap .matchme-help-legacy-row td {
	background: #FFFBEB;
}

#matchme-wrap .matchme-help-legacy-row code {
	background: #FEF3C7;
	color: #92400E;
}

#matchme-wrap .matchme-help-note {
	margin: 12px 0 0;
	font-size: 12px;
	color: #94A3B8;
	font-style: italic;
}

/* Key Concepts */
#matchme-wrap .matchme-help-concepts {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 12px;
}

#matchme-wrap .matchme-help-concept {
	padding: 14px;
	border: 1px solid #F1F5F9;
	border-radius: var(--mm-radius-md);
	background: #FAFBFC;
}

#matchme-wrap .matchme-help-concept strong {
	font-size: 13px;
	font-weight: 600;
	color: var(--mm-color-heading);
}

#matchme-wrap .matchme-help-concept p {
	margin: 6px 0 0;
	font-size: 12.5px;
	color: var(--mm-color-text);
	line-height: 1.5;
}

/* Footer contact */
#matchme-wrap .matchme-help-footer {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 16px 20px;
	background: #F8FAFC;
	border: 1px solid #E2E8F0;
	border-radius: var(--mm-radius-md);
	margin-top: 4px;
}

#matchme-wrap .matchme-help-footer svg {
	flex-shrink: 0;
	color: #94A3B8;
}

#matchme-wrap .matchme-help-footer span {
	font-size: 13px;
	color: var(--mm-color-text);
}

#matchme-wrap .matchme-help-footer a {
	color: #4F46E5;
	text-decoration: none;
	font-weight: 600;
}

#matchme-wrap .matchme-help-footer a:hover {
	text-decoration: underline;
}

/* Responsive */
@media (max-width: 768px) {
	#matchme-wrap .matchme-help-modes,
	#matchme-wrap .matchme-help-concepts {
		grid-template-columns: 1fr;
	}
}
