/* =========================================================
   Laboratorio de Cuotas F1 — estilos
   Ruta: components/proprietary/laboratorio-cuotas-f1.css
   Todo el CSS está scopeado bajo #f1-cuotas-lab.
   Ajusta el bloque de variables para encajar con el tema.
   ========================================================= */

#f1-cuotas-lab {
	/* --- Colores --- */
	--f1cl-bg: #ffffff;
	--f1cl-surface: #f5f6f8;
	--f1cl-surface-2: #eceef2;
	--f1cl-border: #d9dde4;
	--f1cl-border-strong: #b9c0cb;
	--f1cl-text: #16181d;
	--f1cl-muted: #5c6270;
	--f1cl-accent: #e10600;
	--f1cl-accent-dark: #a80400;
	--f1cl-accent-soft: #fdeceb;
	--f1cl-good: #14684a;
	--f1cl-good-soft: #e4f4ec;
	--f1cl-warn: #8a5a00;
	--f1cl-warn-soft: #fdf3e0;
	--f1cl-bad: #a92019;
	--f1cl-bad-soft: #fdecea;

	/* --- Tipografía --- */
	--f1cl-font: inherit;
	--f1cl-fs: 16px;
	--f1cl-fs-sm: 14px;
	--f1cl-fs-xs: 12.5px;
	--f1cl-fs-title: 22px;
	--f1cl-fs-kpi: 24px;
	--f1cl-lh: 1.6;

	/* --- Métrica --- */
	--f1cl-gap: 16px;
	--f1cl-radius: 10px;
	--f1cl-radius-sm: 6px;
	--f1cl-pad: 18px;

	box-sizing: border-box;
	display: block;
	margin: 32px 0;
	padding: var(--f1cl-pad);
	border: 1px solid var(--f1cl-border);
	border-radius: var(--f1cl-radius);
	background: var(--f1cl-bg);
	color: var(--f1cl-text);
	font-family: var(--f1cl-font);
	font-size: var(--f1cl-fs);
	line-height: var(--f1cl-lh);
	text-align: left;
}

#f1-cuotas-lab *,
#f1-cuotas-lab *::before,
#f1-cuotas-lab *::after {
	box-sizing: border-box;
	min-width: 0;
	max-width: 100%;
}

#f1-cuotas-lab .f1cl-sr {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

/* ---------- Cabecera ---------- */

#f1-cuotas-lab .f1cl-head {
	margin: 0 0 var(--f1cl-gap);
	padding: 0 0 var(--f1cl-gap);
	border-bottom: 3px solid var(--f1cl-accent);
}

#f1-cuotas-lab .f1cl-title {
	margin: 0 0 8px;
	padding: 0;
	color: var(--f1cl-text);
	font-size: var(--f1cl-fs-title);
	line-height: 1.25;
	font-weight: 700;
}

#f1-cuotas-lab .f1cl-sub {
	margin: 0;
	color: var(--f1cl-muted);
	font-size: var(--f1cl-fs-sm);
}

#f1-cuotas-lab p {
	margin: 0 0 12px;
}

#f1-cuotas-lab p:last-child {
	margin-bottom: 0;
}

/* ---------- Pestañas ---------- */

#f1-cuotas-lab .f1cl-tabs {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	margin: 0 0 var(--f1cl-gap);
}

#f1-cuotas-lab .f1cl-tab {
	flex: 1 1 200px;
	margin: 0;
	padding: 11px 14px;
	border: 1px solid var(--f1cl-border);
	border-radius: var(--f1cl-radius-sm);
	background: var(--f1cl-surface);
	color: var(--f1cl-muted);
	font-family: inherit;
	font-size: var(--f1cl-fs-sm);
	font-weight: 600;
	line-height: 1.3;
	text-align: center;
	cursor: pointer;
	transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

#f1-cuotas-lab .f1cl-tab:hover {
	border-color: var(--f1cl-border-strong);
	color: var(--f1cl-text);
}

#f1-cuotas-lab .f1cl-tab--on,
#f1-cuotas-lab .f1cl-tab--on:hover {
	border-color: var(--f1cl-accent);
	background: var(--f1cl-accent);
	color: #ffffff;
}

/* ---------- Paneles ---------- */

