/* Results */
.depol-mr-app .res-wrap-view {
	--depol-mr-stats-grid-gap: 1.25rem;
	--depol-mr-stats-block-gap: 1.5rem;
	--depol-mr-stats-section-gap: 2.5rem;
	--depol-mr-stats-title-gap: 1.25rem;
	padding-top: 2.5rem;
	padding-bottom: 2.5rem;
}

.depol-mr-app .res-top {
	background: linear-gradient(155deg, var(--navy) 0%, var(--navy2) 100%);
	border-radius: var(--radius-xl);
	padding: 2rem;
	margin-bottom: var(--depol-mr-stats-section-gap);
	box-shadow: var(--shadow-md);
}

.depol-mr-app .res-top .depol-mr-results-kicker {
	font-size: 12px;
	font-weight: 800;
	letter-spacing: 3px;
	text-transform: uppercase;
	color: var(--gold);
	margin-bottom: 4px;
}

.depol-mr-app .res-top h2 {
	font-size: clamp(1.3rem, 3vw, 1.9rem);
	color: #fff;
	margin-bottom: 0;
	line-height: 1.15;
	font-weight: 900;
}

.depol-mr-app .res-top .depol-mr-results-consulted {
	margin: 0;
	line-height: 1.2;
}

.depol-mr-app .res-top .depol-mr-results-consulted__time,
.depol-mr-app .res-top .depol-mr-results-subtitle {
	font-size: 0.8rem;
	color: rgba(255, 255, 255, 0.75);
}

.depol-mr-app .depol-mr-results-kpi-grid,
.depol-mr-app .depol-mr-results-kpi-grid--nota-pct {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: var(--depol-mr-stats-grid-gap);
	margin-bottom: var(--depol-mr-stats-section-gap);
}

.depol-mr-app .depol-mr-results-kpi-grid--nota-pct {
	grid-template-columns: repeat(2, minmax(9rem, 1fr)) minmax(0, 2fr);
	align-items: stretch;
}

.depol-mr-app .depol-mr-results-kpi-grid--nota-pct.depol-mr-results-kpi-grid--solo-nota {
	grid-template-columns: minmax(9rem, 1fr) minmax(0, 2fr);
}

.depol-mr-app .depol-mr-results-kpi-grid--nota-pct .depol-mr-kpi,
.depol-mr-app .depol-mr-results-kpi-grid--nota-pct .pct-card {
	border-radius: var(--radius-xl);
}

.depol-mr-app .depol-mr-results-kpi-grid--nota-pct.depol-mr-results-kpi-grid--has-idioma {
	grid-template-columns: repeat(3, minmax(9rem, 1fr));
}

.depol-mr-app .depol-mr-results-kpi-grid--nota-pct .depol-mr-kpi--brand {
	display: flex;
	flex-direction: column;
	justify-content: center;
}

.depol-mr-app .depol-mr-results-kpi--teoria,
.depol-mr-app .depol-mr-results-kpi--idioma {
	display: flex;
	flex-direction: column;
	justify-content: center;
}

.depol-mr-app .depol-mr-results-kpi--teoria .depol-mr-kpi__value,
.depol-mr-app .depol-mr-results-kpi--idioma .depol-mr-kpi__value {
	font-size: 3.625rem;
	font-weight: 900;
}

.depol-mr-app .depol-mr-results-kpi-grid--nota-pct .pct-card {
	margin-bottom: 0;
	min-height: 100%;
}

.depol-mr-app .depol-mr-results-kpi-grid--nota-pct.depol-mr-results-kpi-grid--has-idioma .pct-card {
	grid-column: 1 / -1;
}

.depol-mr-app .rank-ban {
	background: #fff;
	border: 1px solid var(--border);
	border-radius: var(--radius-xl);
	padding: 1.25rem 1.5rem;
	display: flex;
	align-items: center;
	gap: 1.5rem;
	margin-bottom: var(--depol-mr-stats-section-gap);
	flex-wrap: nowrap;
	box-shadow: var(--shadow-sm);
	position: relative;
}

.depol-mr-app .depol-mr-rank-summary__number {
	font-weight: 900;
	font-size: 50px;
	line-height: 1;
	color: var(--navy);
	min-width: 80px;
	text-align: center;
}

.depol-mr-app .depol-mr-rank-summary__number small {
	display: block;
	font-size: 11px;
	letter-spacing: 2px;
	text-transform: uppercase;
	color: var(--textsub);
	margin-top: 4px;
}

