.rmx {
	--rmx-ink: #111827;
	--rmx-muted: #6b7280;
	--rmx-line: #e5e7eb;
	--rmx-soft: #f9fafb;
	--rmx-accent: #1f2937;
	--rmx-warn: #b45309;
	--rmx-error-bg: #fef2f2;
	--rmx-error: #b91c1c;
	max-width: 820px;
	color: var(--rmx-ink);
	font-size: 15px;
	line-height: 1.5;
}
.rmx [hidden], .rmx-admin [hidden] { display: none !important; }
.rmx-card {
	border: 1px solid var(--rmx-line, #e5e7eb);
	border-radius: 10px;
	padding: 18px 20px;
	margin: 0 0 18px;
	background: #fff;
}
.rmx fieldset.rmx-card legend {
	font-weight: 700;
	font-size: 1.05em;
	padding: 0 6px;
}
.rmx-muted { color: var(--rmx-muted, #6b7280); font-size: .92em; }
.rmx-warn { color: var(--rmx-warn) !important; font-weight: 600; }
.rmx-head {
	display: flex;
	justify-content: space-between;
	gap: 12px;
	margin-bottom: 14px;
	font-size: .93em;
}
.rmx-notice { padding: 12px 16px; border-radius: 8px; margin-bottom: 16px; }
.rmx-error { background: var(--rmx-error-bg); color: var(--rmx-error); border: 1px solid #fecaca; }

.rmx-tools { margin: 4px 0 10px; font-size: .9em; color: var(--rmx-muted, #6b7280); }
.rmx-link {
	background: none; border: 0; padding: 0; color: inherit;
	text-decoration: underline; cursor: pointer; font: inherit;
}
.rmx-link:hover { color: var(--rmx-ink); }

/* Boom */
.rmx-tree { max-height: 460px; overflow: auto; padding-right: 6px; }
.rmx-tree ul { list-style: none; margin: 0; padding: 0 0 0 22px; }
.rmx-tree > ul { padding-left: 0; }
.rmx-tree li { margin: 2px 0; }
.rmx-tree li > label {
	display: inline-flex; align-items: center; gap: 6px;
	cursor: pointer; padding: 2px 4px; border-radius: 4px;
}
.rmx-tree li > label:hover { background: var(--rmx-soft, #f9fafb); }
.rmx-toggle, .rmx-toggle-spacer {
	display: inline-block; width: 18px; height: 18px; vertical-align: middle;
}
.rmx-toggle {
	border: 0; background: none; cursor: pointer; padding: 0; position: relative;
}
.rmx-toggle::before {
	content: ""; position: absolute; left: 5px; top: 4px;
	border: 5px solid transparent; border-top-color: #6b7280; border-bottom: 0;
	border-width: 6px 5px 0 5px;
	transition: transform .15s;
}
.rmx-closed > .rmx-toggle::before { transform: rotate(-90deg); }
.rmx-closed > ul { display: none; }
.rmx-count {
	font-size: .78em; background: #f3f4f6; color: #4b5563;
	border-radius: 999px; padding: 0 7px; line-height: 1.6;
}

/* Opties */
.rmx-options { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.rmx-option {
	display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px;
	border: 1px solid var(--rmx-line, #e5e7eb); border-radius: 8px; padding: 10px 12px; cursor: pointer;
}
.rmx-option span { flex-basis: 100%; font-size: .85em; color: var(--rmx-muted, #6b7280); padding-left: 22px; }
.rmx-option:has(input:checked) { border-color: var(--rmx-accent); background: var(--rmx-soft); }
.rmx-thumbs { display: block; margin-top: 12px; }
.rmx-button {
	background: var(--rmx-accent); color: #fff; border: 0; border-radius: 8px;
	padding: 12px 22px; font-size: 1em; font-weight: 600; cursor: pointer;
}
.rmx-button:disabled { opacity: .6; cursor: wait; }
.rmx-login form p { margin: 0 0 10px; }
.rmx-login input[type=text], .rmx-login input[type=password] { width: 100%; max-width: 360px; padding: 8px; }

/* Beheer */
.rmx-admin .rmx-card { max-width: 700px; }
.rmx-admin .rmx-good { color: #15803d; font-weight: 600; }
.rmx-admin .rmx-bad { color: #b91c1c; font-weight: 600; }
.rmx-admin .rmx-muted { color: #6b7280; }
.rmx-admin .rmx-root > label input { display: none; }
.rmx-admin .rmx-root > label { font-weight: 600; }
.rmx-admin .rmx-pass > label, .rmx-admin .rmx-pass > .rmx-toggle, .rmx-admin .rmx-pass > .rmx-toggle-spacer { display: none; }
.rmx-admin .rmx-tree .rmx-pass > ul { padding-left: 0; }
.rmx-admin .rmx-tree input:disabled + * { opacity: .6; }

/* Beheer: export maken met voortgang */
.rmx-run .rmx-card { max-width: none; }
.rmx-run-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 18px; max-width: 1100px; }
@media (max-width: 960px) { .rmx-run-grid { grid-template-columns: 1fr; } }
.rmx-run fieldset.rmx-card legend { font-weight: 600; padding: 0 6px; }
.rmx-progress { max-width: 1100px !important; }
.rmx-progress-head { display: flex; justify-content: space-between; margin-bottom: 8px; font-size: 14px; }
.rmx-pct { font-variant-numeric: tabular-nums; font-weight: 600; }
.rmx-bar { height: 12px; background: #e5e7eb; border-radius: 999px; overflow: hidden; }
.rmx-bar-fill { height: 100%; background: #2271b1; border-radius: 999px; transition: width .4s ease; }
.rmx-progress.is-finished .rmx-bar-fill { background: #15803d; }
.rmx-progress.is-error .rmx-bar-fill { background: #b91c1c; }
.rmx-progress.is-error .rmx-stage { color: #b91c1c; }
.rmx-steps { display: flex; flex-wrap: wrap; gap: 6px 18px; list-style: none; margin: 14px 0 6px; padding: 0; color: #9ca3af; }
.rmx-steps li { margin: 0; }
.rmx-steps li::before { content: "○ "; }
.rmx-steps li.is-active { color: #111827; font-weight: 600; }
.rmx-steps li.is-active::before { content: "◐ "; color: #2271b1; }
.rmx-steps li.is-done { color: #15803d; }
.rmx-steps li.is-done::before { content: "✓ "; }
.rmx-log { font-family: Menlo, Consolas, monospace; font-size: 12px; background: #f9fafb; border: 1px solid #e5e7eb; border-radius: 6px; padding: 8px 12px; margin: 10px 0; max-height: 180px; overflow: auto; }
.rmx-log li { margin: 2px 0; }
.rmx-log:empty { display: none; }

/* Logo-keuze */
.rmx-logo-pick { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.rmx-logo-preview { flex-basis: 100%; }
.rmx-logo-preview img { max-height: 70px; max-width: 280px; padding: 10px 14px; background: #0B0C10; border-radius: 6px; display: block; }