#f1-cuotas-lab .f1cl-panel {
	outline: none;
}

#f1-cuotas-lab .f1cl-panel[hidden] {
	display: none;
}

#f1-cuotas-lab .f1cl-lead {
	margin: 0 0 var(--f1cl-gap);
	font-size: var(--f1cl-fs-sm);
	color: var(--f1cl-muted);
}

/* ---------- Controles ---------- */

#f1-cuotas-lab .f1cl-controls {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-end;
	gap: 12px;
	margin: 0 0 var(--f1cl-gap);
}

#f1-cuotas-lab .f1cl-controls .f1cl-field {
	flex: 1 1 240px;
}

#f1-cuotas-lab .f1cl-btnrow {
	display: flex;
	flex: 1 1 240px;
	flex-wrap: wrap;
	gap: 8px;
}

#f1-cuotas-lab .f1cl-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
	gap: 12px;
	margin: 0 0 var(--f1cl-gap);
}

#f1-cuotas-lab .f1cl-field {
	display: block;
}

#f1-cuotas-lab .f1cl-label {
	display: block;
	margin: 0 0 5px;
	color: var(--f1cl-text);
	font-size: var(--f1cl-fs-xs);
	font-weight: 600;
	letter-spacing: 0.01em;
	text-transform: uppercase;
}

#f1-cuotas-lab .f1cl-input {
	display: block;
	width: 100%;
	margin: 0;
	padding: 9px 10px;
	border: 1px solid var(--f1cl-border-strong);
	border-radius: var(--f1cl-radius-sm);
	background: var(--f1cl-bg);
	color: var(--f1cl-text);
	font-family: inherit;
	font-size: 16px;
	line-height: 1.35;
}

#f1-cuotas-lab .f1cl-input:hover {
	border-color: var(--f1cl-muted);
}

#f1-cuotas-lab .f1cl-input--odds {
	min-width: 84px;
	font-variant-numeric: tabular-nums;
}

#f1-cuotas-lab .f1cl-input--name {
	min-width: 130px;
}

#f1-cuotas-lab .f1cl-input--bad {
	border-color: var(--f1cl-bad);
	background: var(--f1cl-bad-soft);
}

#f1-cuotas-lab .f1cl-btn {
	display: inline-block;
	margin: 0;
	padding: 10px 16px;
	border: 1px solid var(--f1cl-accent);
	border-radius: var(--f1cl-radius-sm);
	background: var(--f1cl-accent);
	color: #ffffff;
	font-family: inherit;
	font-size: var(--f1cl-fs-sm);
	font-weight: 600;
	line-height: 1.3;
	cursor: pointer;
	transition: background-color 0.15s ease;
}

#f1-cuotas-lab .f1cl-btn:hover {
	background: var(--f1cl-accent-dark);
	border-color: var(--f1cl-accent-dark);
}

#f1-cuotas-lab .f1cl-btn--ghost {
	border-color: var(--f1cl-border-strong);
	background: var(--f1cl-surface);
	color: var(--f1cl-text);
}

#f1-cuotas-lab .f1cl-btn--ghost:hover {
	background: var(--f1cl-surface-2);
	border-color: var(--f1cl-muted);
}

/* ---------- Tabla ---------- */

#f1-cuotas-lab .f1cl-tablewrap {
	margin: 0 0 var(--f1cl-gap);
	overflow-x: auto;
	overscroll-behavior-x: contain;
	border: 1px solid var(--f1cl-border);
	border-radius: var(--f1cl-radius-sm);
	-webkit-overflow-scrolling: touch;
}

#f1-cuotas-lab .f1cl-table {
	width: 100%;
	min-width: 620px;
	max-width: none;
	border-collapse: collapse;
	font-size: var(--f1cl-fs-sm);
}

#f1-cuotas-lab .f1cl-caption {
	padding: 10px 12px;
	background: var(--f1cl-surface-2);
	color: var(--f1cl-muted);
	font-size: var(--f1cl-fs-xs);
	text-align: left;
	caption-side: top;
}

