/* Manage Comp — dashboard styles.
   Everything is scoped under .mc-app so no theme rule leaks in or out.
   No web fonts: the type stack is native, which keeps first paint instant. */

.mc-app {
	--mc-accent: #4f46e5;
	--mc-bg: #ffffff;
	--mc-surface: #f8f9fb;
	--mc-surface-2: #f1f3f7;
	--mc-ink: #14161a;
	--mc-ink-2: #5b616e;
	--mc-ink-3: #8b909c;
	--mc-line: #e4e7ec;
	--mc-line-2: #d3d7df;
	--mc-ok-bg: #e9f7ef;
	--mc-ok-fg: #0f6b46;
	--mc-warn-bg: #fdf3e2;
	--mc-warn-fg: #8a5a08;
	--mc-bad-bg: #fdecec;
	--mc-bad-fg: #a32626;
	--mc-info-bg: #eef0fe;
	--mc-info-fg: #3b34a3;
	--mc-radius: 12px;
	--mc-radius-sm: 8px;

	box-sizing: border-box;
	width: 100%;
	max-width: 100%;
	margin: 0 auto;
	color: var(--mc-ink);
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	font-size: 15px;
	line-height: 1.5;
	-webkit-font-smoothing: antialiased;
}

.mc-app *,
.mc-app *::before,
.mc-app *::after {
	box-sizing: inherit;
}

/* The hidden attribute must always win, even over display:flex/grid rules below. */
.mc-app [hidden],
.mc-busy[hidden],
.mc-alert[hidden] {
	display: none !important;
}

@media (prefers-color-scheme: dark) {
	.mc-app {
		--mc-bg: #16181d;
		--mc-surface: #1c1f26;
		--mc-surface-2: #232730;
		--mc-ink: #eceef2;
		--mc-ink-2: #a2a8b6;
		--mc-ink-3: #7c8290;
		--mc-line: #2c313b;
		--mc-line-2: #3a404c;
		--mc-ok-bg: #12301f;
		--mc-ok-fg: #6ddba0;
		--mc-warn-bg: #33260e;
		--mc-warn-fg: #f3bf65;
		--mc-bad-bg: #3a1717;
		--mc-bad-fg: #f39a9a;
		--mc-info-bg: #1e1f40;
		--mc-info-fg: #a8a4f5;
	}
}

/* Sign-in gate --------------------------------------------------------- */

.mc-gate {
	display: grid;
	place-items: center;
	padding: 48px 16px;
}

.mc-gate__card {
	width: 100%;
	max-width: 400px;
	background: var(--mc-bg);
	border: 1px solid var(--mc-line);
	border-radius: 16px;
	padding: 32px 28px 22px;
	text-align: center;
	box-shadow: 0 10px 34px rgba(12, 16, 28, 0.07);
}

.mc-gate__mark {
	width: 44px;
	height: 44px;
	margin: 0 auto 14px;
	border-radius: 12px;
	background: var(--mc-accent);
	position: relative;
}

.mc-gate__mark::before {
	content: "";
	position: absolute;
	inset: 13px 11px;
	border: 2px solid #fff;
	border-radius: 3px;
	border-top-width: 5px;
}

.mc-gate__card .mc-sub {
	margin-top: 6px;
}

.mc-gate__step {
	margin-top: 20px;
	display: flex;
	flex-direction: column;
	gap: 10px;
	text-align: left;
}

.mc-gate__label {
	font-size: 12.5px;
	font-weight: 500;
	color: var(--mc-ink-2);
}

.mc-gate__card input {
	text-align: left;
	padding: 11px 12px;
	font-size: 15px;
}

.mc-gate__code {
	text-align: center !important;
	font-size: 22px !important;
	letter-spacing: 0.4em;
	font-variant-numeric: tabular-nums;
}

.mc-gate__btn {
	padding: 11px 16px;
	font-size: 14px;
	position: relative;
}