.depol-mr-app .depol-mr-rank-summary__body {
	flex: 1;
	min-width: 0;
	text-align: left;
}

.depol-mr-app .depol-mr-rank-summary__body h4,
.depol-mr-app .rank-ban-title {
	font-size: 0.85rem;
	color: var(--navy);
	margin: 1rem 0 6px;
	letter-spacing: 1px;
	line-height: 1.3;
}

.depol-mr-app .rank-ban-title-label {
	font-weight: 600;
	text-transform: uppercase;
}

.depol-mr-app .metric-badge-corner {
	position: absolute;
	top: 0.65rem;
	right: 0.75rem;
	z-index: 2;
}

.depol-mr-app .pct-card .metric-badge-corner {
	top: 0.7rem;
	right: 0.85rem;
}

.depol-mr-app .depol-mr-rank-summary__body p {
	margin: 0;
	font-size: var(--depol-mr-ui-font-size);
	color: var(--textsub);
	text-transform: none;
	letter-spacing: 0;
	font-weight: 400;
}

.depol-mr-app .rank-provisional-note {
	margin-top: 0.55rem;
	padding: 0.5rem 0.65rem;
	border-radius: 8px;
	border: 1px solid rgba(250, 170, 40, 0.45);
	background: rgba(250, 170, 40, 0.15);
	color: #7a5600;
	font-size: 0.8rem;
	font-weight: 600;
	line-height: 1.35;
}

.depol-mr-app .pct-card {
	background: linear-gradient(135deg, var(--navy2) 0%, var(--navy) 100%);
	border-radius: var(--radius-xl);
	padding: 1.35rem 1.75rem;
	margin-bottom: var(--depol-mr-stats-section-gap);
	display: flex;
	align-items: center;
	gap: 1.75rem;
	flex-wrap: nowrap;
	box-shadow: var(--shadow-md);
	position: relative;
}

.depol-mr-app .pct-num {
	font-weight: 900;
	font-size: 4rem;
	line-height: 1;
	color: #fff;
	flex: 0 0 auto;
	min-width: 80px;
	display: flex;
	align-items: center;
	justify-content: center;
	align-self: center;
}

.depol-mr-app .pct-body {
	flex: 1;
	min-width: 0;
	width: 100%;
	display: flex;
	flex-direction: column;
	justify-content: center;
	gap: 0.35rem;
}

.depol-mr-app .pct-title {
	color: rgba(255, 255, 255);
	font-size: 0.85rem;
	margin: 0;
	letter-spacing: 1px;
	line-height: 1.3;
}

.depol-mr-app .pct-title-label {
	font-weight: 600;
	text-transform: uppercase;
}

.depol-mr-app .pct-provisional-badge {
	display: inline-block;
	font-size: 0.55rem;
	font-weight: 700;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: #3a2800;
	background: rgba(255, 196, 80, 0.96);
	border-radius: 999px;
	padding: 0.12rem 0.5rem;
	line-height: 1.35;
	white-space: nowrap;
}

.depol-mr-app .rank-provisional-badge {
	display: inline-block;
	font-size: 0.58rem;
	font-weight: 700;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: #7a5600;
	background: rgba(250, 170, 40, 0.22);
	border: 1px solid rgba(250, 170, 40, 0.45);
	border-radius: 999px;
	padding: 0.14rem 0.55rem;
	line-height: 1.35;
	white-space: nowrap;
}

.depol-mr-app .depol-mr-kpi__head .rank-provisional-badge {
	font-size: 0.55rem;
	padding: 0.12rem 0.5rem;
}

.depol-mr-app .pct-msg {
	color: rgba(255, 255, 255, 0.92);
	font-size: var(--depol-mr-ui-font-size);
	margin-bottom: 0.25rem;
	text-transform: none;
	letter-spacing: 0;
	font-weight: 400;
	line-height: 1.35;
}

.depol-mr-app .pct-msg:empty {
	display: none;
}

.depol-mr-app .pct-track {
	height: 8px;
	width: 100%;
	flex: 0 0 auto;
	background: rgba(255, 255, 255, 0.12);
	border-radius: 4px;
	overflow: hidden;
}

.depol-mr-app .pct-fill {
	height: 100%;
	background: linear-gradient(90deg, var(--gold), var(--gold2));
	width: 0;
	transition: width 1.4s ease;
}

.depol-mr-app .depol-mr-results-kpi {
	padding: 1.1rem 1rem;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	min-height: 100%;
}