#f1-cuotas-lab .f1cl-table th {
	padding: 9px 10px;
	border-bottom: 1px solid var(--f1cl-border-strong);
	background: var(--f1cl-surface);
	color: var(--f1cl-text);
	font-size: var(--f1cl-fs-xs);
	font-weight: 700;
	letter-spacing: 0.01em;
	text-align: left;
	text-transform: uppercase;
	white-space: nowrap;
}

#f1-cuotas-lab .f1cl-table td {
	padding: 7px 10px;
	border-bottom: 1px solid var(--f1cl-border);
	color: var(--f1cl-text);
	vertical-align: middle;
}

#f1-cuotas-lab .f1cl-table tr:last-child td {
	border-bottom: 0;
}

#f1-cuotas-lab .f1cl-num {
	font-variant-numeric: tabular-nums;
	text-align: right;
	white-space: nowrap;
}

#f1-cuotas-lab .f1cl-strong {
	font-weight: 700;
}

#f1-cuotas-lab .f1cl-row--best td {
	background: var(--f1cl-good-soft);
}

#f1-cuotas-lab .f1cl-acts {
	white-space: nowrap;
	text-align: right;
}

#f1-cuotas-lab .f1cl-mini {
	display: inline-block;
	margin: 0 0 0 4px;
	padding: 6px 9px;
	border: 1px solid var(--f1cl-border-strong);
	border-radius: var(--f1cl-radius-sm);
	background: var(--f1cl-surface);
	color: var(--f1cl-text);
	font-family: inherit;
	font-size: var(--f1cl-fs-xs);
	font-weight: 600;
	line-height: 1.2;
	cursor: pointer;
}

#f1-cuotas-lab .f1cl-mini:hover {
	background: var(--f1cl-accent-soft);
	border-color: var(--f1cl-accent);
	color: var(--f1cl-accent-dark);
}

/* ---------- KPI ---------- */

#f1-cuotas-lab .f1cl-kpis {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
	gap: 10px;
	margin: 0 0 var(--f1cl-gap);
}

#f1-cuotas-lab .f1cl-kpi {
	display: flex;
	flex-direction: column;
	gap: 3px;
	padding: 12px;
	border: 1px solid var(--f1cl-border);
	border-radius: var(--f1cl-radius-sm);
	background: var(--f1cl-surface);
}

#f1-cuotas-lab .f1cl-kpi-lab {
	color: var(--f1cl-muted);
	font-size: var(--f1cl-fs-xs);
	font-weight: 600;
	letter-spacing: 0.01em;
	text-transform: uppercase;
}

#f1-cuotas-lab .f1cl-kpi-val {
	color: var(--f1cl-text);
	font-size: var(--f1cl-fs-kpi);
	font-variant-numeric: tabular-nums;
	font-weight: 700;
	line-height: 1.2;
}

#f1-cuotas-lab .f1cl-kpi-val--accent {
	color: var(--f1cl-accent-dark);
}

#f1-cuotas-lab .f1cl-kpi-hint {
	color: var(--f1cl-muted);
	font-size: var(--f1cl-fs-xs);
	line-height: 1.35;
}

/* ---------- Lista de resultados ---------- */

#f1-cuotas-lab .f1cl-dl {
	margin: 0 0 var(--f1cl-gap);
	padding: 0;
	border: 1px solid var(--f1cl-border);
	border-radius: var(--f1cl-radius-sm);
	overflow: hidden;
}

#f1-cuotas-lab .f1cl-dlrow {
	display: flex;
	flex-wrap: wrap;
	gap: 4px 12px;
	align-items: baseline;
	justify-content: space-between;
	padding: 10px 12px;
	border-bottom: 1px solid var(--f1cl-border);
	background: var(--f1cl-bg);
}

#f1-cuotas-lab .f1cl-dlrow:last-child {
	border-bottom: 0;
}

#f1-cuotas-lab .f1cl-dlrow--hl {
	background: var(--f1cl-surface);
}

#f1-cuotas-lab .f1cl-dt {
	flex: 1 1 200px;
	margin: 0;
	color: var(--f1cl-muted);
	font-size: var(--f1cl-fs-sm);
	font-weight: 400;
}

#f1-cuotas-lab .f1cl-dd {
	flex: 0 1 auto;
	margin: 0;
	color: var(--f1cl-text);
	font-size: var(--f1cl-fs);
	font-variant-numeric: tabular-nums;
	font-weight: 700;
	text-align: right;
}

