.mc-portal {
	--mc-p-bg: #edf2f8;
	--mc-p-card: #ffffff;
	--mc-p-border: #d4deec;
	--mc-p-text: #0f2139;
	--mc-p-muted: #596c86;
	--mc-p-accent: #15c5b5;
	--mc-p-accent-dark: #102c4d;
	--mc-p-warning: #f59e0b;
	background: transparent;
	color: var(--mc-p-text);
	font-family: Inter, "Segoe UI", Arial, sans-serif;
}

.mc-portal [hidden] {
	display: none !important;
}

.mc-portal-head {
	display: flex;
	justify-content: space-between;
	align-items: flex-start;
	gap: 14px;
	background: linear-gradient(120deg, #0a1f3c 0%, #153960 100%);
	color: #eff6ff;
	border-radius: 18px;
	padding: 18px 20px;
	margin-bottom: 12px;
}

.mc-portal-eyebrow {
	margin: 0 0 8px;
	text-transform: uppercase;
	letter-spacing: 0.7px;
	font-size: 11px;
	color: #9db4d2;
}

.mc-portal-head h2 {
	margin: 0;
	font-size: 33px;
	letter-spacing: -0.8px;
	color: #eff6ff !important;
}

.mc-portal-head p {
	margin: 8px 0 0;
	max-width: 720px;
	color: #cedbec !important;
}

.mc-portal-badge {
	padding: 8px 13px;
	background: rgba(21, 197, 181, 0.14);
	color: #7bf5e8;
	border: 1px solid rgba(21, 197, 181, 0.4);
	border-radius: 999px;
	font-size: 12px;
	font-weight: 700;
}

.mc-portal-quick-nav {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-bottom: 12px;
}

.mc-portal-quick-nav a {
	text-decoration: none;
	background: #fff;
	border: 1px solid var(--mc-p-border);
	color: #173659;
	border-radius: 999px;
	padding: 7px 12px;
	font-weight: 700;
	font-size: 13px;
	display: inline-flex;
	align-items: center;
	gap: 6px;
}

.mc-portal-quick-nav a::before {
	content: "";
	width: 8px;
	height: 8px;
	border-radius: 999px;
	background: linear-gradient(145deg, #15c5b5, #0f87cc);
	box-shadow: 0 0 0 2px rgba(21, 197, 181, 0.12);
}

.mc-portal-quick-nav a:hover {
	border-color: #9ccbe9;
	background: #f4fbff;
}

.mc-plan-banner {
	margin: 0 0 12px;
	padding: 12px 14px;
	border: 1px solid #f8d49e;
	border-radius: 12px;
	background: linear-gradient(120deg, #fff6e8 0%, #ffedd1 100%);
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
}

.mc-subscription-banner {
	margin: 0 0 12px;
	padding: 12px 14px;
	border: 1px solid #9ad2f0;
	border-radius: 12px;
	background: linear-gradient(120deg, #eaf6ff 0%, #dff2ff 100%);
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
}

.mc-subscription-banner strong {
	display: block;
	margin-bottom: 4px;
}

.mc-subscription-banner span {
	color: var(--mc-p-muted);
}

.mc-subscription-banner.is-warning {
	border-color: #f7c97f;
	background: linear-gradient(120deg, #fff7e7 0%, #ffefcf 100%);
}

.mc-subscription-banner.is-danger {
	border-color: #f2adad;
	background: linear-gradient(120deg, #ffefef 0%, #ffe2e2 100%);
}

.mc-subscription-modal {
	position: fixed;
	inset: 0;
	z-index: 9999;
	display: grid;
	place-items: center;
	padding: 14px;
}

.mc-subscription-modal-backdrop {
	position: absolute;
	inset: 0;
	background: rgba(5, 14, 27, 0.58);
}

.mc-subscription-modal-card {
	position: relative;
	max-width: 520px;
	width: min(100%, 520px);
	background: #fff;
	border: 1px solid #d4deec;
	border-radius: 16px;
	box-shadow: 0 18px 46px rgba(0, 0, 0, 0.24);
	padding: 16px;
}

.mc-subscription-modal-card h3 {
	margin-top: 0;
	margin-bottom: 8px;
}

.mc-subscription-modal-card p {
	margin-top: 0;
	color: var(--mc-p-muted);
}

.mc-subscription-modal.is-warning .mc-subscription-modal-card {
	border-color: #f7c97f;
}

.mc-subscription-modal.is-danger .mc-subscription-modal-card {
	border-color: #f2adad;
}

.mc-limit-progress-wrap {
	background: #fff;
	border: 1px solid var(--mc-p-border);
	border-radius: 14px;
	padding: 13px;
	margin-bottom: 12px;
}

.mc-limit-progress-label {
	display: flex;
	justify-content: space-between;
	font-weight: 700;
	color: var(--mc-p-text);
	margin-bottom: 7px;
}

.mc-limit-progress-track {
	height: 10px;
	border-radius: 999px;
	background: #e5edf6;
	overflow: hidden;
}

.mc-limit-progress-bar {
	height: 100%;
	width: 0;
	background: linear-gradient(120deg, #12b7a6 0%, #0d9ec3 100%);
	transition: width 0.35s ease;
}

.mc-limit-progress-bar.is-warning {
	background: linear-gradient(120deg, #f9b24d 0%, #f59e0b 100%);
}

.mc-limit-progress-bar.is-danger {
	background: linear-gradient(120deg, #ef4444 0%, #dc2626 100%);
}

.mc-dashboard-layout {
	display: grid;
	grid-template-columns: 2fr 1.2fr 1fr;
	gap: 12px;
	margin-bottom: 12px;
}

.mc-widget-strip {
	display: grid;
	grid-template-columns: repeat(3, minmax(180px, 1fr));
	gap: 12px;
	margin-bottom: 12px;
}

.mc-widget-card {
	display: flex;
	align-items: center;
	gap: 10px;
}

.mc-widget-card small {
	display: block;
	font-size: 11px;
	letter-spacing: 0.4px;
	text-transform: uppercase;
	color: var(--mc-p-muted);
	font-weight: 700;
}

.mc-widget-card strong {
	display: block;
	margin-top: 3px;
	font-size: 26px;
	line-height: 1.05;
	color: #0c2038;
}

.mc-widget-icon {
	width: 38px;
	height: 38px;
	border-radius: 11px;
	background: linear-gradient(130deg, rgba(62, 176, 170, 0.22) 0%, rgba(4, 7, 68, 0.12) 100%);
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex: 0 0 38px;
}

.mc-widget-icon svg {
	width: 18px;
	height: 18px;
	fill: none;
	stroke: #0d2e57;
	stroke-width: 1.7;
	stroke-linecap: round;
	stroke-linejoin: round;
}

.mc-portal-card {
	background: var(--mc-p-card);
	border: 1px solid var(--mc-p-border);
	border-radius: 15px;
	padding: 14px;
	box-shadow: 0 8px 20px rgba(15, 33, 57, 0.06);
}

.mc-card-title {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	margin-bottom: 10px;
}

.mc-card-title h3 {
	margin: 0;
	font-size: 20px;
}

.mc-card-title span {
	font-size: 12px;
	font-weight: 700;
	color: var(--mc-p-muted);
}

.mc-usage-chart {
	width: 100%;
	height: 150px;
	background: linear-gradient(180deg, #f9fcff 0%, #f0f7ff 100%);
	border: 1px solid #dce8f5;
	border-radius: 10px;
}

.mc-usage-chart polyline {
	fill: none;
	stroke: #15c5b5;
	stroke-width: 4;
	stroke-linecap: round;
	stroke-linejoin: round;
}

.mc-usage-chart.is-animating polyline {
	stroke-dasharray: 720;
	stroke-dashoffset: 720;
	animation: mcLineDraw 0.75s ease forwards;
}

@keyframes mcLineDraw {
	to {
		stroke-dashoffset: 0;
	}
}

.mc-chart-legends {
	margin-top: 8px;
	display: flex;
	gap: 10px;
	font-size: 12px;
	color: var(--mc-p-muted);
}

.mc-market-grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(90px, 1fr));
	gap: 8px;
}

.mc-market-item {
	background: linear-gradient(145deg, #0f223d 0%, #1b416e 100%);
	border-radius: 12px;
	padding: 10px;
}

.mc-market-item strong {
	display: block;
	font-size: 12px;
	color: #88a6c9;
	margin-bottom: 7px;
}

.mc-market-item span {
	color: #ecf5ff;
	font-size: 19px;
	font-weight: 700;
}

.mc-actions-grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 8px;
}

.mc-actions-grid a {
	display: block;
	text-decoration: none;
	padding: 10px;
	border: 1px solid var(--mc-p-border);
	border-radius: 11px;
	background: linear-gradient(160deg, #f9fcff 0%, #f0f7ff 100%);
	color: #173659;
	font-weight: 700;
	font-size: 13px;
}

.mc-actions-grid a strong {
	color: #0f87cc;
	margin-right: 6px;
}

.mc-actions-grid a:hover {
	border-color: #9bcdea;
	background: #f4fbff;
}

.mc-stake-card p {
	margin: 0 0 10px;
	color: var(--mc-p-muted);
}

.mc-kpi-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(178px, 1fr));
	gap: 10px;
	margin-bottom: 12px;
}

.mc-kpi-card {
	position: relative;
	padding-top: 44px;
}

.mc-kpi-icon {
	position: absolute;
	top: 10px;
	left: 10px;
	width: 28px;
	height: 28px;
	border-radius: 9px;
	background: linear-gradient(140deg, rgba(21, 197, 181, 0.2), rgba(11, 27, 52, 0.18));
	display: inline-flex;
	align-items: center;
	justify-content: center;
}

.mc-kpi-icon svg {
	width: 16px;
	height: 16px;
	stroke: #0f2c4f;
	fill: none;
	stroke-width: 1.7;
}

.mc-kpi-card h3 {
	margin: 0 0 5px;
	font-size: 16px;
}

.mc-portal-kpi {
	margin: 0;
	font-size: 28px;
	font-weight: 800;
	letter-spacing: -0.4px;
	color: #0a1c33;
}

.mc-portal-card--wide {
	margin-top: 12px;
	position: relative;
}

.mc-portal-card--wide::before {
	content: "";
	position: absolute;
	left: 0;
	top: 0;
	width: 4px;
	height: 100%;
	border-radius: 15px 0 0 15px;
	background: linear-gradient(180deg, #15c5b5 0%, #0f87cc 100%);
}

.mc-form-stepper {
	border: 1px solid #d9e5f3;
	border-radius: 14px;
	background: linear-gradient(160deg, #fafdff 0%, #f3f8ff 100%);
	padding: 12px;
}

.mc-stepper-dots {
	display: flex;
	gap: 8px;
	flex-wrap: wrap;
	margin-bottom: 10px;
}

.mc-step-dot {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	padding: 6px 10px;
	border-radius: 999px;
	background: #ecf2fa;
	color: #365171;
	border: 1px solid #d4e0ee;
	font-size: 12px;
	font-weight: 700;
}

.mc-step-dot.is-active {
	background: linear-gradient(120deg, #11c5b4 0%, #0f87cc 100%);
	border-color: #11c5b4;
	color: #06263f;
	box-shadow: 0 0 0 2px rgba(17, 197, 180, 0.22);
}

.mc-step-copy {
	margin: 0;
	color: var(--mc-p-muted);
	line-height: 1.4;
	font-size: 13px;
}

.mc-form-step {
	display: none;
}

.mc-form-step.is-active {
	display: block;
	animation: mcStepIn 0.2s ease;
}

.mc-auth-stepper {
	border: 1px solid #d9e5f3;
	border-radius: 14px;
	background: linear-gradient(160deg, #fafdff 0%, #f3f8ff 100%);
	padding: 12px;
}

.mc-auth-actions {
	display: flex;
	gap: 8px;
	flex-wrap: wrap;
	margin-top: 10px;
}

.mc-auth-summary {
	margin-top: 8px;
	padding: 8px 10px;
	background: #f4f9ff;
	border: 1px solid #d7e4f4;
	border-radius: 10px;
}

.mc-auth-summary p {
	margin: 0 0 5px;
	font-size: 13px;
	color: var(--mc-p-muted);
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
}

.mc-auth-summary p:last-child {
	margin-bottom: 0;
}

@keyframes mcStepIn {
	from {
		opacity: 0;
		transform: translateY(4px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

.mc-portal-form-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
	gap: 10px;
}

.mc-portal-form-grid label {
	display: flex;
	flex-direction: column;
	gap: 6px;
	font-weight: 600;
	color: var(--mc-p-text);
}

.mc-portal-form-grid input,
.mc-portal-form-grid select,
.mc-auth-form input,
.mc-auth-form select {
	padding: 10px;
	border-radius: 10px;
	border: 1px solid var(--mc-p-border);
	background: #fefefe;
}

.mc-readonly input {
	background: #eef5fe;
	color: #2d4b70;
}

.mc-portal-actions {
	display: flex;
	gap: 8px;
	flex-wrap: wrap;
	margin-top: 12px;
}

.mc-portal .button {
	border-radius: 12px;
	padding: 0 16px;
	font-weight: 700;
	min-height: 44px;
}

.mc-portal .button.button-primary {
	background: linear-gradient(120deg, #3eb0aa 0%, #2d7fcd 100%);
	border-color: #2f8ca5;
}

.mc-portal .button.button-primary:hover {
	filter: brightness(0.96);
}

.mc-portal-feedback {
	margin: 10px 0 0;
	color: var(--mc-p-muted);
}

.mc-portal-secret {
	margin-top: 12px;
	padding: 12px;
	border-radius: 10px;
	border: 1px dashed #9ac7ff;
	background: #f2f8ff;
	color: #0f315f;
	line-height: 1.5;
	word-break: break-word;
}

.mc-portal-secret strong {
	color: #0b2343;
}

.mc-portal-quote {
	margin-top: 10px;
	padding: 10px 12px;
	border: 1px solid var(--mc-p-border);
	border-radius: 10px;
	background: #f7fbff;
	color: var(--mc-p-muted);
}

.mc-portal-muted {
	margin: 8px 0 0;
	color: var(--mc-p-muted);
	font-size: 13px;
}

.mc-charge-layout {
	display: grid;
	grid-template-columns: minmax(180px, 320px) 1fr;
	gap: 14px;
	align-items: start;
}

.mc-charge-qr-wrap {
	background: #fff;
	border: 1px solid var(--mc-p-border);
	border-radius: 12px;
	padding: 10px;
	text-align: center;
	overflow: hidden;
	position: relative;
}

.mc-charge-qr {
	width: 100%;
	max-width: 280px;
	height: auto;
	border-radius: 10px;
	transition: filter 0.2s ease, opacity 0.2s ease;
}

.mc-charge-qr-wrap.is-generating .mc-charge-qr {
	opacity: 0.25;
	filter: blur(1px);
}

.mc-charge-qr-pulse {
	position: absolute;
	inset: 0;
	display: none;
	align-items: center;
	justify-content: center;
	gap: 8px;
	color: #0d2f52;
	font-weight: 800;
	font-size: 13px;
	text-shadow: 0 1px 1px rgba(255, 255, 255, 0.8);
	background: radial-gradient(circle at 50% 20%, rgba(17, 197, 180, 0.28), rgba(255, 255, 255, 0.6));
}

.mc-charge-qr-pulse::before {
	content: "";
	width: 18px;
	height: 18px;
	border-radius: 999px;
	border: 2px solid rgba(13, 47, 82, 0.3);
	border-top-color: #0f87cc;
	animation: mcSpinner 0.8s linear infinite;
}

.mc-charge-qr-wrap.is-generating .mc-charge-qr-pulse {
	display: inline-flex;
}

.mc-charge-meta textarea {
	width: 100%;
	margin-top: 8px;
	border: 1px solid var(--mc-p-border);
	border-radius: 10px;
	padding: 10px;
	resize: vertical;
}

.mc-charge-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-top: 8px;
}

.mc-portal-table {
	width: 100%;
	border-collapse: collapse;
	border: 1px solid var(--mc-p-border);
	border-radius: 12px;
	overflow: hidden;
}

.mc-portal-table th,
.mc-portal-table td {
	text-align: left;
	padding: 9px;
	border-bottom: 1px solid #e5ecf4;
}

.mc-portal-table th {
	text-transform: uppercase;
	font-size: 12px;
	letter-spacing: 0.4px;
	color: var(--mc-p-muted);
	background: #f7fbff;
}

.mc-portal-table td .button {
	min-width: 84px;
}

.mc-portal-chip {
	display: inline-block;
	padding: 4px 8px;
	border-radius: 999px;
	font-size: 12px;
	font-weight: 700;
	background: #eef3f8;
	color: #2b425e;
}

.mc-status-paid,
.mc-status-confirmed {
	background: #e4f7ec;
	color: #15703f;
}

.mc-status-pending {
	background: #fff2db;
	color: #8a5a00;
}

.mc-status-hold,
.mc-status-held,
.mc-status-approved {
	background: #e8f0ff;
	color: #234a9b;
}

.mc-status-sent,
.mc-status-processing_batch {
	background: #f1ecff;
	color: #5c3aa3;
}

.mc-status-processing,
.mc-status-processing_payment {
	background: #eaf1ff;
	color: #234a9b;
}

.mc-status-rejected,
.mc-status-cancelled,
.mc-status-failed {
	background: #ffe8e8;
	color: #8a2d2d;
}

@media (max-width: 1120px) {
	.mc-dashboard-layout {
		grid-template-columns: 1fr;
	}

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

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

@media (max-width: 860px) {
	.mc-portal-head {
		flex-direction: column;
	}

	.mc-portal-head h2 {
		font-size: 28px;
	}

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

	.mc-portal-kpi {
		font-size: 24px;
	}
}

/* Sprint UX hardening: modern portal and contrast fixes */
.mc-site-shell .mc-portal {
	--mc-p-bg: #eef3fa;
	--mc-p-card: #ffffff;
	--mc-p-border: #d4dfed;
	--mc-p-text: #0e2037;
	--mc-p-muted: #5e708a;
	--mc-p-accent: #11c5b4;
	--mc-p-accent-dark: #0f2f57;
	--mc-p-warning: #f59e0b;
}

.mc-site-shell .mc-portal-head {
	padding: clamp(20px, 3.2vw, 34px);
	border-radius: 20px;
	background: radial-gradient(circle at 86% -10%, rgba(33, 191, 175, 0.25) 0%, transparent 40%), linear-gradient(120deg, #092044 0%, #143967 52%, #0d2b4f 100%);
	box-shadow: 0 16px 36px rgba(9, 26, 52, 0.26);
}

.mc-site-shell .mc-portal-head h2 {
	color: #eaf2ff !important;
	font-size: clamp(30px, 5vw, 46px);
	line-height: 1.08;
	margin-bottom: 8px;
	text-shadow: 0 1px 1px rgba(0, 0, 0, 0.2);
}

.mc-site-shell .mc-portal-head p {
	color: #d2dfef !important;
	font-size: clamp(17px, 2.1vw, 22px);
	line-height: 1.5;
}

.mc-site-shell .mc-portal-quick-nav {
	gap: 10px;
	margin-bottom: 16px;
}

.mc-site-shell .mc-portal-quick-nav a {
	background: #ffffff;
	padding: 9px 14px;
	font-size: 13px;
	letter-spacing: 0.2px;
	border-radius: 999px;
	box-shadow: 0 6px 14px rgba(17, 35, 58, 0.06);
}

.mc-site-shell .mc-dashboard-layout {
	gap: 14px;
	margin-bottom: 14px;
}

.mc-site-shell .mc-portal-card {
	border-radius: 16px;
	padding: 16px;
	box-shadow: 0 12px 26px rgba(11, 31, 55, 0.07);
}

.mc-site-shell .mc-market-grid {
	grid-template-columns: repeat(3, minmax(100px, 1fr));
}

.mc-site-shell .mc-market-item {
	border: 1px solid rgba(130, 174, 224, 0.24);
	box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.09);
}

.mc-site-shell .mc-market-item img {
	width: 20px;
	height: 20px;
	display: inline-block;
	margin-bottom: 8px;
}

.mc-site-shell .mc-market-item strong {
	font-size: 11px;
	letter-spacing: 0.5px;
}

.mc-site-shell .mc-market-item span {
	font-size: clamp(18px, 2vw, 23px);
}

.mc-site-shell .mc-kpi-grid {
	gap: 12px;
	margin-bottom: 14px;
}

.mc-site-shell .mc-kpi-card {
	min-height: 138px;
}

.mc-site-shell .mc-kpi-card h3 {
	color: #2d4765;
	font-size: 14px;
	text-transform: uppercase;
	letter-spacing: 0.45px;
}

.mc-site-shell .mc-portal-kpi {
	font-size: clamp(29px, 3vw, 38px);
}

.mc-site-shell .mc-portal-card--wide {
	margin-top: 14px;
}

.mc-site-shell .mc-form-stepper {
	padding: 14px;
}

.mc-site-shell .mc-step-dot {
	font-size: 12px;
	background: #ecf3fd;
}

.mc-site-shell .mc-step-dot.is-active {
	color: #06263f;
	background: linear-gradient(120deg, #11c5b4 0%, #0f87cc 100%);
	border-color: rgba(17, 197, 180, 0.9);
	box-shadow: 0 0 0 2px rgba(17, 197, 180, 0.25);
}

.mc-site-shell .mc-portal-form-grid label > span {
	color: #152a44;
	font-weight: 700;
	font-size: 13px;
}

.mc-site-shell .mc-portal-form-grid input,
.mc-site-shell .mc-portal-form-grid select,
.mc-site-shell .mc-portal-form-grid textarea,
.mc-site-shell .mc-portal input,
.mc-site-shell .mc-portal select,
.mc-site-shell .mc-portal textarea {
	color: #0f223a !important;
	background: #ffffff !important;
	border: 1px solid #c6d6ea !important;
	box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.mc-site-shell .mc-portal-form-grid input::placeholder,
.mc-site-shell .mc-portal input::placeholder,
.mc-site-shell .mc-portal textarea::placeholder {
	color: #8195af !important;
	opacity: 1 !important;
}

.mc-site-shell .mc-portal-form-grid input:focus,
.mc-site-shell .mc-portal-form-grid select:focus,
.mc-site-shell .mc-portal-form-grid textarea:focus,
.mc-site-shell .mc-portal input:focus,
.mc-site-shell .mc-portal select:focus,
.mc-site-shell .mc-portal textarea:focus {
	outline: none;
	border-color: #12a8ba !important;
	box-shadow: 0 0 0 3px rgba(17, 182, 173, 0.2) !important;
}

.mc-site-shell .mc-portal .button {
	min-height: 44px;
	border-radius: 12px;
}

.mc-site-shell .mc-account-layout {
	display: grid;
	grid-template-columns: 1.3fr 1fr;
	gap: 14px;
	margin-top: 14px;
}

.mc-site-shell .mc-account-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(140px, 1fr));
	gap: 12px;
}

.mc-site-shell .mc-account-grid small {
	display: block;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.5px;
	color: #5d738d;
	text-transform: uppercase;
	margin-bottom: 4px;
}

.mc-site-shell .mc-account-grid strong {
	color: #0f223a;
	font-size: 15px;
}

.mc-site-shell .mc-portal-table th,
.mc-site-shell .mc-portal-table td {
	color: #173250;
}

.mc-site-shell .mc-portal-feedback,
.mc-site-shell .mc-portal-muted {
	color: #566d88;
}

@media (max-width: 1120px) {
	.mc-site-shell .mc-account-layout {
		grid-template-columns: 1fr;
	}
}

@media (max-width: 780px) {
	.mc-site-shell .mc-portal-head h2 {
		font-size: clamp(25px, 8vw, 34px);
	}

	.mc-site-shell .mc-account-grid {
		grid-template-columns: 1fr;
	}
}

/* App shell layout */
.mc-site-shell .mc-portal-appshell {
	display: grid;
	grid-template-columns: 260px 1fr;
	gap: 14px;
}

.mc-site-shell .mc-portal-quick-nav {
	display: none;
}

.mc-site-shell .mc-portal-sidebar {
	background: linear-gradient(165deg, #071740 0%, #0f2b5a 100%);
	border: 1px solid rgba(117, 193, 182, 0.2);
	border-radius: 18px;
	padding: 12px;
	position: sticky;
	top: 84px;
	align-self: start;
	box-shadow: 0 12px 28px rgba(4, 7, 68, 0.28);
}

.mc-site-shell .mc-portal-sidebar-brand {
	display: block;
	background: #fff;
	border-radius: 12px;
	padding: 8px;
	border: 1px solid rgba(255, 255, 255, 0.3);
}

.mc-site-shell .mc-portal-sidebar-brand img {
	width: auto;
	max-width: 100%;
	max-height: 58px;
	height: auto;
	display: block;
	margin: 0 auto;
	object-fit: contain;
}

.mc-site-shell .mc-portal-sidebar-tagline {
	margin: 10px 2px 12px;
	color: #bfd3ed;
	font-size: 12px;
	line-height: 1.4;
}

.mc-site-shell .mc-portal-side-nav {
	display: grid;
	gap: 6px;
}

.mc-site-shell .mc-side-link {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	min-height: 38px;
	padding: 0 12px;
	border-radius: 10px;
	border: 1px solid rgba(255, 255, 255, 0.14);
	background: rgba(255, 255, 255, 0.03);
	color: #d4f8ff;
	font-size: 13px;
	font-weight: 800;
	text-decoration: none;
	background: rgba(17, 197, 180, 0.08);
}

.mc-site-shell .mc-side-link:hover {
	background: rgba(21, 197, 181, 0.2);
	color: #ffffff;
	border-color: rgba(17, 197, 180, 0.65);
}

.mc-site-shell .mc-side-link.is-active {
	background: linear-gradient(120deg, rgba(17, 197, 180, 0.35), rgba(15, 135, 204, 0.28));
	border-color: rgba(17, 197, 180, 0.8);
	color: #e8f8ff;
	box-shadow: 0 0 0 2px rgba(17, 197, 180, 0.18);
}

.mc-site-shell .mc-side-link-logout {
	border-color: rgba(251, 146, 146, 0.3);
	background: rgba(239, 68, 68, 0.1);
}

.mc-site-shell .mc-nav-icon {
	width: 20px;
	height: 20px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border-radius: 6px;
	background: rgba(17, 197, 180, 0.2);
}

.mc-site-shell .mc-nav-icon svg {
	width: 14px;
	height: 14px;
	stroke: #15cfc0;
	stroke-width: 1.7;
	fill: none;
	stroke-linecap: round;
	stroke-linejoin: round;
}

.mc-site-shell .mc-side-link.is-active .mc-nav-icon,
.mc-site-shell .mc-side-link:hover .mc-nav-icon {
	background: rgba(17, 197, 180, 0.24);
}

.mc-site-shell .mc-side-link.is-active .mc-nav-icon svg,
.mc-site-shell .mc-side-link:hover .mc-nav-icon svg {
	stroke: #26e3d3;
}

.mc-site-shell .mc-portal-main {
	min-width: 0;
}

.mc-site-shell .mc-portal-topbar {
	display: grid;
	grid-template-columns: 1fr 1fr auto;
	gap: 10px;
	padding: 12px;
	border: 1px solid var(--mc-p-border);
	border-radius: 14px;
	background: #fff;
	box-shadow: 0 8px 18px rgba(5, 18, 34, 0.06);
	margin-bottom: 12px;
}

.mc-site-shell .mc-portal-topbar strong {
	display: block;
	font-size: 11px;
	text-transform: uppercase;
	letter-spacing: 0.45px;
	color: var(--mc-p-muted);
}

.mc-site-shell .mc-portal-topbar p {
	margin: 3px 0 0;
	font-size: 20px;
	font-weight: 800;
	color: #0a2140;
}

.mc-site-shell .mc-portal-topbar-actions {
	display: flex;
	align-items: center;
	justify-content: flex-end;
}

@media (max-width: 1120px) {
	.mc-site-shell .mc-portal-appshell {
		grid-template-columns: 1fr;
	}

	.mc-site-shell .mc-portal-sidebar {
		display: none;
	}

	.mc-site-shell .mc-portal-quick-nav {
		display: flex;
	}
}

@media (max-width: 780px) {
	.mc-site-shell .mc-portal-topbar {
		grid-template-columns: 1fr;
	}
}

/* Portal v3: layout, chart, icons and guided flow refinements */
.mc-site-shell .mc-portal-topbar {
	grid-template-columns: minmax(260px, 1.2fr) minmax(220px, 1fr) auto;
	align-items: center;
}

.mc-site-shell .mc-topbar-balance {
	background: linear-gradient(120deg, #f8fffe 0%, #ecf8ff 100%);
	border: 1px solid rgba(62, 176, 170, 0.34);
	border-radius: 12px;
	padding: 10px 12px;
}

.mc-site-shell .mc-topbar-balance p {
	font-size: clamp(30px, 3.4vw, 44px);
	letter-spacing: -0.8px;
	line-height: 1;
	margin-top: 5px;
}

.mc-site-shell .mc-topbar-origin p {
	font-size: clamp(20px, 2.3vw, 28px);
}

.mc-site-shell .mc-topbar-meta {
	display: block;
	margin-top: 4px;
	font-size: 12px;
	color: #5a6f8b;
}

.mc-site-shell .mc-topbar-meta b {
	color: #103357;
}

.mc-site-shell .mc-limit-progress-meta {
	display: grid;
	grid-template-columns: repeat(3, minmax(140px, 1fr));
	gap: 10px;
	margin-top: 10px;
}

.mc-site-shell .mc-limit-progress-meta > div {
	border: 1px solid #d8e3f0;
	border-radius: 10px;
	background: #f8fbff;
	padding: 9px 10px;
}

.mc-site-shell .mc-limit-progress-meta small {
	display: block;
	font-size: 11px;
	letter-spacing: 0.4px;
	text-transform: uppercase;
	color: #62768f;
	font-weight: 700;
}

.mc-site-shell .mc-limit-progress-meta strong {
	display: block;
	margin-top: 3px;
	font-size: 17px;
	color: #0e2a4b;
}

.mc-site-shell .mc-limit-progress-meta span {
	display: block;
	font-size: 12px;
	color: #5b708a;
}

.mc-site-shell .mc-usage-chart-canvas {
	width: 100% !important;
	height: 200px !important;
	border: 1px solid #d7e4f3;
	border-radius: 12px;
	background: linear-gradient(180deg, #ffffff 0%, #f2f8ff 100%);
}

.mc-site-shell .mc-chart-legends {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	align-items: center;
}

.mc-site-shell .mc-chart-legends span {
	display: inline-flex;
	align-items: center;
	gap: 6px;
}

.mc-site-shell .mc-legend-dot {
	width: 10px;
	height: 10px;
	border-radius: 999px;
	display: inline-block;
}

.mc-site-shell .mc-legend-dot--deposit {
	background: #3eb0aa;
}

.mc-site-shell .mc-legend-dot--withdraw {
	background: #f59e0b;
}

.mc-site-shell .mc-legend-dot--net {
	background: #2d7fcd;
}

.mc-site-shell .mc-market-network {
	display: grid;
	grid-template-columns: repeat(3, minmax(90px, 1fr));
	gap: 8px;
	margin-top: 9px;
}

.mc-site-shell .mc-market-network div {
	border: 1px solid rgba(117, 193, 182, 0.28);
	border-radius: 10px;
	background: #f6fcff;
	padding: 8px;
}

.mc-site-shell .mc-market-network small {
	display: block;
	font-size: 11px;
	color: #5e7490;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.35px;
}

.mc-site-shell .mc-market-network strong {
	display: block;
	margin-top: 3px;
	font-size: 15px;
	color: #0d2e57;
}

.mc-site-shell .mc-actions-grid {
	grid-template-columns: 1fr;
}

.mc-site-shell .mc-action-step {
	display: grid;
	grid-template-columns: 34px 1fr;
	gap: 10px;
	align-items: start;
	text-decoration: none;
	padding: 10px;
	border: 1px solid #d8e4f2;
	border-radius: 12px;
	background: #f9fcff;
	color: #16365a;
	transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.mc-site-shell .mc-action-step:hover {
	transform: translateY(-1px);
	border-color: #9bcceb;
	box-shadow: 0 8px 16px rgba(16, 40, 64, 0.08);
}

.mc-site-shell .mc-action-step.is-active {
	border-color: rgba(62, 176, 170, 0.58);
	background: linear-gradient(120deg, #f3fffd 0%, #edf8ff 100%);
	box-shadow: 0 0 0 2px rgba(62, 176, 170, 0.2);
	animation: mcFlowPulse 1.5s ease-in-out infinite;
}

.mc-site-shell .mc-action-step.is-complete {
	border-color: rgba(45, 127, 205, 0.48);
	background: linear-gradient(120deg, #edf6ff 0%, #f5fbff 100%);
}

.mc-site-shell .mc-action-step.is-locked {
	opacity: 0.78;
	border-style: dashed;
}

.mc-site-shell .mc-action-step small {
	display: block;
	font-size: 11px;
	text-transform: uppercase;
	letter-spacing: 0.45px;
	color: #5d738d;
	font-weight: 700;
}

.mc-site-shell .mc-action-step strong {
	display: block;
	font-size: 16px;
	color: #0c2a4c;
	margin: 1px 0 2px;
}

.mc-site-shell .mc-action-step p {
	margin: 0;
	font-size: 13px;
	color: #506781;
}

.mc-site-shell .mc-action-icon {
	width: 34px;
	height: 34px;
	border-radius: 10px;
	background: linear-gradient(130deg, rgba(62, 176, 170, 0.28), rgba(45, 127, 205, 0.28));
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex: 0 0 34px;
}

.mc-site-shell .mc-action-icon svg {
	width: 16px !important;
	height: 16px !important;
	max-width: 16px !important;
	max-height: 16px !important;
	fill: none !important;
	stroke: #0d2f56 !important;
	stroke-width: 1.7 !important;
	stroke-linecap: round;
	stroke-linejoin: round;
}

.mc-site-shell .mc-flow-complete-cta {
	margin-top: 10px;
	padding: 10px 12px;
	border-radius: 12px;
	border: 1px solid rgba(62, 176, 170, 0.36);
	background: linear-gradient(120deg, #ebfffb 0%, #f1f9ff 100%);
}

.mc-site-shell .mc-flow-complete-cta strong {
	display: block;
	color: #0d2e52;
}

.mc-site-shell .mc-flow-complete-cta p {
	margin: 4px 0 10px;
	color: #526a84;
}

.mc-site-shell .mc-kpi-help {
	display: block;
	margin-top: 6px;
	font-size: 12px;
	color: #5b6f89;
	line-height: 1.35;
}

.mc-site-shell .mc-portal-kpi {
	line-height: 1.05;
	white-space: nowrap;
	font-variant-numeric: tabular-nums;
	font-size: clamp(30px, 3.1vw, 44px);
}

.mc-site-shell .mc-nav-icon svg,
.mc-site-shell .mc-widget-icon svg,
.mc-site-shell .mc-kpi-icon svg,
.mc-site-shell .mc-feature-icon svg {
	display: inline-block !important;
	width: 18px !important;
	height: 18px !important;
	max-width: 18px !important;
	max-height: 18px !important;
}

.mc-site-shell .mc-nav-icon svg,
.mc-site-shell .mc-widget-icon svg,
.mc-site-shell .mc-kpi-icon svg,
.mc-site-shell .mc-feature-icon svg {
	fill: none !important;
	stroke-linecap: round;
	stroke-linejoin: round;
}

.mc-site-shell .mc-market-item img {
	width: 22px !important;
	height: 22px !important;
	max-width: 22px !important;
	max-height: 22px !important;
}

.mc-site-shell .mc-portal .mc-nav-icon svg path,
.mc-site-shell .mc-portal .mc-widget-icon svg path,
.mc-site-shell .mc-portal .mc-kpi-icon svg path,
.mc-site-shell .mc-portal .mc-action-icon svg path,
.mc-site-shell .mc-portal .mc-nav-icon svg line,
.mc-site-shell .mc-portal .mc-widget-icon svg line,
.mc-site-shell .mc-portal .mc-kpi-icon svg line,
.mc-site-shell .mc-portal .mc-action-icon svg line,
.mc-site-shell .mc-portal .mc-nav-icon svg polyline,
.mc-site-shell .mc-portal .mc-widget-icon svg polyline,
.mc-site-shell .mc-portal .mc-kpi-icon svg polyline,
.mc-site-shell .mc-portal .mc-action-icon svg polyline,
.mc-site-shell .mc-portal .mc-nav-icon svg polygon,
.mc-site-shell .mc-portal .mc-widget-icon svg polygon,
.mc-site-shell .mc-portal .mc-kpi-icon svg polygon,
.mc-site-shell .mc-portal .mc-action-icon svg polygon,
.mc-site-shell .mc-portal .mc-nav-icon svg circle,
.mc-site-shell .mc-portal .mc-widget-icon svg circle,
.mc-site-shell .mc-portal .mc-kpi-icon svg circle,
.mc-site-shell .mc-portal .mc-action-icon svg circle,
.mc-site-shell .mc-portal .mc-nav-icon svg rect,
.mc-site-shell .mc-portal .mc-widget-icon svg rect,
.mc-site-shell .mc-portal .mc-kpi-icon svg rect,
.mc-site-shell .mc-portal .mc-action-icon svg rect {
	fill: none !important;
	stroke: currentColor !important;
	stroke-width: 1.75 !important;
	stroke-linecap: round !important;
	stroke-linejoin: round !important;
}

.mc-site-shell .mc-portal .mc-nav-icon svg,
.mc-site-shell .mc-portal .mc-widget-icon svg,
.mc-site-shell .mc-portal .mc-kpi-icon svg,
.mc-site-shell .mc-portal .mc-action-icon svg {
	color: #0d2f56;
}

.mc-site-shell .mc-nav-icon,
.mc-site-shell .mc-widget-icon,
.mc-site-shell .mc-kpi-icon,
.mc-site-shell .mc-action-icon,
.mc-site-shell .mc-feature-icon {
	overflow: hidden;
}

@media (max-width: 1020px) {
	.mc-site-shell .mc-portal-topbar {
		grid-template-columns: 1fr;
	}

	.mc-site-shell .mc-limit-progress-meta {
		grid-template-columns: 1fr;
	}
}

@keyframes mcFlowPulse {
	0% {
		box-shadow: 0 0 0 0 rgba(62, 176, 170, 0.24);
	}
	70% {
		box-shadow: 0 0 0 8px rgba(62, 176, 170, 0);
	}
	100% {
		box-shadow: 0 0 0 0 rgba(62, 176, 170, 0);
	}
}

/* Hotfix: sidebar icon contrast + guided flow 1:3 + numeric readability */
.mc-site-shell .mc-portal-sidebar .mc-nav-icon {
	background: rgba(17, 197, 180, 0.2) !important;
}

.mc-site-shell .mc-portal-sidebar .mc-nav-icon svg {
	color: #2de7d7 !important;
	stroke: #2de7d7 !important;
}

.mc-site-shell .mc-portal-sidebar .mc-side-link:hover .mc-nav-icon svg,
.mc-site-shell .mc-portal-sidebar .mc-side-link.is-active .mc-nav-icon svg {
	color: #78f7ea !important;
	stroke: #78f7ea !important;
}

.mc-site-shell .mc-actions-grid {
	grid-template-columns: minmax(190px, 1fr) minmax(0, 3fr) !important;
	grid-auto-rows: minmax(88px, auto);
	align-items: stretch;
}

.mc-site-shell .mc-actions-grid > .mc-action-step:first-child {
	grid-column: 1;
	grid-row: 1 / span 3;
	align-content: center;
}

.mc-site-shell .mc-actions-grid > .mc-action-step:nth-child(n+2) {
	grid-column: 2;
}

.mc-site-shell .mc-market-item span,
.mc-site-shell .mc-market-network strong,
.mc-site-shell .mc-portal-kpi,
.mc-site-shell [data-quote-updated] {
	font-variant-numeric: tabular-nums;
}

.mc-site-shell .mc-market-grid {
	grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
}

.mc-site-shell .mc-market-item span {
	font-size: clamp(20px, 2.1vw, 36px) !important;
	line-height: 1.08;
	letter-spacing: -0.3px;
	display: block;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.mc-site-shell [data-quote-updated] {
	display: block;
	text-align: right;
	font-size: 12px;
	line-height: 1.35;
	word-break: break-word;
}

.mc-site-shell .mc-market-spark {
	display: block;
	width: 100%;
	height: 28px;
	margin-top: 6px;
	border-radius: 7px;
	background: linear-gradient(180deg, rgba(21, 197, 181, 0.12), rgba(255, 255, 255, 0));
}

.mc-site-shell .mc-market-network div .mc-market-spark {
	height: 24px;
}

@media (max-width: 1020px) {
	.mc-site-shell .mc-actions-grid {
		grid-template-columns: 1fr !important;
		grid-auto-rows: auto;
	}

	.mc-site-shell .mc-actions-grid > .mc-action-step:first-child,
	.mc-site-shell .mc-actions-grid > .mc-action-step:nth-child(n+2) {
		grid-column: auto;
		grid-row: auto;
	}
}

.mc-site-shell [data-section="profile"] .mc-form-stepper,
.mc-site-shell [data-section="withdraw"] .mc-form-stepper {
	border-color: #c8dff3;
	background: linear-gradient(168deg, #f9fcff 0%, #edf5ff 100%);
	box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9), 0 10px 22px rgba(13, 39, 67, 0.07);
}

.mc-site-shell [data-section="profile"] .mc-step-dot,
.mc-site-shell [data-section="withdraw"] .mc-step-dot {
	background: #e9f2ff;
	border-color: #c7d9ee;
	color: #2a4c6f;
}

.mc-site-shell [data-section="profile"] .mc-step-dot.is-active,
.mc-site-shell [data-section="withdraw"] .mc-step-dot.is-active {
	color: #03273f;
	background: linear-gradient(120deg, #13c8b5 0%, #0f89cf 100%);
	border-color: rgba(14, 140, 198, 0.78);
	box-shadow: 0 0 0 2px rgba(17, 197, 180, 0.24);
}

.mc-site-shell [data-section="profile"] .mc-portal-form-grid,
.mc-site-shell [data-section="withdraw"] .mc-portal-form-grid {
	gap: 12px;
}

.mc-site-shell [data-section="withdraw"] .mc-portal-form select[name="payout_method"] {
	background: #f4f9ff;
	border-color: #bfd6ee;
	font-weight: 700;
	color: #113250;
}

.mc-site-shell [data-section="withdraw"] [data-withdraw-address-group],
.mc-site-shell [data-section="withdraw"] [data-withdraw-pix-group] {
	padding: 12px;
	border-radius: 12px;
	border: 1px solid #c8dcf0;
	background: linear-gradient(160deg, #ffffff 0%, #f3f9ff 100%);
	box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.86);
}

.mc-site-shell [data-section="withdraw"] [data-withdraw-address-group][hidden],
.mc-site-shell [data-section="withdraw"] [data-withdraw-pix-group][hidden] {
	display: none !important;
}

.mc-site-shell [data-section="withdraw"] .mc-portal-muted {
	padding: 10px 12px;
	border-radius: 10px;
	border: 1px solid #cfe2f6;
	background: #f1f7ff;
	color: #3f5f82;
}

.mc-site-shell [data-section="withdraw"] .mc-portal-quote {
	border: 1px solid #c8ddf2;
	background: linear-gradient(120deg, #f8fcff 0%, #edf5ff 100%);
	border-radius: 12px;
	color: #163451;
	font-weight: 600;
}

.mc-site-shell [data-section="withdraw"] [data-withdraw-feedback] {
	font-weight: 600;
	color: #24496d;
}

.mc-site-shell [data-section="profile"] .mc-readonly input,
.mc-site-shell [data-section="withdraw"] .mc-readonly input {
	background: #eef4fb;
	color: #385675;
}

@media (max-width: 920px) {
	.mc-site-shell [data-section="profile"] .mc-form-stepper,
	.mc-site-shell [data-section="withdraw"] .mc-form-stepper {
		padding: 12px;
	}

	.mc-site-shell [data-section="withdraw"] [data-withdraw-address-group],
	.mc-site-shell [data-section="withdraw"] [data-withdraw-pix-group] {
		padding: 10px;
	}
}

@media (max-width: 780px) {
	.mc-site-shell .mc-market-item span {
		font-size: clamp(16px, 6.8vw, 28px) !important;
	}
}

/* Dashboard UX refinement: keep market readable and move guided actions below */
.mc-site-shell .mc-dashboard-layout {
	grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr);
	grid-auto-rows: auto;
	align-items: stretch;
}

.mc-site-shell .mc-dashboard-layout > .mc-chart-card {
	grid-column: 1;
	grid-row: 1;
}

.mc-site-shell .mc-dashboard-layout > .mc-market-card {
	grid-column: 2;
	grid-row: 1;
}

.mc-site-shell .mc-dashboard-layout > .mc-actions-card {
	grid-column: 1 / -1;
	grid-row: 2;
}

.mc-site-shell .mc-dashboard-layout > .mc-actions-card .mc-actions-grid {
	grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
	grid-auto-rows: minmax(80px, auto);
	gap: 8px;
}

.mc-site-shell .mc-dashboard-layout > .mc-actions-card .mc-actions-grid > .mc-action-step:first-child,
.mc-site-shell .mc-dashboard-layout > .mc-actions-card .mc-actions-grid > .mc-action-step:nth-child(n+2) {
	grid-column: auto !important;
	grid-row: auto !important;
}

.mc-site-shell .mc-dashboard-layout > .mc-actions-card .mc-action-step {
	padding: 8px;
	grid-template-columns: 30px 1fr;
	gap: 8px;
}

.mc-site-shell .mc-dashboard-layout > .mc-actions-card .mc-action-step strong {
	font-size: 15px;
}

.mc-site-shell .mc-dashboard-layout > .mc-actions-card .mc-action-step p {
	font-size: 12px;
	line-height: 1.35;
}

.mc-site-shell .mc-dashboard-layout > .mc-actions-card .mc-action-icon {
	width: 30px;
	height: 30px;
	border-radius: 9px;
}

.mc-site-shell .mc-dashboard-layout > .mc-actions-card .mc-action-icon svg {
	width: 14px !important;
	height: 14px !important;
	max-width: 14px !important;
	max-height: 14px !important;
}

.mc-site-shell .mc-market-item img {
	width: 18px;
	height: 18px;
	margin-bottom: 6px;
}

.mc-site-shell .mc-market-item strong {
	font-size: 10px;
	letter-spacing: 0.45px;
}

.mc-site-shell .mc-market-item span {
	font-size: clamp(17px, 1.7vw, 24px) !important;
	overflow: visible;
	text-overflow: clip;
}

.mc-site-shell .mc-kpi-icon {
	width: 24px;
	height: 24px;
	border-radius: 8px;
}

.mc-site-shell .mc-kpi-icon svg {
	width: 14px;
	height: 14px;
}

.mc-site-shell .mc-kpi-card {
	padding-top: 40px;
}

@media (max-width: 1240px) {
	.mc-site-shell .mc-dashboard-layout {
		grid-template-columns: 1fr;
	}

	.mc-site-shell .mc-dashboard-layout > .mc-chart-card,
	.mc-site-shell .mc-dashboard-layout > .mc-market-card,
	.mc-site-shell .mc-dashboard-layout > .mc-actions-card {
		grid-column: 1;
		grid-row: auto;
	}
}

@media (max-width: 860px) {
	.mc-site-shell .mc-dashboard-layout > .mc-actions-card .mc-actions-grid {
		grid-template-columns: 1fr !important;
	}
}

/* Hard override from screenshot: dashboard top = chart+market, guided actions below */
body.mc-managed-page .mc-site-shell .mc-dashboard-layout[data-section="dashboard"] {
	display: grid !important;
	grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr) !important;
	grid-auto-rows: auto !important;
	gap: 14px !important;
	align-items: stretch !important;
}

body.mc-managed-page .mc-site-shell .mc-dashboard-layout[data-section="dashboard"] > .mc-chart-card {
	grid-column: 1 !important;
	grid-row: 1 !important;
}

body.mc-managed-page .mc-site-shell .mc-dashboard-layout[data-section="dashboard"] > .mc-market-card {
	grid-column: 2 !important;
	grid-row: 1 !important;
}

body.mc-managed-page .mc-site-shell .mc-dashboard-layout[data-section="dashboard"] > .mc-actions-card {
	grid-column: 1 / -1 !important;
	grid-row: 2 !important;
}

body.mc-managed-page .mc-site-shell .mc-dashboard-layout[data-section="dashboard"] > .mc-actions-card .mc-actions-grid {
	grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
	grid-auto-rows: minmax(80px, auto) !important;
	gap: 8px !important;
}

body.mc-managed-page .mc-site-shell .mc-dashboard-layout[data-section="dashboard"] > .mc-actions-card .mc-actions-grid > .mc-action-step:first-child,
body.mc-managed-page .mc-site-shell .mc-dashboard-layout[data-section="dashboard"] > .mc-actions-card .mc-actions-grid > .mc-action-step:nth-child(n+2) {
	grid-column: auto !important;
	grid-row: auto !important;
}

body.mc-managed-page .mc-site-shell .mc-dashboard-layout[data-section="dashboard"] > .mc-actions-card .mc-action-step {
	padding: 8px !important;
	grid-template-columns: 30px 1fr !important;
	gap: 8px !important;
}

body.mc-managed-page .mc-site-shell .mc-dashboard-layout[data-section="dashboard"] > .mc-actions-card .mc-action-step strong {
	font-size: 15px !important;
}

body.mc-managed-page .mc-site-shell .mc-dashboard-layout[data-section="dashboard"] > .mc-actions-card .mc-action-step p {
	font-size: 12px !important;
	line-height: 1.35 !important;
}

body.mc-managed-page .mc-site-shell .mc-dashboard-layout[data-section="dashboard"] > .mc-actions-card .mc-action-icon {
	width: 30px !important;
	height: 30px !important;
	border-radius: 9px !important;
}

body.mc-managed-page .mc-site-shell .mc-dashboard-layout[data-section="dashboard"] > .mc-actions-card .mc-action-icon svg {
	width: 14px !important;
	height: 14px !important;
	max-width: 14px !important;
	max-height: 14px !important;
}

@media (max-width: 1240px) {
	body.mc-managed-page .mc-site-shell .mc-dashboard-layout[data-section="dashboard"] {
		grid-template-columns: 1fr !important;
	}

	body.mc-managed-page .mc-site-shell .mc-dashboard-layout[data-section="dashboard"] > .mc-chart-card,
	body.mc-managed-page .mc-site-shell .mc-dashboard-layout[data-section="dashboard"] > .mc-market-card,
	body.mc-managed-page .mc-site-shell .mc-dashboard-layout[data-section="dashboard"] > .mc-actions-card {
		grid-column: 1 !important;
		grid-row: auto !important;
	}
}

@media (max-width: 860px) {
	body.mc-managed-page .mc-site-shell .mc-dashboard-layout[data-section="dashboard"] > .mc-actions-card .mc-actions-grid {
		grid-template-columns: 1fr !important;
	}
}

/* Safety fix: ensure dashboard top layout is never accidentally hidden */
.mc-site-shell .mc-dashboard-layout[data-section="dashboard"],
.mc-site-shell .mc-dashboard-layout[data-section="dashboard"][hidden],
body.mc-managed-page .mc-site-shell .mc-dashboard-layout[data-section="dashboard"],
body.mc-managed-page .mc-site-shell .mc-dashboard-layout[data-section="dashboard"][hidden] {
	display: grid !important;
	visibility: visible !important;
	opacity: 1 !important;
}

.mc-site-shell .mc-dashboard-layout[data-section="dashboard"] > .mc-chart-card,
.mc-site-shell .mc-dashboard-layout[data-section="dashboard"] > .mc-market-card,
.mc-site-shell .mc-dashboard-layout[data-section="dashboard"] > .mc-actions-card {
	display: block !important;
}

/* Widget numbers hardfix: keep values inside cards */
body.mc-managed-page .mc-site-shell .mc-widget-card strong {
	font-size: clamp(34px, 3.2vw, 52px) !important;
	line-height: 1.04 !important;
	letter-spacing: -0.4px !important;
	white-space: nowrap !important;
	overflow: hidden !important;
	text-overflow: ellipsis !important;
}

body.mc-managed-page .mc-site-shell .mc-portal-kpi,
body.mc-managed-page .mc-site-shell .mc-kpi-card .mc-portal-kpi {
	font-size: clamp(34px, 2.8vw, 52px) !important;
	line-height: 1.02 !important;
	letter-spacing: -0.6px !important;
	white-space: nowrap !important;
	overflow: visible !important;
	text-overflow: clip !important;
}

body.mc-managed-page .mc-site-shell .mc-market-item span {
	font-size: clamp(18px, 1.55vw, 24px) !important;
	line-height: 1.1 !important;
	white-space: normal !important;
	overflow-wrap: anywhere !important;
	word-break: break-word !important;
	max-width: 100%;
	display: block;
}

body.mc-managed-page .mc-site-shell .mc-market-network strong {
	font-size: clamp(13px, 1.08vw, 17px) !important;
	line-height: 1.12 !important;
	white-space: normal !important;
	overflow: visible !important;
	text-overflow: clip !important;
	word-break: break-word !important;
}

body.mc-managed-page .mc-site-shell .mc-market-network div {
	min-width: 0;
}

@media (max-width: 1200px) {
	body.mc-managed-page .mc-site-shell .mc-portal-kpi,
	body.mc-managed-page .mc-site-shell .mc-kpi-card .mc-portal-kpi {
		font-size: clamp(30px, 4.2vw, 46px) !important;
	}

	body.mc-managed-page .mc-site-shell .mc-market-item span {
		font-size: clamp(18px, 2.8vw, 25px) !important;
	}
}

@media (max-width: 900px) {
	body.mc-managed-page .mc-site-shell .mc-widget-card strong {
		font-size: clamp(24px, 7vw, 34px) !important;
	}

	body.mc-managed-page .mc-site-shell .mc-portal-kpi,
	body.mc-managed-page .mc-site-shell .mc-kpi-card .mc-portal-kpi {
		font-size: clamp(26px, 7.4vw, 38px) !important;
	}
}

/* Emergency numeric readability reset: no clipping/ellipsis on financial values */
body.mc-managed-page .mc-site-shell [data-balance-total],
body.mc-managed-page .mc-site-shell [data-balance-available],
body.mc-managed-page .mc-site-shell [data-balance-held],
body.mc-managed-page .mc-site-shell [data-origin-woocommerce],
body.mc-managed-page .mc-site-shell [data-origin-api],
body.mc-managed-page .mc-site-shell [data-origin-manual-link],
body.mc-managed-page .mc-site-shell [data-origin-admin],
body.mc-managed-page .mc-site-shell [data-quote-depx],
body.mc-managed-page .mc-site-shell [data-quote-usdt],
body.mc-managed-page .mc-site-shell [data-quote-btc],
body.mc-managed-page .mc-site-shell [data-liquid-tip],
body.mc-managed-page .mc-site-shell [data-liquid-mempool],
body.mc-managed-page .mc-site-shell [data-depix-issued] {
	overflow: visible !important;
	text-overflow: clip !important;
	white-space: normal !important;
	overflow-wrap: anywhere !important;
	word-break: break-word !important;
	max-width: 100% !important;
}

body.mc-managed-page .mc-site-shell .mc-market-grid {
	grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
	gap: 6px !important;
}

body.mc-managed-page .mc-site-shell .mc-market-item {
	padding: 8px !important;
	min-width: 0;
}

body.mc-managed-page .mc-site-shell .mc-market-network {
	grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
	gap: 6px !important;
}

body.mc-managed-page .mc-site-shell .mc-market-network div {
	padding: 7px !important;
	min-width: 0;
}

@media (max-width: 1280px) {
	body.mc-managed-page .mc-site-shell .mc-market-item span {
		font-size: clamp(16px, 1.4vw, 20px) !important;
	}

	body.mc-managed-page .mc-site-shell .mc-market-network strong {
		font-size: clamp(12px, 1vw, 15px) !important;
	}
}

@media (max-width: 980px) {
	body.mc-managed-page .mc-site-shell .mc-market-grid,
	body.mc-managed-page .mc-site-shell .mc-market-network {
		grid-template-columns: 1fr !important;
	}
}

/* KPI/icon overlap hotfix: preserve spacing and readability */
.mc-site-shell .mc-kpi-card .mc-kpi-icon {
	top: 11px;
	left: 11px;
	width: 20px;
	height: 20px;
	border-radius: 7px;
}

.mc-site-shell .mc-kpi-card .mc-kpi-icon svg {
	width: 12px;
	height: 12px;
}

.mc-site-shell .mc-kpi-card h3 {
	padding-left: 30px;
	min-height: 20px;
	line-height: 1.2;
}

.mc-site-shell .mc-kpi-card .mc-portal-kpi,
.mc-site-shell .mc-kpi-card .mc-kpi-help {
	margin-left: 0;
}

.mc-site-shell .mc-widget-icon {
	width: 30px;
	height: 30px;
	border-radius: 9px;
	flex: 0 0 30px;
}

.mc-site-shell .mc-widget-icon svg {
	width: 14px;
	height: 14px;
}

.mc-site-shell .mc-portal-sidebar .mc-nav-icon {
	width: 30px;
	height: 30px;
	border-radius: 9px;
}

.mc-site-shell .mc-portal-sidebar .mc-nav-icon svg {
	width: 15px;
	height: 15px;
}