.depol-mr-app .depol-mr-results-kpi .depol-mr-kpi__label {
	margin-bottom: 0;
	width: 100%;
	text-align: center;
	line-height: 1.25;
}

.depol-mr-app .st-title {
	display: inline-flex;
	align-items: center;
	font-weight: 800;
	font-size: var(--depol-mr-ui-font-size);
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--navy);
	background: rgba(var(--navy-rgb), 0.06);
	border-radius: var(--radius-pill);
	padding: 0.45rem 0.85rem;
	margin: var(--depol-mr-stats-section-gap) 0 var(--depol-mr-stats-title-gap);
}

.depol-mr-app .st-grid {
	display: grid;
	gap: var(--depol-mr-stats-grid-gap);
	margin-bottom: var(--depol-mr-stats-section-gap);
}

.depol-mr-app .st-grid--kpi,
.depol-mr-app .st-grid--detail-row {
	grid-template-columns: repeat(3, minmax(0, 1fr));
	margin-bottom: 1rem;
}

.depol-mr-app .st-grid--kpi .depol-mr-kpi__value {
	font-size: 2rem;
}

.depol-mr-app .st-grid--detail-row:last-of-type {
	margin-bottom: var(--depol-mr-stats-section-gap);
}

.depol-mr-app .depol-mr-distrib-split {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: var(--depol-mr-stats-block-gap);
	align-items: stretch;
	margin-bottom: var(--depol-mr-stats-section-gap);
}

.depol-mr-app .depol-mr-distrib-split .st-grid--detail-col {
	grid-template-columns: 1fr;
	grid-template-rows: repeat(3, minmax(0, 1fr));
	height: 100%;
	min-height: 100%;
	margin-bottom: 0;
	gap: var(--depol-mr-stats-grid-gap);
}

.depol-mr-app .depol-mr-distrib-split .st-grid--detail-col .depol-mr-kpi--stat {
	display: flex;
	flex-direction: column;
	justify-content: center;
	height: 100%;
	min-height: 0;
}

.depol-mr-app .depol-mr-distrib-split .depol-mr-chart-card--distrib {
	height: 100%;
	box-sizing: border-box;
	border: 1px solid var(--border);
	border-radius: var(--radius-md);
	background: var(--surface);
}

.depol-mr-app .depol-mr-kpi-rows-pair {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	grid-template-rows: repeat(2, minmax(0, 1fr));
	gap: var(--depol-mr-stats-grid-gap);
	margin-bottom: var(--depol-mr-stats-section-gap);
	align-items: stretch;
}

.depol-mr-app .depol-mr-kpi-rows-pair > .st-grid--kpi,
.depol-mr-app .depol-mr-kpi-rows-pair > .depol-mr-results-kpi-grid {
	display: contents;
}

.depol-mr-app .depol-mr-kpi-rows-pair .depol-mr-kpi {
	height: 100%;
	min-height: 0;
}

.depol-mr-app .depol-mr-kpi-rows-pair .st-grid--kpi .depol-mr-kpi__value {
	font-size: 2rem;
}

.depol-mr-app .depol-mr-kpi--stat {
	padding: 0.9rem 1rem;
}

.depol-mr-app .depol-mr-kpi--stat .depol-mr-kpi__value {
	font-weight: 600;
	font-size: 1.75rem;
	line-height: 1;
	margin-top: 4px;
}

.depol-mr-app .rank-table-scroll {
	overflow-x: auto;
}

.depol-mr-app .rank-table-scroll .depol-mr-table--ranking {
	margin: 0;
	min-width: 42rem;
}

.depol-mr-app .rank-table-scroll .depol-mr-table--ranking thead th.num,
.depol-mr-app .rank-table-scroll .depol-mr-table--ranking td.num {
	text-align: right;
	white-space: nowrap;
}

.depol-mr-app .rank-table-scroll .depol-mr-table--ranking td.num {
	font-weight: 800;
}

.depol-mr-app .rank-wrap {
	background: #fff;
	border-radius: var(--radius-xl);
	overflow: hidden;
	margin-top: 2.5rem;
	margin-bottom: 1rem;
	box-shadow: var(--shadow-sm);
}

.depol-mr-app .rank-head {
	background: var(--navy);
	padding: 0.85rem 1.25rem;
	font-weight: 600;
	font-size: var(--depol-mr-ui-font-size);
	letter-spacing: 2px;
	color: #fff;
}