.mc-gate__back {
	align-self: center;
	font-size: 12.5px;
	color: var(--mc-ink-2);
}

.mc-gate__alert {
	margin-top: 16px;
	background: var(--mc-bad-bg);
	color: var(--mc-bad-fg);
	border-radius: var(--mc-radius-sm);
	padding: 9px 12px;
	font-size: 13px;
	text-align: left;
}

.mc-gate__alert.is-ok {
	background: var(--mc-ok-bg);
	color: var(--mc-ok-fg);
}

.mc-gate__foot {
	margin: 20px 0 0;
	font-size: 11.5px;
	color: var(--mc-ink-3);
}

/* Inline button spinner */

.mc-btn__spin {
	width: 13px;
	height: 13px;
	border: 2px solid rgba(255, 255, 255, 0.35);
	border-top-color: #fff;
	border-radius: 50%;
	animation: mc-spin 0.7s linear infinite;
	flex: none;
}

.mc-btn:not(.mc-btn--primary) .mc-btn__spin {
	border-color: var(--mc-line-2);
	border-top-color: var(--mc-accent);
}

/* Topbar identity ------------------------------------------------------- */

.mc-topbar__side {
	display: flex;
	flex-direction: column;
	align-items: flex-end;
	gap: 6px;
}

.mc-who {
	display: flex;
	align-items: center;
	gap: 8px;
}

.mc-who__email {
	font-size: 12px;
	color: var(--mc-ink-3);
}

/* Email report panel ---------------------------------------------------- */

.mc-mailer {
	padding: 14px 18px;
	border-bottom: 1px solid var(--mc-line);
	background: var(--mc-surface);
}

.mc-mailer__grid {
	display: flex;
	gap: 10px;
	align-items: flex-end;
	flex-wrap: wrap;
}

.mc-mailer__grid .mc-field {
	min-width: 150px;
	flex: 0 1 auto;
}

.mc-mailer__grid .mc-field--grow {
	flex: 1 1 200px;
}

.mc-mailer__verify {
	margin-top: 10px;
}

.mc-sender {
	margin-top: 8px;
	max-width: 460px;
}

.mc-sender__row {
	display: flex;
	gap: 8px;
	margin-bottom: 6px;
}

.mc-sender__row input {
	flex: 1;
}

/* AI note --------------------------------------------------------------- */

.mc-ainote {
	margin: 6px 2px 0;
	font-size: 12px;
	color: var(--mc-ink-3);
	text-align: center;
}

/* Typography ---------------------------------------------------------- */

.mc-app .mc-h1 {
	margin: 0;
	font-size: 20px;
	font-weight: 600;
	letter-spacing: -0.01em;
	color: var(--mc-ink);
}

.mc-app .mc-h2 {
	margin: 0 0 2px;
	font-size: 16px;
	font-weight: 600;
	color: var(--mc-ink);
}

.mc-app .mc-sub {
	margin: 0;
	font-size: 13px;
	color: var(--mc-ink-2);
}

.mc-app .mc-hint {
	font-size: 12px;
	color: var(--mc-ink-3);
}

/* Layout -------------------------------------------------------------- */

.mc-topbar {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 16px;
	flex-wrap: wrap;
	padding-bottom: 14px;
	margin-bottom: 18px;
	border-bottom: 1px solid var(--mc-line);
}

.mc-tabs {
	display: flex;
	gap: 4px;
	background: var(--mc-surface-2);
	padding: 3px;
	border-radius: 10px;
}

.mc-tab {
	appearance: none;
	border: 0;
	background: transparent;
	color: var(--mc-ink-2);
	font: inherit;
	font-size: 13px;
	font-weight: 500;
	padding: 7px 14px;
	border-radius: 7px;
	cursor: pointer;
	transition: background 0.14s ease, color 0.14s ease;
}

.mc-tab:hover {
	color: var(--mc-ink);
}