#f1-cuotas-lab .f1cl-dd--good {
	color: var(--f1cl-good);
}

#f1-cuotas-lab .f1cl-dd--bad {
	color: var(--f1cl-bad);
}

/* ---------- Avisos ---------- */

#f1-cuotas-lab .f1cl-verdict {
	margin: 0 0 var(--f1cl-gap);
	padding: 12px 14px;
	border: 1px solid var(--f1cl-border);
	border-left: 4px solid var(--f1cl-muted);
	border-radius: var(--f1cl-radius-sm);
	background: var(--f1cl-surface);
	font-size: var(--f1cl-fs-sm);
	font-weight: 600;
}

#f1-cuotas-lab .f1cl-verdict--good {
	border-color: var(--f1cl-border);
	border-left-color: var(--f1cl-good);
	background: var(--f1cl-good-soft);
	color: var(--f1cl-good);
}

#f1-cuotas-lab .f1cl-verdict--warn {
	border-color: var(--f1cl-border);
	border-left-color: var(--f1cl-warn);
	background: var(--f1cl-warn-soft);
	color: var(--f1cl-warn);
}

#f1-cuotas-lab .f1cl-verdict--bad {
	border-color: var(--f1cl-border);
	border-left-color: var(--f1cl-bad);
	background: var(--f1cl-bad-soft);
	color: var(--f1cl-bad);
}

#f1-cuotas-lab .f1cl-note {
	margin: 0 0 var(--f1cl-gap);
	padding: 11px 13px;
	border-radius: var(--f1cl-radius-sm);
	background: var(--f1cl-surface);
	color: var(--f1cl-muted);
	font-size: var(--f1cl-fs-sm);
}

#f1-cuotas-lab .f1cl-note--warn {
	background: var(--f1cl-warn-soft);
	color: var(--f1cl-warn);
}

/* ---------- Detalles ---------- */

#f1-cuotas-lab .f1cl-details {
	margin: 0 0 var(--f1cl-gap);
	border: 1px solid var(--f1cl-border);
	border-radius: var(--f1cl-radius-sm);
	background: var(--f1cl-bg);
}

#f1-cuotas-lab .f1cl-summary {
	padding: 11px 13px;
	color: var(--f1cl-text);
	font-size: var(--f1cl-fs-sm);
	font-weight: 600;
	cursor: pointer;
}

#f1-cuotas-lab .f1cl-details-body {
	padding: 0 13px 4px;
	color: var(--f1cl-muted);
	font-size: var(--f1cl-fs-sm);
}

#f1-cuotas-lab .f1cl-details-body strong {
	color: var(--f1cl-text);
}

/* ---------- Pie legal ---------- */

#f1-cuotas-lab .f1cl-legal {
	margin: var(--f1cl-gap) 0 0;
	padding: 12px 0 0;
	border-top: 1px solid var(--f1cl-border);
	color: var(--f1cl-muted);
	font-size: var(--f1cl-fs-xs);
	line-height: 1.5;
}

/* ---------- Foco visible ---------- */

#f1-cuotas-lab .f1cl-tab:focus-visible,
#f1-cuotas-lab .f1cl-btn:focus-visible,
#f1-cuotas-lab .f1cl-mini:focus-visible,
#f1-cuotas-lab .f1cl-input:focus-visible,
#f1-cuotas-lab .f1cl-summary:focus-visible,
#f1-cuotas-lab .f1cl-panel:focus-visible {
	outline: 3px solid var(--f1cl-accent);
	outline-offset: 2px;
}

#f1-cuotas-lab .f1cl-input:focus {
	border-color: var(--f1cl-accent);
}

/* ---------- Ampliaciones cosméticas en pantallas grandes ---------- */

@media (min-width: 640px) {
	#f1-cuotas-lab {
		--f1cl-pad: 26px;
		--f1cl-fs-title: 26px;
		--f1cl-fs-kpi: 27px;
	}
}

/* ---------- Movimiento reducido ---------- */

@media (prefers-reduced-motion: reduce) {
	#f1-cuotas-lab .f1cl-tab,
	#f1-cuotas-lab .f1cl-btn {
		transition: none;
	}
}