.depol-mr-app .rank-notice-wrap {
	padding: 0.85rem 1.25rem 0.75rem;
	background: #fff;
	border-bottom: 1px solid var(--border);
}

.depol-mr-app .rank-notice-wrap .rank-provisional-note {
	margin: 0;
	width: fit-content;
	max-width: 100%;
}

.depol-mr-app .rank-notice-wrap--bar {
	padding: 0;
	border-bottom: none;
}

.depol-mr-app .rank-incomplete-notice {
	margin: 0;
	padding: 0.75rem 1.25rem;
	font-size: var(--depol-mr-ui-font-size);
	line-height: 1.45;
	color: #6b4e0a;
	background: #fff8e6;
	border-bottom: 1px solid #f0d78c;
	text-align: left;
	font-weight: 500;
}

.depol-mr-app .rank-notice-wrap--bar .rank-incomplete-notice {
	width: 100%;
	box-sizing: border-box;
}

.depol-mr-app tr.is-me td {
	background: #f0f0fa;
	color: var(--navy);
	font-weight: 600;
}

.depol-mr-app .rank-apto {
	font-weight: 700;
	white-space: nowrap;
}

.depol-mr-app .rank-apto--yes {
	color: var(--success);
}

.depol-mr-app .rank-apto--no {
	color: var(--danger);
}

.depol-mr-app tr.is-me .rank-apto--yes {
	color: var(--success);
}

.depol-mr-app tr.is-me .rank-apto--no {
	color: var(--danger);
}


.depol-mr-app .toast {
	position: fixed;
	bottom: 1.5rem;
	right: 1.5rem;
	background: var(--navy);
	border: 2px solid var(--gold);
	border-radius: var(--radius-lg);
	padding: 0.7rem 1.2rem;
	color: #fff;
	z-index: 100001;
	transform: translateY(70px);
	opacity: 0;
	transition: opacity 0.26s ease, transform 0.26s ease;
	pointer-events: none;
}

.depol-mr-app .toast.show {
	transform: translateY(0);
	opacity: 1;
}

.depol-mr-app .res-by-area {
	margin-bottom: var(--depol-mr-stats-section-gap);
}

.depol-mr-app .res-by-area .res-meta {
	margin: 0;
	font-size: var(--depol-mr-ui-font-size);
	color: var(--textsub);
}

/* ── Gráficos Chart.js ── */
.depol-mr-app .depol-mr-charts-grid {
	display: grid;
	grid-template-columns: 1fr;
	gap: var(--depol-mr-stats-block-gap);
	margin: 0 0 var(--depol-mr-stats-section-gap);
}

.depol-mr-app .depol-mr-chart-card {
	background: #fff;
	border-radius: var(--radius-xl);
	padding: 1.25rem 1.25rem 1rem;
	box-shadow: var(--shadow-sm);
}

.depol-mr-app .depol-mr-chart-card--wide {
	grid-column: 1 / -1;
}

.depol-mr-app .depol-mr-chart-title {
	font-weight: 700;
	font-size: var(--depol-mr-ui-font-size);
	letter-spacing: 0.07em;
	text-transform: uppercase;
	color: var(--navy2);
	margin-bottom: 1rem;
}

.depol-mr-app .depol-mr-chart-desc {
	font-size: var(--depol-mr-ui-font-size);
	color: var(--textsub);
	margin: 0 0 12px;
}

.depol-mr-app .depol-mr-chart-canvas-wrap {
	position: relative;
}

.depol-mr-app .depol-mr-chart-canvas-wrap--square {
	max-width: 260px;
	margin: 0 auto;
}

.depol-mr-app .depol-mr-chart-legend--inline {
	display: flex;
	flex-wrap: nowrap;
	justify-content: center;
	align-items: center;
	gap: 0.75rem 1.1rem;
	margin-top: 0.65rem;
	max-width: 100%;
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
	scrollbar-width: thin;
}

.depol-mr-app .depol-mr-chart-legend-item {
	display: inline-flex;
	flex-shrink: 0;
	align-items: center;
	gap: 0.4rem;
	white-space: nowrap;
	font-size: var(--depol-mr-ui-font-size);
	color: var(--text);
	line-height: 1.2;
}

.depol-mr-app .depol-mr-chart-legend-swatch {
	width: 12px;
	height: 12px;
	border-radius: 2px;
	flex-shrink: 0;
}