.mc-tab.is-active {
	background: var(--mc-bg);
	color: var(--mc-ink);
	box-shadow: 0 1px 2px rgba(16, 20, 30, 0.08);
}

.mc-card {
	background: var(--mc-bg);
	border: 1px solid var(--mc-line);
	border-radius: var(--mc-radius);
	overflow: hidden;
	margin-bottom: 18px;
}

.mc-card > h3,
.mc-card > .mc-sub {
	padding-left: 18px;
	padding-right: 18px;
}

.mc-card > h3 {
	padding-top: 16px;
}

.mc-card > .mc-sub {
	padding-bottom: 14px;
}

.mc-grid {
	display: grid;
	gap: 14px;
}

.mc-grid--2 {
	grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

/* Steps --------------------------------------------------------------- */

.mc-steps {
	display: flex;
	gap: 8px;
	list-style: none;
	margin: 0 0 16px;
	padding: 0;
	counter-reset: mc-step;
}

.mc-steps li {
	display: flex;
	align-items: center;
	gap: 8px;
	font-size: 13px;
	color: var(--mc-ink-3);
	counter-increment: mc-step;
}

.mc-steps li::before {
	content: counter(mc-step);
	display: grid;
	place-items: center;
	width: 20px;
	height: 20px;
	border-radius: 50%;
	border: 1px solid var(--mc-line-2);
	font-size: 11px;
	font-weight: 600;
}

.mc-steps li + li::after {
	content: "";
}

.mc-steps li + li {
	margin-left: 4px;
	padding-left: 16px;
	border-left: 1px solid var(--mc-line);
}

.mc-steps li.is-current {
	color: var(--mc-ink);
	font-weight: 500;
}

.mc-steps li.is-current::before {
	background: var(--mc-accent);
	border-color: var(--mc-accent);
	color: #fff;
}

.mc-steps li.is-done::before {
	content: "\2713";
	background: var(--mc-ok-bg);
	border-color: var(--mc-ok-bg);
	color: var(--mc-ok-fg);
}

/* Drop zones ---------------------------------------------------------- */

.mc-drop {
	position: relative;
	border: 1.5px dashed var(--mc-line-2);
	border-radius: var(--mc-radius);
	background: var(--mc-surface);
	padding: 26px 20px;
	text-align: center;
	cursor: pointer;
	transition: border-color 0.15s ease, background 0.15s ease;
	min-height: 148px;
	display: flex;
	align-items: center;
	justify-content: center;
}

.mc-drop:hover,
.mc-drop:focus-visible {
	border-color: var(--mc-accent);
	background: var(--mc-surface-2);
	outline: none;
}

.mc-drop.is-over {
	border-color: var(--mc-accent);
	background: var(--mc-info-bg);
}

.mc-drop.is-loaded {
	border-style: solid;
	border-color: var(--mc-ok-fg);
	background: var(--mc-bg);
	cursor: default;
	text-align: left;
}

.mc-drop__body {
	display: flex;
	flex-direction: column;
	gap: 4px;
	align-items: center;
}

.mc-drop.is-loaded .mc-drop__body {
	display: none;
}

.mc-drop__icon {
	width: 26px;
	height: 26px;
	margin-bottom: 4px;
	border: 1.5px solid var(--mc-ink-3);
	border-radius: 5px;
	position: relative;
}

.mc-drop__icon::before {
	content: "";
	position: absolute;
	inset: auto 6px 5px 6px;
	height: 2px;
	background: var(--mc-ink-3);
	box-shadow: 0 -5px 0 var(--mc-ink-3);
}

.mc-drop__title {
	font-weight: 600;
	font-size: 14px;
}

.mc-drop__hint {
	font-size: 12.5px;
	color: var(--mc-ink-2);
	max-width: 30ch;
}

.mc-drop__state {
	display: flex;
	align-items: center;
	gap: 10px;
	width: 100%;
	text-align: left;
}

.mc-drop__name {
	font-weight: 600;
	font-size: 14px;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	flex: 1;
}

.mc-drop__meta {
	font-size: 12.5px;
	color: var(--mc-ink-2);
	white-space: nowrap;
}

.mc-drop__clear {
	appearance: none;
	border: 0;
	background: var(--mc-surface-2);
	color: var(--mc-ink-2);
	width: 24px;
	height: 24px;
	border-radius: 6px;
	font-size: 16px;
	line-height: 1;
	cursor: pointer;
	flex: none;
}

.mc-drop__clear:hover {
	background: var(--mc-bad-bg);
	color: var(--mc-bad-fg);
}

.mc-progress {
	position: absolute;
	left: 12px;
	right: 12px;
	bottom: 10px;
	height: 3px;
	background: var(--mc-surface-2);
	border-radius: 3px;
	overflow: hidden;
}

.mc-progress i {
	display: block;
	height: 100%;
	width: 0;
	background: var(--mc-accent);
	transition: width 0.2s ease;
}

/* Controls ------------------------------------------------------------ */

.mc-runbar {
	display: flex;
	align-items: flex-end;
	gap: 12px;
	flex-wrap: wrap;
	margin: 16px 0 6px;
}

.mc-field {
	display: flex;
	flex-direction: column;
	gap: 4px;
	min-width: 160px;
	flex: 1;
}

.mc-field--sm {
	max-width: 110px;
	flex: none;
}

.mc-field label {
	font-size: 12px;
	font-weight: 500;
	color: var(--mc-ink-2);
}

.mc-app input[type="text"],
.mc-app input[type="number"],
.mc-app input[type="search"],
.mc-app input[type="date"],
.mc-app select,
.mc-app textarea {
	appearance: none;
	width: 100%;
	font: inherit;
	font-size: 13.5px;
	color: var(--mc-ink);
	background: var(--mc-bg);
	border: 1px solid var(--mc-line-2);
	border-radius: var(--mc-radius-sm);
	padding: 8px 10px;
	line-height: 1.35;
	transition: border-color 0.14s ease, box-shadow 0.14s ease;
}

.mc-app select {
	background-image: linear-gradient(45deg, transparent 50%, var(--mc-ink-3) 50%), linear-gradient(135deg, var(--mc-ink-3) 50%, transparent 50%);
	background-position: calc(100% - 15px) 51%, calc(100% - 10px) 51%;
	background-size: 5px 5px, 5px 5px;
	background-repeat: no-repeat;
	padding-right: 28px;
}

.mc-app input:focus,
.mc-app select:focus,
.mc-app textarea:focus {
	outline: none;
	border-color: var(--mc-accent);
	box-shadow: 0 0 0 3px color-mix(in srgb, var(--mc-accent) 18%, transparent);
}

.mc-btn {
	appearance: none;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	font: inherit;
	font-size: 13.5px;
	font-weight: 500;
	color: var(--mc-ink);
	background: var(--mc-bg);
	border: 1px solid var(--mc-line-2);
	border-radius: var(--mc-radius-sm);
	padding: 8px 14px;
	cursor: pointer;
	text-decoration: none;
	transition: background 0.14s ease, border-color 0.14s ease, transform 0.06s ease;
	white-space: nowrap;
}

.mc-btn:hover {
	background: var(--mc-surface-2);
	color: var(--mc-ink);
}

.mc-btn:active {
	transform: scale(0.985);
}

.mc-btn:disabled,
.mc-btn[disabled] {
	opacity: 0.45;
	cursor: not-allowed;
}

.mc-btn--primary {
	background: var(--mc-accent);
	border-color: var(--mc-accent);
	color: #fff;
}

.mc-btn--primary:hover {
	background: color-mix(in srgb, var(--mc-accent) 88%, #000);
	color: #fff;
}

.mc-btn--warn {
	border-color: var(--mc-bad-fg);
	color: var(--mc-bad-fg);
}

.mc-btn--warn:hover {
	background: var(--mc-bad-bg);
	color: var(--mc-bad-fg);
}

.mc-btn--ghost {
	border-color: transparent;
	background: transparent;
	padding: 6px 10px;
}

.mc-btn--sm {
	font-size: 12.5px;
	padding: 5px 10px;
}

/* Alerts and busy ----------------------------------------------------- */

.mc-alert {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	background: var(--mc-bad-bg);
	color: var(--mc-bad-fg);
	border-radius: var(--mc-radius-sm);
	padding: 10px 14px;
	font-size: 13.5px;
	margin-bottom: 14px;
}

.mc-alert--ok {
	background: var(--mc-ok-bg);
	color: var(--mc-ok-fg);
}

.mc-alert__text {
	flex: 1;
}

.mc-alert__close {
	appearance: none;
	border: 0;
	background: transparent;
	color: inherit;
	font-size: 17px;
	line-height: 1;
	cursor: pointer;
	padding: 0 2px;
}

.mc-busy {
	position: fixed;
	inset: 0;
	background: rgba(12, 14, 20, 0.42);
	display: grid;
	place-items: center;
	z-index: 99999;
}

.mc-busy__box {
	display: flex;
	align-items: center;
	gap: 12px;
	background: var(--mc-bg);
	color: var(--mc-ink);
	border-radius: var(--mc-radius);
	padding: 16px 22px;
	font-size: 14px;
	font-weight: 500;
	box-shadow: 0 12px 40px rgba(10, 12, 20, 0.28);
}

.mc-spinner {
	width: 16px;
	height: 16px;
	border: 2px solid var(--mc-line-2);
	border-top-color: var(--mc-accent);
	border-radius: 50%;
	animation: mc-spin 0.7s linear infinite;
}

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

@media (prefers-reduced-motion: reduce) {
	.mc-app *,
	.mc-app *::before,
	.mc-app *::after {
		animation-duration: 0.001ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.001ms !important;
	}
}

/* Mapping ------------------------------------------------------------- */

.mc-mapping {
	margin-top: 18px;
	border: 1px solid var(--mc-line);
	border-radius: var(--mc-radius);
	overflow: hidden;
}

.mc-mapping__head {
	padding: 14px 18px;
	background: var(--mc-surface);
	border-bottom: 1px solid var(--mc-line);
}

.mc-mapgroup {
	padding: 14px 18px;
	border-bottom: 1px solid var(--mc-line);
}

.mc-mapgroup:last-child {
	border-bottom: 0;
}

.mc-mapgroup__title {
	display: flex;
	align-items: center;
	gap: 8px;
	font-size: 13.5px;
	font-weight: 600;
	margin-bottom: 10px;
}

.mc-maprow {
	display: grid;
	grid-template-columns: minmax(140px, 1fr) minmax(160px, 1.2fr);
	gap: 8px 12px;
	align-items: center;
	padding: 5px 0;
}

.mc-maprow label {
	font-size: 13px;
	color: var(--mc-ink-2);
}

.mc-maprow label b {
	color: var(--mc-ink);
	font-weight: 500;
}

.mc-req {
	color: var(--mc-bad-fg);
	font-size: 11px;
	margin-left: 4px;
}

/* Summary cards ------------------------------------------------------- */

.mc-results__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 14px;
	flex-wrap: wrap;
	padding: 15px 18px;
	border-bottom: 1px solid var(--mc-line);
}

.mc-results__actions {
	display: flex;
	gap: 8px;
}

.mc-cards {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
	gap: 10px;
	padding: 16px 18px;
}

.mc-stat {
	background: var(--mc-surface);
	border-radius: var(--mc-radius-sm);
	padding: 12px 14px;
}

.mc-stat__label {
	display: block;
	font-size: 12px;
	color: var(--mc-ink-2);
	margin-bottom: 3px;
}

.mc-stat__value {
	display: block;
	font-size: 22px;
	font-weight: 600;
	letter-spacing: -0.02em;
	font-variant-numeric: tabular-nums;
}

.mc-stat--bad {
	background: var(--mc-bad-bg);
}

.mc-stat--bad .mc-stat__label,
.mc-stat--bad .mc-stat__value {
	color: var(--mc-bad-fg);
}

.mc-stat--warn {
	background: var(--mc-warn-bg);
}

.mc-stat--warn .mc-stat__label,
.mc-stat--warn .mc-stat__value {
	color: var(--mc-warn-fg);
}

/* Filters ------------------------------------------------------------- */

.mc-filters {
	padding: 0 18px 12px;
}

.mc-pills {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	margin-bottom: 10px;
}

.mc-pill {
	appearance: none;
	font: inherit;
	font-size: 12.5px;
	border: 1px solid var(--mc-line-2);
	background: var(--mc-bg);
	color: var(--mc-ink-2);
	border-radius: 999px;
	padding: 5px 12px;
	cursor: pointer;
	transition: background 0.14s ease, color 0.14s ease, border-color 0.14s ease;
}

.mc-pill:hover {
	border-color: var(--mc-ink-3);
	color: var(--mc-ink);
}

.mc-pill.is-active {
	background: var(--mc-ink);
	border-color: var(--mc-ink);
	color: var(--mc-bg);
}

.mc-pill b {
	font-weight: 500;
	opacity: 0.7;
	margin-left: 4px;
}

.mc-filters__row {
	display: flex;
	gap: 10px;
}

.mc-filters__row input[type="search"] {
	flex: 1;
}

.mc-filters__row select {
	max-width: 200px;
}

/* Table --------------------------------------------------------------- */

.mc-table-wrap {
	overflow-x: auto;
	border-top: 1px solid var(--mc-line);
}

.mc-table {
	width: 100%;
	border-collapse: collapse;
	font-size: 13px;
}

.mc-table th {
	text-align: left;
	font-weight: 500;
	font-size: 12px;
	color: var(--mc-ink-2);
	padding: 9px 10px;
	background: var(--mc-surface);
	border-bottom: 1px solid var(--mc-line);
	white-space: nowrap;
	position: sticky;
	top: 0;
	z-index: 1;
}

.mc-table td {
	padding: 9px 10px;
	border-bottom: 1px solid var(--mc-line);
	vertical-align: middle;
}

.mc-table .mc-num,
.mc-table td.mc-num {
	text-align: right;
	font-variant-numeric: tabular-nums;
	white-space: nowrap;
}

.mc-table .mc-col-order {
	width: 108px;
}

.mc-table .mc-col-cat {
	width: 150px;
}

.mc-table .mc-col-status {
	width: 128px;
}

.mc-row {
	cursor: pointer;
	transition: background 0.1s ease;
}

.mc-row:hover {
	background: var(--mc-surface);
}

.mc-row.is-open {
	background: var(--mc-surface);
}

.mc-mono {
	font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
	font-size: 12.5px;
}

.mc-truncate {
	max-width: 190px;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	display: block;
}

.mc-neg {
	color: var(--mc-bad-fg);
	font-weight: 600;
}

.mc-pos {
	color: var(--mc-ok-fg);
	font-weight: 600;
}

.mc-muted {
	color: var(--mc-ink-3);
}

.mc-tag {
	display: inline-block;
	font-size: 11.5px;
	font-weight: 500;
	padding: 3px 9px;
	border-radius: 999px;
	white-space: nowrap;
}

.mc-tag--paid {
	background: var(--mc-ok-bg);
	color: var(--mc-ok-fg);
}

.mc-tag--underpaid,
.mc-tag--not_paid {
	background: var(--mc-bad-bg);
	color: var(--mc-bad-fg);
}

.mc-tag--overpaid,
.mc-tag--chargeback {
	background: var(--mc-warn-bg);
	color: var(--mc-warn-fg);
}

.mc-tag--informational,
.mc-tag--payout_only {
	background: var(--mc-info-bg);
	color: var(--mc-info-fg);
}

.mc-tag--no_recon {
	background: var(--mc-surface-2);
	color: var(--mc-ink-2);
}

/* Row drawer ---------------------------------------------------------- */

.mc-drawer td {
	background: var(--mc-surface);
	padding: 0 10px 14px;
}

.mc-drawer__inner {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
	gap: 14px;
	padding: 12px 8px 4px;
}

.mc-drawer h4 {
	margin: 0 0 6px;
	font-size: 12px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	color: var(--mc-ink-3);
}

.mc-kv {
	display: grid;
	grid-template-columns: auto 1fr;
	gap: 3px 10px;
	font-size: 12.5px;
}

.mc-kv dt {
	color: var(--mc-ink-2);
	white-space: nowrap;
}

.mc-kv dd {
	margin: 0;
	color: var(--mc-ink);
	word-break: break-word;
}

.mc-why {
	grid-column: 1 / -1;
	background: var(--mc-bg);
	border: 1px solid var(--mc-line);
	border-radius: var(--mc-radius-sm);
	padding: 10px 12px;
	font-size: 13px;
	color: var(--mc-ink);
}

.mc-esc {
	grid-column: 1 / -1;
	display: flex;
	gap: 8px;
	align-items: flex-end;
	flex-wrap: wrap;
}

.mc-esc select {
	max-width: 150px;
}

.mc-esc input[type="text"] {
	flex: 1;
	min-width: 180px;
}

/* Footer -------------------------------------------------------------- */

.mc-results__foot {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	flex-wrap: wrap;
	padding: 11px 18px;
	border-top: 1px solid var(--mc-line);
	font-size: 12.5px;
	color: var(--mc-ink-2);
}

.mc-recap {
	display: inline-flex;
	align-items: center;
	gap: 6px;
}

.mc-recap.is-ok {
	color: var(--mc-ok-fg);
}

.mc-recap.is-off {
	color: var(--mc-warn-fg);
}

.mc-pager {
	display: inline-flex;
	align-items: center;
	gap: 8px;
}

/* Informational ------------------------------------------------------- */

.mc-info__row {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 14px;
	padding: 11px 18px;
	border-top: 1px solid var(--mc-line);
	font-size: 13px;
}

.mc-info__row strong {
	font-weight: 600;
}

.mc-info__row p {
	margin: 2px 0 0;
	font-size: 12.5px;
	color: var(--mc-ink-2);
	max-width: 62ch;
}

.mc-info__amt {
	font-variant-numeric: tabular-nums;
	font-weight: 600;
	white-space: nowrap;
}

/* History ------------------------------------------------------------- */

.mc-hist {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 14px;
	padding: 13px 18px;
	border-top: 1px solid var(--mc-line);
	flex-wrap: wrap;
}

.mc-hist__main {
	flex: 1;
	min-width: 200px;
}

.mc-hist__title {
	font-weight: 600;
	font-size: 14px;
}

.mc-hist__meta {
	font-size: 12.5px;
	color: var(--mc-ink-2);
	margin-top: 2px;
}

.mc-hist__nums {
	display: flex;
	gap: 18px;
	font-size: 12.5px;
	font-variant-numeric: tabular-nums;
}

.mc-hist__nums span b {
	display: block;
	font-size: 14px;
	font-weight: 600;
}

.mc-hist__actions {
	display: flex;
	gap: 6px;
}

/* Rates --------------------------------------------------------------- */

.mc-rates__head {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 14px;
	flex-wrap: wrap;
	padding: 16px 18px 14px;
	border-bottom: 1px solid var(--mc-line);
}

.mc-rates__actions {
	display: flex;
	gap: 8px;
	align-items: center;
}

.mc-rates__actions select {
	min-width: 220px;
}

.mc-schedule-meta {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
	gap: 12px;
	padding: 14px 18px;
	border-bottom: 1px solid var(--mc-line);
	background: var(--mc-surface);
}

.mc-ratedrop {
	display: flex;
	align-items: center;
	gap: 12px;
	flex-wrap: wrap;
	padding: 12px 18px;
	border-bottom: 1px solid var(--mc-line);
}

.mc-rules {
	padding: 4px 0;
}

.mc-rule {
	border-bottom: 1px solid var(--mc-line);
	padding: 12px 18px;
}

.mc-rule__top {
	display: grid;
	grid-template-columns: minmax(120px, 0.7fr) minmax(200px, 1.6fr) 130px 110px auto;
	gap: 8px;
	align-items: end;
}

.mc-rule__conds {
	margin-top: 10px;
	padding-left: 12px;
	border-left: 2px solid var(--mc-line-2);
}

.mc-cond {
	display: grid;
	grid-template-columns: 140px 150px 1fr auto;
	gap: 6px;
	margin-bottom: 6px;
	align-items: center;
}

.mc-rule__note {
	margin-top: 8px;
}

.mc-rules__foot {
	display: flex;
	gap: 8px;
	justify-content: flex-end;
	padding: 14px 18px;
	background: var(--mc-surface);
}

.mc-x {
	appearance: none;
	border: 1px solid var(--mc-line-2);
	background: var(--mc-bg);
	color: var(--mc-ink-2);
	width: 30px;
	height: 32px;
	border-radius: var(--mc-radius-sm);
	cursor: pointer;
	font-size: 15px;
	line-height: 1;
}

.mc-x:hover {
	background: var(--mc-bad-bg);
	color: var(--mc-bad-fg);
	border-color: var(--mc-bad-bg);
}

/* Empty and locked ---------------------------------------------------- */

.mc-empty {
	padding: 30px 18px;
	text-align: center;
	color: var(--mc-ink-3);
	font-size: 13.5px;
}

.mc-locked {
	padding: 26px 22px;
	text-align: center;
}

.mc-app--locked {
	max-width: 520px;
}

/* Mobile -------------------------------------------------------------- */

@media (max-width: 782px) {
	.mc-topbar {
		flex-direction: column;
		align-items: stretch;
	}

	.mc-steps li + li {
		padding-left: 10px;
		margin-left: 0;
	}

	.mc-steps li span {
		display: none;
	}

	.mc-steps li.is-current span {
		display: inline;
	}

	.mc-rule__top,
	.mc-cond {
		grid-template-columns: 1fr;
	}

	.mc-table thead {
		display: none;
	}

	.mc-table,
	.mc-table tbody,
	.mc-table tr,
	.mc-table td {
		display: block;
		width: 100%;
	}

	.mc-table tr.mc-row {
		border-bottom: 1px solid var(--mc-line);
		padding: 10px 12px;
		display: grid;
		grid-template-columns: 1fr auto;
		gap: 2px 10px;
	}

	.mc-table tr.mc-row td {
		border: 0;
		padding: 1px 0;
	}

	.mc-table td[data-c="order"] {
		grid-column: 1;
		font-weight: 600;
	}

	.mc-table td[data-c="customer"] {
		grid-column: 1;
	}

	.mc-table td[data-c="category"] {
		grid-column: 1;
		font-size: 12px;
		color: var(--mc-ink-2);
	}

	.mc-table td[data-c="expected"],
	.mc-table td[data-c="paid"] {
		display: none;
	}

	.mc-table td[data-c="variance"] {
		grid-column: 2;
		grid-row: 1;
		text-align: right;
	}

	.mc-table td[data-c="status"] {
		grid-column: 2;
		grid-row: 2;
		text-align: right;
	}

	.mc-drawer__inner {
		grid-template-columns: 1fr;
	}

	.mc-results__actions {
		width: 100%;
	}

	.mc-results__actions .mc-btn {
		flex: 1;
	}
}