/* Imagen estática generada antes de imprimir / guardar PDF (Chart.js canvas no siempre imprime). */
.depol-mr-app .depol-mr-chart-print-img {
	display: block;
	width: auto;
	max-width: 100%;
	height: auto;
	margin: 0 auto;
	object-fit: contain;
}

.depol-mr-app .depol-mr-chart-print-img--bars {
	max-width: none;
	margin: 0;
}

.depol-mr-app .res-stats-section {
	margin-bottom: var(--depol-mr-stats-section-gap);
}

.depol-mr-app .res-stats-section .res-by-area {
	margin-top: 0;
}

.depol-mr-app .area-stats-block {
	display: flex;
	flex-direction: column;
	gap: var(--depol-mr-stats-block-gap);
	overflow: visible;
}

.depol-mr-app .area-stats-chart {
	background: #f8fafc;
	border-radius: var(--radius-md);
	overflow: hidden;
	padding: 1rem 1rem 0.75rem;
	box-shadow: var(--shadow-sm);
}

.depol-mr-app .area-stats-chart--scroll-x .area-stats-chart__scroll {
	overflow-x: hidden;
}

.depol-mr-app .area-stats-chart--scroll-x .area-stats-chart__wrap {
	width: 100%;
	max-width: 100%;
	min-width: 0;
}

.depol-mr-app .area-stats-chart__empty {
	margin: 0;
	padding: 0.75rem 0;
	text-align: center;
	font-size: var(--depol-mr-ui-font-size);
	color: var(--textsub);
}

.depol-mr-app .area-stats-table {
	background: #fff;
	border-radius: var(--radius-md);
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
	box-shadow: var(--shadow-sm);
}

.depol-mr-app .area-stats-table .depol-mr-table--data {
	border: none;
	box-shadow: none;
	margin: 0;
	min-width: 42rem;
}

.depol-mr-app .area-stats-table .depol-mr-table--data thead th {
	background: var(--navy);
	color: var(--on-dark);
	font-size: 0.7rem;
	letter-spacing: 0.08em;
	white-space: nowrap;
}

.depol-mr-app .area-stats-table .depol-mr-table--data thead th.num {
	text-align: right;
}

.depol-mr-app .area-stats-table .depol-mr-table--data td {
	color: var(--text);
}

.depol-mr-app .area-stats-table .depol-mr-table--data td.num {
	font-weight: 800;
	text-align: right;
	white-space: nowrap;
}

.depol-mr-app .area-stats-table .depol-mr-table__group-avg {
	color: rgba(0, 0, 0, 0.58);
}

.depol-mr-app .area-stats-block__empty {
	margin: 0;
	padding: 1rem 1.25rem;
	border-top: 1px solid var(--border);
}

@media (max-width: 805px) {
	body:not(.depol-mr-panel-print) .depol-mr-app .depol-mr-kpi-rows-pair {
		grid-template-columns: 1fr;
		grid-template-rows: none;
	}
	body:not(.depol-mr-panel-print) .depol-mr-app .depol-mr-distrib-split {
		grid-template-columns: 1fr;
	}
	body:not(.depol-mr-panel-print) .depol-mr-app .depol-mr-charts-grid {
		grid-template-columns: 1fr;
	}
	body:not(.depol-mr-panel-print) .depol-mr-app .depol-mr-chart-card--wide {
		grid-column: 1;
	}
	body:not(.depol-mr-panel-print) .depol-mr-app .area-stats-chart--scroll-x .area-stats-chart__scroll {
		overflow-x: auto;
		-webkit-overflow-scrolling: touch;
		overscroll-behavior-x: contain;
	}
	body:not(.depol-mr-panel-print) .depol-mr-app .area-stats-chart--scroll-x .area-stats-chart__wrap {
		min-width: 1080px;
		width: 1080px;
		max-width: none;
	}
	body:not(.depol-mr-panel-print) .depol-mr-app .area-stats-chart--scroll-x .area-stats-chart__wrap.depol-mr-chart-canvas-wrap--bars-v canvas {
		max-width: none;
	}
}

.depol-mr-app .depol-mr-table--area td strong {
	color: var(--navy);
}

.depol-mr-app .res-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	justify-content: center;
	align-items: center;
	text-align: center;
	margin-top: 1.5rem;
	padding: 1rem 0 2.5rem;
}

.depol-mr-app .res-actions .depol-mr-button,
.depol-mr-print-toolbar__actions .depol-mr-button {
	max-width: 100%;
	margin-top: 0;
}

