/**
 * Puente Liferay 7.4 + design system lp-*.
 * Evita choques con Clay/Bootstrap y el contenedor #cp-app.
 */

:root {
	--mantis-blue: #007db5;
	--mantis-blue-hover: #086494;
	--mantis-primary-subtle: #eff9fc;
	--cp-primary: #007db5;
	--cp-primary-hover: #086494;
	--cp-primary-subtle: #eff9fc;
	--lp-font: "Public Sans", Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
}

/* Area principal Liferay: siempre gris del sitio (maqueta --lp-background) */
#content,
#content.flex-fill {
	background-color: var(--lp-background, #f3f6f9) !important;
	background-image: none !important;
}

#content .portlet,
#content .portlet-boundary,
#content .portlet-content-container,
#content .portlet-body,
#content .portlet-layout,
#content .portlet-column,
#content .portlet-column-content {
	background-color: transparent !important;
	background-image: none !important;
}

/* Contenedor autenticado: el contenido usa tokens LP sin forzar shell completo */
#cp-app.lp-app,
#cp-app.cp-theme-fluent.lp-app {
	background: var(--lp-background);
	color: var(--lp-text);
	font-family: var(--lp-font);
	min-height: auto;
	padding: 0;
}

#cp-app.lp-app > .portlet-content,
#cp-app.lp-app .portlet-content {
	background: transparent;
	border: 0;
	border-radius: 0;
	box-shadow: none;
	padding: 0;
	min-height: 0;
}

#cp-app.lp-app .lp-content {
	padding: 24px 28px 40px;
}

/* Login a pantalla completa dentro del portlet */
#cp-login-page.lp-app,
.cp-login-wrapper.lp-app {
	margin: 0;
	min-height: 100vh;
	width: 100%;
}

#cp-login-page .lp-login-page {
	min-height: 100vh;
}

#cp-login-page .d-none {
	display: none !important;
}

#cp-login-page .alert {
	border-radius: var(--lp-radius-sm);
	font-size: 13px;
	margin-bottom: 14px;
}

/* Utilidad para paneles de recuperacion */
.lp-is-hidden {
	display: none !important;
}

/* KPI: iconos que el JS marca con clases legacy */
.lp-kpi__icon.is-down svg,
.lp-kpi__icon.cp-inicio-kpi-ico--danger {
	color: var(--lp-danger);
}

.lp-kpi__icon.cp-inicio-kpi-ico--green {
	color: var(--lp-success);
}

.lp-kpi__meta.is-up,
.lp-kpi__trend.is-up {
	color: var(--lp-success);
}

.lp-kpi__meta.is-down,
.lp-kpi__trend.is-down {
	color: var(--lp-danger);
}

/* Skeleton loading reutilizado en inicio */
.cp-inicio-dashboard.is-loading .cp-inicio-real {
	display: none !important;
}

.cp-inicio-dashboard:not(.is-loading) .cp-inicio-skel,
.cp-inicio-dashboard:not(.is-loading) .cp-inicio-skel-activity {
	display: none !important;
}

.cp-inicio-skel {
	display: block;
	background: linear-gradient(90deg, #e8eef3 25%, #f5f8fb 50%, #e8eef3 75%);
	background-size: 200% 100%;
	animation: lp-skel 1.2s ease-in-out infinite;
	border-radius: 8px;
}

.cp-inicio-skel--value {
	height: 28px;
	width: 70%;
	margin: 8px 0;
}

.cp-inicio-skel--meta {
	height: 12px;
	width: 55%;
}

.cp-inicio-skel--select {
	position: absolute;
	inset: 0;
	z-index: 1;
}

.cp-inicio-skel--chart {
	display: flex;
	align-items: flex-end;
	gap: 8px;
	height: 220px;
	padding: 12px 8px 0;
}

.cp-inicio-skel-bar {
	flex: 1;
	display: block;
	border-radius: 4px 4px 0 0;
	background: #d9e4ec;
	min-height: 20%;
}

@keyframes lp-skel {
	0% { background-position: 200% 0; }
	100% { background-position: -200% 0; }
}

.lp-chart-wrap {
	position: relative;
	min-height: 240px;
}

.lp-chart-wrap canvas {
	width: 100% !important;
	max-height: 280px;
}

.lp-dashboard-charts-stack {
	display: flex;
	flex-direction: column;
	gap: 18px;
	min-width: 0;
}

.lp-dashboard-charts-stack .lp-chart-card {
	min-height: 0;
}

/* =================== Inicio dashboard LP =================== */
.lp-app .cp-inicio-dashboard .lp-page-header > .lp-page-actions {
	align-items: flex-end;
	margin-top: 8px;
	gap: 12px;
}

.lp-app .cp-inicio-dashboard .lp-page-header > .lp-page-actions .lp-field {
	margin: 0;
}

.lp-app .cp-inicio-dashboard #cp-inicio-user-chip {
	min-height: 40px;
	height: 40px;
	align-self: flex-end;
}

.lp-app .cp-inicio-dashboard .lp-kpi-grid {
	align-items: stretch;
	grid-auto-rows: 1fr;
}

.lp-app .cp-inicio-dashboard .lp-kpi-grid > .lp-kpi,
.lp-app .cp-inicio-dashboard .lp-kpi-grid > a.lp-kpi {
	display: flex !important;
	flex-direction: column;
	align-self: stretch;
	height: 100%;
	min-height: 188px;
	box-sizing: border-box;
}

.lp-app .cp-inicio-dashboard .lp-kpi-grid > .lp-kpi .lp-kpi__value,
.lp-app .cp-inicio-dashboard .lp-kpi-grid > a.lp-kpi .lp-kpi__value {
	font-size: clamp(20px, 1.8vw, 28px);
	min-height: 2.35em;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.lp-app .cp-inicio-dashboard .lp-kpi-grid > .lp-kpi .lp-kpi__meta,
.lp-app .cp-inicio-dashboard .lp-kpi-grid > a.lp-kpi .lp-kpi__meta {
	min-height: 2.6em;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
	line-height: 1.3;
}

.lp-app .cp-inicio-dashboard .lp-kpi-grid > .lp-kpi .lp-kpi__trend,
.lp-app .cp-inicio-dashboard .lp-kpi-grid > a.lp-kpi .lp-kpi__trend {
	margin-top: auto;
	min-height: 1.35em;
}

.lp-app .cp-inicio-chart-switch {
	display: flex;
	align-items: center;
	gap: 8px;
	flex-wrap: wrap;
}

.lp-app .cp-inicio-chart-switch .lp-button.is-active {
	background: var(--lp-primary);
	border-color: var(--lp-primary);
	color: #fff;
}

.lp-app .lp-dashboard-charts-stack > .lp-chart-card.d-none {
	display: none !important;
}

/* Iconos inline en actividad (SVG del dashboard) */
.lp-activity-item__icon svg {
	width: 18px;
	height: 18px;
	stroke: currentColor;
	stroke-width: 2;
	fill: none;
}

.lp-row-action .lp-icon {
	width: 16px;
	height: 16px;
}

/* DataTables dentro de lp-table-shell (otras pantallas) */
.lp-app #cp-table-gerencias_wrapper .dataTables_length,
.lp-app #cp-table-gerencias_wrapper .dataTables_filter {
	padding: 12px 16px 0;
}

.lp-app #cp-table-gerencias_wrapper .dataTables_info,
.lp-app #cp-table-gerencias_wrapper .dataTables_paginate {
	padding: 12px 16px 16px;
}

/* Gerencias: tabla LP pura (sin Bootstrap / DataTables) */
#cp-content-gerencias .lp-table {
	width: 100%;
	margin: 0;
	border-collapse: separate;
	border-spacing: 0;
	background: #fff;
}

#cp-content-gerencias .lp-table.table,
#cp-content-gerencias .lp-table.table-striped > tbody > tr:nth-of-type(odd),
#cp-content-gerencias .lp-table.table-bordered {
	border: 0;
	--bs-table-bg: transparent;
	--bs-table-striped-bg: transparent;
}

#cp-content-gerencias .lp-table thead th {
	background: var(--lp-surface-muted);
	border-bottom: 1px solid var(--lp-border);
	border-top: 0;
	color: var(--lp-text-muted);
	font-size: 12px;
	font-weight: 600;
	letter-spacing: 0.02em;
	text-transform: uppercase;
}

#cp-content-gerencias .lp-table tbody td {
	border-color: var(--lp-border);
	background: transparent;
	vertical-align: middle;
	transition: background 130ms ease;
}

#cp-content-gerencias .lp-table tbody tr {
	transition: background 130ms ease;
	cursor: default;
}

#cp-content-gerencias .lp-table tbody tr:hover,
#cp-content-gerencias .lp-table tbody tr:hover > td {
	background: #f8fbfd;
}

#cp-content-gerencias .lp-table tbody tr:active,
#cp-content-gerencias .lp-table tbody tr:active > td,
#cp-content-gerencias .lp-table tbody tr.is-active,
#cp-content-gerencias .lp-table tbody tr.is-active > td {
	background: var(--lp-primary-50);
}

#cp-content-gerencias .lp-row-actions {
	justify-content: flex-end;
}

#cp-content-gerencias .lp-filter-grid .lp-search {
	width: 100%;
}

#cp-content-gerencias .lp-card + .lp-card,
#cp-content-gerencias .lp-filter-card + .lp-card {
	margin-top: 16px;
}

/* Modal LP sobre el portal Liferay (product menu / control menu) */
body > .lp-modal-backdrop,
#cp-modals-container .lp-modal-backdrop,
#cp-app .lp-modal-backdrop,
#cp-lp-modal-gerencia.lp-modal-backdrop,
#cp-lp-modal-log-detail.lp-modal-backdrop,
#cp-modal-confirm.lp-modal-backdrop {
	z-index: 1100;
}

/* Confirmacion eliminar (maqueta + icono centrado, sin amarillo chillon) */
.lp-confirm-modal .lp-modal__body {
	padding-top: 8px;
}

.lp-alert.lp-alert--confirm {
	margin: 0;
	padding: 20px 16px 18px;
	display: flex;
	flex-direction: column;
	align-items: center;
	text-align: center;
	gap: 12px;
	border-radius: 12px;
	border: 1px solid var(--lp-primary-200);
	background: var(--lp-primary-50);
	color: var(--lp-primary-900);
}

.lp-alert.lp-alert--confirm.is-danger {
	border-color: #e8c4cb;
	background: #fbf4f5;
	color: #6e2a36;
}

.lp-confirm-icon {
	width: 52px;
	height: 52px;
	border-radius: 50%;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
	background: #ffffff;
	border: 1px solid var(--lp-primary-200);
	color: var(--lp-primary-700);
	box-shadow: 0 1px 2px rgba(12, 82, 120, 0.06);
}

.lp-alert.lp-alert--confirm.is-danger .lp-confirm-icon {
	border-color: #e8c4cb;
	color: var(--lp-danger);
	background: #ffffff;
}

.lp-confirm-icon svg,
.lp-confirm-icon .lp-icon {
	width: 24px;
	height: 24px;
	display: block;
}

.lp-confirm-copy {
	max-width: 320px;
}

.lp-confirm-copy strong {
	display: block;
	font-size: 14px;
	font-weight: 600;
	line-height: 1.35;
	color: inherit;
}

.lp-confirm-copy p {
	margin: 6px 0 0;
	font-size: 12px;
	line-height: 1.45;
	color: var(--lp-text-muted);
}

.lp-alert.lp-alert--confirm.is-danger .lp-confirm-copy p {
	color: #8a5360;
}

.lp-confirm-modal .lp-modal__footer .lp-button--danger {
	min-width: 110px;
}

#cp-lp-modal-gerencia .lp-modal {
	width: min(480px, calc(100vw - 32px));
}

/* Modal fases de escenarios (maqueta LP) */
#cp-scenario-fases-modal.lp-modal-backdrop,
#cp-scenario-fase-edit-modal.lp-modal-backdrop {
	z-index: 1100;
}

#cp-scenario-fase-edit-modal.lp-modal-backdrop--nested {
	z-index: 1120;
}

#cp-scenario-fases-modal .lp-modal__body {
	max-height: min(70vh, 720px);
	overflow: auto;
}

#cp-scenario-fases-modal .cp-fase-form-grid {
	align-items: end;
}

#cp-scenario-fases-modal .cp-fase-form-actions {
	display: flex;
	align-items: end;
	justify-content: flex-end;
}

#cp-scenario-fases-modal .lp-phase-list {
	margin-top: 18px;
}

#cp-scenario-fases-modal .lp-button--warning {
	color: #6b4e1e;
	border-color: #e2d2a8;
	background: #f7f2e6;
}

#cp-scenario-fases-modal .lp-button--warning:hover {
	background: #efe6d2;
	border-color: #d4c08a;
}

#cp-scenario-fases-modal .cp-scenario-fases-empty {
	padding: 24px 12px;
	text-align: center;
}

/* Filtros mantenedores: misma estructura campo/boton (label + control 40px) */
.lp-app .lp-filter-grid {
	align-items: end;
}

.lp-app .lp-filter-grid > .lp-field {
	display: flex;
	flex-direction: column;
	min-width: 0;
	margin: 0;
}

.lp-app .lp-filter-grid > .lp-field > .lp-label {
	display: block;
	height: 18px;
	margin: 0 0 6px;
	padding: 0;
	font-size: 12px;
	font-weight: 700;
	line-height: 18px;
	overflow: hidden;
	white-space: nowrap;
}

.lp-app .lp-filter-grid > .lp-filter-actions {
	justify-self: end;
}

.lp-app .lp-filter-grid .lp-field .lp-search,
.lp-app .lp-filter-grid .lp-search.lp-search--full {
	width: 100%;
	display: block;
	position: relative;
	flex: 0 0 auto;
}

.lp-app .lp-filter-grid .lp-input,
.lp-app .lp-filter-grid .lp-select,
.lp-app .lp-filter-grid .lp-search .lp-input,
.lp-app .lp-filter-grid > .lp-filter-actions .lp-button {
	width: 100%;
	height: 40px !important;
	min-height: 40px !important;
	max-height: 40px !important;
	box-sizing: border-box !important;
	margin: 0 !important;
	padding-top: 0 !important;
	padding-bottom: 0 !important;
	line-height: 38px !important;
	vertical-align: middle;
}

.lp-app .lp-filter-grid .lp-input,
.lp-app .lp-filter-grid .lp-search .lp-input {
	padding-left: 12px;
	padding-right: 12px;
}

.lp-app .lp-filter-grid .lp-search .lp-input {
	padding-left: 40px;
}

.lp-app .lp-filter-grid .lp-select {
	padding-left: 12px;
	padding-right: 34px;
	appearance: none;
	-webkit-appearance: none;
}

.lp-app .lp-filter-grid > .lp-filter-actions .lp-button {
	width: auto;
	min-width: 110px;
	padding-left: 16px !important;
	padding-right: 16px !important;
	display: inline-flex !important;
	align-items: center;
	justify-content: center;
	line-height: 1 !important;
	transform: none;
}

.lp-app .lp-filter-grid > .lp-filter-actions .lp-button:hover {
	transform: none;
}

.lp-filter-footer {
	margin-top: 12px;
	display: flex;
	justify-content: flex-end;
	align-items: center;
	gap: 8px;
}

.lp-filter-footer .lp-button {
	height: 40px;
	min-height: 40px;
	box-sizing: border-box;
}

/* Avatar iniciales centradas (evita override de .lp-user-cell span) */
.lp-app .lp-user-avatar,
.lp-app .lp-user-avatar--table {
	display: inline-flex !important;
	align-items: center !important;
	justify-content: center !important;
	line-height: 1 !important;
	text-align: center;
	margin: 0 !important;
	padding: 0 !important;
	flex: 0 0 auto;
}

/* Checkboxes unificados al estilo modal usuarios (form-check-input / cp-cc-check).
   Excluye switches (lp-switch / form-switch / role=switch). */
.lp-app input[type="checkbox"]:not([role="switch"]),
.lp-app .lp-check input[type="checkbox"],
.lp-app .form-check-input[type="checkbox"]:not([role="switch"]),
.lp-app .lp-assignment-card input[type="checkbox"],
body > .lp-modal-backdrop input[type="checkbox"]:not([role="switch"]),
body > .lp-modal-backdrop .form-check-input[type="checkbox"]:not([role="switch"]),
#cp-modals-container input[type="checkbox"]:not([role="switch"]),
#cp-modals-container .form-check-input[type="checkbox"]:not([role="switch"]),
#cp-app input[type="checkbox"]:not([role="switch"]) {
	width: 1rem;
	height: 1rem;
	margin-top: 0.15em;
	vertical-align: top;
	appearance: none;
	-webkit-appearance: none;
	print-color-adjust: exact;
	background-color: #fff;
	background-image: none;
	background-repeat: no-repeat;
	background-position: center;
	background-size: contain;
	border: 1px solid #c5d0db;
	border-radius: 0.25em;
	flex-shrink: 0;
	accent-color: var(--lp-primary);
	cursor: pointer;
}

.lp-app input[type="checkbox"]:not([role="switch"]):checked,
.lp-app .lp-check input[type="checkbox"]:checked,
.lp-app .form-check-input[type="checkbox"]:not([role="switch"]):checked,
body > .lp-modal-backdrop input[type="checkbox"]:not([role="switch"]):checked,
body > .lp-modal-backdrop .form-check-input[type="checkbox"]:not([role="switch"]):checked,
#cp-modals-container input[type="checkbox"]:not([role="switch"]):checked,
#cp-modals-container .form-check-input[type="checkbox"]:not([role="switch"]):checked,
#cp-app input[type="checkbox"]:not([role="switch"]):checked,
.lp-app .cp-usuario-gerencia-item .form-check-input:checked,
.lp-app .cp-gerencia-cc-container .form-check-input:checked,
.lp-app .cp-usuario-gerencia-available-item .form-check-input:checked,
.lp-app .cp-cc-check:checked {
	background-color: var(--lp-primary) !important;
	border-color: var(--lp-primary) !important;
	background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3e%3cpath fill='none' stroke='%23fff' stroke-linecap='round' stroke-linejoin='round' stroke-width='3' d='m6 10 3 3 6-6'/%3e%3c/svg%3e") !important;
}

.lp-app input[type="checkbox"]:not([role="switch"]):focus,
.lp-app .form-check-input[type="checkbox"]:not([role="switch"]):focus,
body > .lp-modal-backdrop input[type="checkbox"]:not([role="switch"]):focus,
body > .lp-modal-backdrop .form-check-input[type="checkbox"]:not([role="switch"]):focus,
#cp-modals-container input[type="checkbox"]:not([role="switch"]):focus,
#cp-modals-container .form-check-input[type="checkbox"]:not([role="switch"]):focus {
	border-color: var(--lp-primary-300);
	outline: 0;
	box-shadow: 0 0 0 0.2rem rgba(0, 125, 181, 0.22);
}

.lp-app input[type="checkbox"]:not([role="switch"]):indeterminate,
.lp-app .form-check-input[type="checkbox"]:indeterminate,
#cp-app input[type="checkbox"]:indeterminate {
	background-color: var(--lp-primary) !important;
	border-color: var(--lp-primary) !important;
	background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3e%3cpath fill='none' stroke='%23fff' stroke-linecap='round' stroke-linejoin='round' stroke-width='3' d='M6 10h8'/%3e%3c/svg%3e") !important;
}

/* Switches LP: el input queda oculto (el track .lp-switch span es el UI) */
.lp-app .lp-switch > input[type="checkbox"],
body > .lp-modal-backdrop .lp-switch > input[type="checkbox"],
#cp-modals-container .lp-switch > input[type="checkbox"],
.lp-app .cp-gerencia-main-switch > input.cp-gerencia-main-check {
	position: absolute !important;
	opacity: 0 !important;
	width: 1px !important;
	height: 1px !important;
	margin: 0 !important;
	padding: 0 !important;
	border: 0 !important;
	background: none !important;
	background-image: none !important;
	box-shadow: none !important;
	appearance: none !important;
	-webkit-appearance: none !important;
}

/* form-switch Bootstrap/Clay: mantener switch, no checkbox cuadrado */
.lp-app .form-switch .form-check-input,
body > .lp-modal-backdrop .form-switch .form-check-input,
#cp-modals-container .form-switch .form-check-input {
	width: 2em !important;
	height: 1em !important;
	margin-top: 0.25em !important;
	border-radius: 2em !important;
	appearance: none;
	-webkit-appearance: none;
	background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='3' fill='rgba%280,0,0,0.25%29'/%3e%3c/svg%3e") !important;
	background-position: left center !important;
	background-size: contain !important;
	background-repeat: no-repeat !important;
	background-color: #cfd6df !important;
	border-color: #cfd6df !important;
}

.lp-app .form-switch .form-check-input:checked,
body > .lp-modal-backdrop .form-switch .form-check-input:checked,
#cp-modals-container .form-switch .form-check-input:checked {
	background-color: var(--lp-primary) !important;
	border-color: var(--lp-primary) !important;
	background-position: right center !important;
	background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='3' fill='%23fff'/%3e%3c/svg%3e") !important;
}

.lp-assignment-list {
	max-height: 360px;
	overflow: auto;
	padding: 4px 2px 8px;
}

.lp-assignment-list .cp-usuario-gerencia-item {
	padding: 10px 12px;
	border-radius: 10px;
	background: #fff;
	border: 1px solid var(--lp-border);
}

.lp-app #cp-table-gerencias.lp-table {
	width: 100% !important;
	margin: 0;
}

.lp-app #cp-table-gerencias.lp-table thead th {
	background: var(--lp-surface-muted);
	border-bottom: 1px solid var(--lp-border);
	color: var(--lp-text-muted);
	font-size: 12px;
	font-weight: 600;
	letter-spacing: 0.02em;
	text-transform: uppercase;
}

.lp-app #cp-table-gerencias.lp-table tbody td {
	border-color: var(--lp-border);
	background: transparent;
	vertical-align: middle;
}

.lp-app #cp-table-gerencias.lp-table tbody tr:hover,
.lp-app #cp-table-gerencias.lp-table tbody tr:hover > td {
	background: #f8fbfd;
}

.lp-app #cp-table-gerencias.lp-table tbody tr:active,
.lp-app #cp-table-gerencias.lp-table tbody tr:active > td,
.lp-app #cp-table-gerencias.lp-table tbody tr.is-active,
.lp-app #cp-table-gerencias.lp-table tbody tr.is-active > td {
	background: var(--lp-primary-50);
}

.lp-app #cp-table-gerencias .lp-row-actions {
	justify-content: flex-end;
}

/* Modal Bootstrap con skin LP (solo gerencia) */
.lp-app .modal[data-cp-modal="gerencia"] .modal-content {
	border: 0;
	border-radius: var(--lp-radius-lg);
	box-shadow: var(--lp-shadow-md);
	overflow: hidden;
}

.lp-app .modal[data-cp-modal="gerencia"] .modal-header {
	border-bottom: 1px solid var(--lp-border);
	padding: 18px 20px;
}

.lp-app .modal[data-cp-modal="gerencia"] .modal-title {
	color: var(--lp-text-strong);
	font-size: 18px;
	font-weight: 700;
}

.lp-app .modal[data-cp-modal="gerencia"] .modal-footer {
	border-top: 1px solid var(--lp-border);
	gap: 8px;
	padding: 14px 20px;
}

.lp-app .modal[data-cp-modal="gerencia"] .lp-input,
.lp-app .modal[data-cp-modal="gerencia"] .form-control {
	border: 1px solid var(--lp-border-strong);
	border-radius: var(--lp-radius-sm);
	min-height: 42px;
}

.lp-app .btn-primary,
.lp-app .lp-button--primary {
	background: var(--lp-primary);
	border-color: var(--lp-primary);
}

.lp-app .btn-primary:hover {
	background: var(--lp-primary-hover);
	border-color: var(--lp-primary-hover);
}

/* Enlaces navegables del dashboard */
.lp-app a.lp-card,
.lp-app a.lp-kpi,
.lp-app a.lp-quick-link {
	color: inherit;
	text-decoration: none;
}

.lp-app a.lp-card:hover,
.lp-app a.lp-kpi:hover {
	border-color: var(--lp-primary-300);
	box-shadow: var(--lp-shadow-sm);
}

.visually-hidden {
	position: absolute !important;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

/* Hover/active filas LP en todos los mantenedores */
.lp-app .lp-table tbody td {
	background: transparent;
	transition: background 130ms ease;
}

.lp-app .lp-table tbody tr:hover,
.lp-app .lp-table tbody tr:hover > td {
	background: #f8fbfd;
}

.lp-app .lp-table tbody tr:active,
.lp-app .lp-table tbody tr:active > td,
.lp-app .lp-table tbody tr.is-active,
.lp-app .lp-table tbody tr.is-active > td {
	background: var(--lp-primary-50);
}

.lp-app .lp-table.table,
.lp-app .lp-table.table-striped > tbody > tr:nth-of-type(odd) > * {
	--bs-table-bg: transparent;
	--bs-table-striped-bg: transparent;
	box-shadow: none;
}

.lp-app .lp-content {
	padding: 24px 28px 40px;
}

.lp-app .lp-filter-card + .lp-card,
.lp-app .lp-card + .lp-card {
	margin-top: 16px;
}

/* KPI grid usa gap; el sibling margin desalineaba la primera card */
.lp-app .lp-kpi-grid > .lp-card + .lp-card,
.lp-app .lp-kpi-grid > a.lp-card + a.lp-card,
.lp-app .lp-kpi-grid > a.lp-kpi + a.lp-kpi {
	margin-top: 0;
}

/* Consolidado toolbar: selects y botones a la misma linea base */
.lp-app .lp-workspace-toolbar {
	display: flex;
	align-items: flex-end;
	justify-content: space-between;
	gap: 18px;
}

.lp-app .lp-workspace-toolbar .lp-form-grid {
	flex: 1;
	min-width: 0;
	align-items: end;
}

.lp-app .lp-workspace-toolbar .lp-field {
	display: flex;
	flex-direction: column;
	min-width: 0;
	margin: 0;
}

.lp-app .lp-workspace-toolbar .lp-field > .lp-label,
.lp-app .lp-workspace-toolbar .lp-workspace-actions__label {
	display: block;
	height: 18px;
	margin: 0 0 6px;
	padding: 0;
	font-size: 12px;
	font-weight: 700;
	line-height: 18px;
	overflow: hidden;
	white-space: nowrap;
}

.lp-app .lp-workspace-actions {
	display: flex;
	flex-direction: column;
	align-items: flex-end;
	justify-content: flex-end;
	flex: 0 0 auto;
	gap: 0;
	align-self: flex-end;
}

.lp-app .lp-workspace-actions__label {
	width: 100%;
	visibility: hidden;
	user-select: none;
}

.lp-app .lp-workspace-actions__btns {
	display: flex;
	align-items: center;
	gap: 12px;
	height: 40px;
}

.lp-app .lp-workspace-toolbar .lp-select,
.lp-app .lp-workspace-toolbar .lp-button {
	height: 40px !important;
	min-height: 40px !important;
	max-height: 40px !important;
	box-sizing: border-box !important;
	margin: 0 !important;
	line-height: 1 !important;
}

.lp-app .lp-workspace-toolbar .lp-select {
	padding-top: 0 !important;
	padding-bottom: 0 !important;
	padding-left: 12px;
	padding-right: 34px;
	appearance: none;
	-webkit-appearance: none;
}

.lp-app .lp-workspace-toolbar .lp-button {
	display: inline-flex !important;
	align-items: center;
	justify-content: center;
	padding-left: 16px !important;
	padding-right: 16px !important;
	transform: none !important;
}

.lp-app .lp-workspace-toolbar .lp-button:hover {
	transform: none !important;
}

/* Capture header (Drivers / Ingreso): misma alineacion selects + botones */
.lp-app .lp-capture-header {
	display: flex;
	align-items: flex-end;
	justify-content: space-between;
	gap: 18px;
	flex-wrap: wrap;
}

.lp-app .lp-capture-header > .lp-form-grid {
	flex: 1 1 420px;
	min-width: 0;
	align-items: end;
}

.lp-app .lp-capture-header .lp-field {
	display: flex;
	flex-direction: column;
	min-width: 0;
	margin: 0;
}

.lp-app .lp-capture-header .lp-field > .lp-label {
	display: block;
	height: 18px;
	margin: 0 0 6px;
	padding: 0;
	font-size: 12px;
	font-weight: 700;
	line-height: 18px;
	overflow: hidden;
	white-space: nowrap;
}

.lp-app .lp-capture-header > .lp-page-actions {
	display: flex;
	align-items: center;
	justify-content: flex-end;
	flex: 0 0 auto;
	align-self: flex-end;
	gap: 10px;
	height: 40px;
	margin: 0;
	padding: 0;
}

.lp-app .lp-capture-header .lp-select,
.lp-app .lp-capture-header .lp-button {
	height: 40px !important;
	min-height: 40px !important;
	max-height: 40px !important;
	box-sizing: border-box !important;
	margin: 0 !important;
	line-height: 1 !important;
}

.lp-app .lp-capture-header .lp-select {
	padding-top: 0 !important;
	padding-bottom: 0 !important;
	padding-left: 12px;
	padding-right: 34px;
	appearance: none;
	-webkit-appearance: none;
}

.lp-app .lp-capture-header .lp-button {
	display: inline-flex !important;
	align-items: center;
	justify-content: center;
	padding-left: 16px !important;
	padding-right: 16px !important;
	transform: none !important;
}

.lp-app .lp-capture-header .lp-button:hover {
	transform: none !important;
}

/* =================== Consolidado LP (shell; colores fase en app.css) =================== */
.lp-app .lp-cons-body {
	padding: 0;
}

.lp-app #cp-cons-results-card .lp-card__header--tabs {
	gap: 12px;
	flex-wrap: wrap;
}

.lp-app #cp-cons-header-actions {
	flex-wrap: wrap;
	gap: 10px 14px;
}

.lp-app #cp-cons-filters.lp-matrix-toolbar {
	padding-top: 0;
}

.lp-app #cp-cons-table-shell,
.lp-app #cp-cons-areas-shell {
	width: 100%;
	max-width: 100%;
	overflow: auto;
}

.lp-app #cp-cons-table-shell #cp-cons-table-wrap,
.lp-app #cp-cons-table-shell #cp-cons-tabulator {
	width: 100%;
	max-width: 100%;
	box-sizing: border-box;
}

.lp-app #cp-cons-table-shell .tabulator,
.lp-app #cp-cons-areas-shell .tabulator {
	border: 0;
	background: transparent;
	font-family: inherit;
	width: 100% !important;
}

.lp-app #cp-cons-table-shell #cp-cons-tabulator,
.lp-app #cp-cons-areas-shell .tabulator {
	border: 0;
	border-radius: 0;
	overflow: hidden;
	background: transparent;
}

.lp-app #cp-cons-table-shell .tabulator-tableholder,
.lp-app #cp-cons-table-shell .tabulator-header {
	width: 100% !important;
}

.lp-app #cp-cons-table-shell .tabulator-cell {
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.lp-app #cp-cons-table-shell .tabulator-header,
.lp-app #cp-cons-areas-shell .tabulator-header {
	background: #f7f9fb;
	border-bottom: 1px solid var(--lp-border);
}

.lp-app #cp-cons-table-shell .tabulator-col,
.lp-app #cp-cons-areas-shell .tabulator-col {
	background: #f7f9fb;
	border-right: 1px solid var(--lp-border);
	color: #536071;
	font-size: 10px;
	font-weight: 800;
	text-transform: uppercase;
}

.lp-app #cp-cons-table-shell .tabulator-row,
.lp-app #cp-cons-areas-shell .tabulator-row {
	/* No forzar altura: Tabulator calcula 32px en celdas; min-height dejaba franja blanca */
	min-height: 0;
	border-bottom: 1px solid var(--lp-border);
	background: transparent;
}

.lp-app #cp-cons-table-shell .tabulator-row:hover,
.lp-app #cp-cons-areas-shell .tabulator-row:hover {
	background: #f8fbfd;
}

.lp-app #cp-cons-table-shell .tabulator-cell,
.lp-app #cp-cons-areas-shell .tabulator-cell {
	border-right: 1px solid var(--lp-border);
	padding: 6px 8px;
	font-size: 12px;
	box-sizing: border-box;
}

.lp-app #cp-cons-table-shell .tabulator-col-resize-handle,
.lp-app #cp-cons-areas-shell .tabulator-col-resize-handle {
	background: transparent;
}

/* Fila completa (celda + handles) con el mismo fondo de grupo */
.lp-app #cp-cons-table-shell .tabulator-tree-level-0,
.lp-app #cp-cons-table-shell .tabulator-tree-level-0 .tabulator-cell,
.lp-app #cp-cons-table-shell .tabulator-tree-level-0 .tabulator-col-resize-handle {
	background: #eaf5fa !important;
}

.lp-app #cp-cons-table-shell .tabulator-tree-level-0 .tabulator-cell {
	font-weight: 800;
	color: var(--lp-text-strong);
}

.lp-app #cp-cons-table-shell .tabulator-tree-level-1,
.lp-app #cp-cons-table-shell .tabulator-tree-level-1 .tabulator-cell,
.lp-app #cp-cons-table-shell .tabulator-tree-level-1 .tabulator-col-resize-handle {
	background: #f5f9fb !important;
}

.lp-app #cp-cons-table-shell .tabulator-tree-level-1 .tabulator-cell {
	font-weight: 700;
}

.lp-app #cp-cons-table-shell .tabulator-tree-level-0:hover,
.lp-app #cp-cons-table-shell .tabulator-tree-level-0:hover .tabulator-cell,
.lp-app #cp-cons-table-shell .tabulator-tree-level-0:hover .tabulator-col-resize-handle {
	background: #dceef6 !important;
}

.lp-app #cp-cons-table-shell .tabulator-tree-level-1:hover,
.lp-app #cp-cons-table-shell .tabulator-tree-level-1:hover .tabulator-cell,
.lp-app #cp-cons-table-shell .tabulator-tree-level-1:hover .tabulator-col-resize-handle {
	background: #ebf4f8 !important;
}

/* Colores .cp-cons-estimado|real|forecast y drivers: solo en app.css */

body > #cp-cons-export-modal.lp-modal-backdrop {
	z-index: 1100;
}

/* =================== Ingreso presupuesto LP (sin zoom) =================== */
/* Fondo gris entre paneles blancos (no heredar superficie blanca del card-body). */
.lp-app .card-body.lp-ip-body,
.lp-app .lp-ip-body {
	padding: 0;
	background: transparent !important;
	background-color: transparent !important;
}

.lp-app #cp-ip-results-card {
	margin-top: 16px;
}

.lp-app .lp-ip-body > .lp-card + .lp-card {
	margin-top: 16px;
}

.lp-app #cp-ip-grid-wrap .cp-ip-grid-scroll.lp-matrix-shell {
	width: 100%;
	max-height: 698px;
}

.lp-app #cp-ip-grid-wrap .cp-ip-grid-shell {
	align-items: center;
	width: 100%;
}

.lp-app #cp-ip-grid-wrap .cp-ip-grid-nav {
	align-self: center;
	position: relative;
	top: auto;
}

.lp-app #cp-ip-tabs.lp-tabs {
	display: flex;
	flex-wrap: wrap;
	width: 100%;
}

.lp-app #cp-ip-tabs .lp-tab.disabled,
.lp-app #cp-ip-tabs .lp-tab[aria-disabled="true"] {
	opacity: 0.45;
	cursor: not-allowed;
}

.lp-app #cp-ip-tabs .lp-tab--forecast.is-active {
	color: #2E7D32;
	border-bottom-color: #2E7D32;
}

.lp-app #cp-ip-info.lp-capture-meta {
	margin-top: 0;
	margin-left: 0;
	width: 100%;
	box-sizing: border-box;
	justify-content: flex-start;
}

body > #cp-ip-import-modal.lp-modal-backdrop {
	z-index: 1100;
}

body > #cp-ip-import-modal .lp-dropzone.is-dragover {
	border-color: var(--lp-primary, #007db5);
	background: var(--lp-info-soft, #eaf5fa);
}

body > #cp-ip-import-modal .lp-modal__body {
	overflow-y: auto;
}

body > #cp-ip-import-modal .cp-ip-import-progress .progress {
	height: 8px;
	border-radius: 999px;
	background: var(--lp-surface-muted, #eef2f6);
	overflow: hidden;
}

body > #cp-ip-import-modal .cp-ip-import-progress .progress-bar {
	background: var(--lp-primary, #007db5);
}

/* ===== Informe + barra import (cuentas y drivers) ===== */
.cp-import-progress {
	margin: 12px 0 4px;
	padding: 12px 14px;
	border: 1px solid var(--lp-border, #d7e0e8);
	border-radius: 10px;
	background: var(--lp-surface, #fff);
}

.cp-import-progress__row {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 12px;
	margin-bottom: 8px;
}

.cp-import-progress__label {
	font-size: 0.875rem;
	color: var(--lp-text-muted, #5b6b7c);
	min-width: 0;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.cp-import-progress__pct {
	font-size: 0.875rem;
	font-weight: 700;
	color: var(--lp-primary-700, #086494);
	flex-shrink: 0;
}

.cp-import-progress__track {
	height: 8px;
	border-radius: 999px;
	background: var(--lp-primary-100, #d9f1f8);
	overflow: hidden;
}

.cp-import-progress__fill {
	height: 100%;
	width: 0;
	border-radius: 999px;
	background: var(--lp-primary, #007db5);
	transition: width 0.28s ease;
	/* un solo color, sin rayas ni animacion multicolor */
}

.cp-ip-import-result {
	margin-top: 12px;
	max-height: min(58vh, 520px);
	overflow: auto;
}

.cp-ip-import-summary {
	border: 1px solid var(--lp-border, #d7e0e8);
	border-radius: 12px;
	background: var(--lp-surface, #fff);
	overflow: hidden;
}

.cp-ip-import-head {
	display: flex;
	justify-content: space-between;
	align-items: flex-start;
	gap: 12px;
	padding: 14px 16px;
	border-bottom: 1px solid var(--lp-border, #d7e0e8);
	background: var(--lp-primary-50, #eff9fc);
}

.cp-ip-import-head--warn {
	background: #fff8ef;
}

.cp-ip-import-head--ok {
	background: var(--lp-primary-50, #eff9fc);
}

.cp-ip-import-head-main {
	display: flex;
	gap: 10px;
	align-items: flex-start;
	min-width: 0;
}

.cp-ip-import-status-dot {
	width: 10px;
	height: 10px;
	margin-top: 6px;
	border-radius: 50%;
	background: var(--lp-primary, #007db5);
	flex-shrink: 0;
}

.cp-ip-import-head--warn .cp-ip-import-status-dot {
	background: #c47f17;
}

.cp-ip-import-title {
	font-size: 1rem;
	font-weight: 700;
	color: var(--lp-text-strong, #1b2834);
}

.cp-ip-import-meta {
	margin-top: 4px;
	font-size: 0.8rem;
	color: var(--lp-text-muted, #5b6b7c);
	line-height: 1.45;
}

.cp-ip-import-ok-badge {
	flex-shrink: 0;
	padding: 4px 10px;
	border-radius: 999px;
	font-size: 0.75rem;
	font-weight: 700;
	color: var(--lp-primary-700, #086494);
	background: var(--lp-primary-100, #d9f1f8);
}

.cp-ip-import-head--warn .cp-ip-import-ok-badge {
	color: #8a5a10;
	background: #fdecc8;
}

.cp-ip-import-body {
	padding: 12px 16px 16px;
}

.cp-ip-import-metrics {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
	gap: 8px;
	margin-bottom: 14px;
}

.cp-ip-import-metric {
	padding: 10px 10px 8px;
	border-radius: 10px;
	border: 1px solid var(--lp-border, #d7e0e8);
	background: #f8fbfd;
	text-align: center;
}

.cp-ip-import-metric-val {
	display: block;
	font-size: 1.15rem;
	font-weight: 800;
	color: var(--lp-primary-700, #086494);
	line-height: 1.2;
}

.cp-ip-import-metric-lbl {
	display: block;
	margin-top: 2px;
	font-size: 0.72rem;
	color: var(--lp-text-muted, #5b6b7c);
	line-height: 1.25;
}

.cp-ip-import-section {
	margin-top: 14px;
	padding-top: 12px;
	border-top: 1px solid var(--lp-border, #e6edf3);
}

.cp-ip-import-section:first-of-type {
	border-top: 0;
	padding-top: 0;
}

.cp-ip-import-section-title {
	display: flex;
	align-items: center;
	gap: 8px;
	font-size: 0.9rem;
	font-weight: 700;
	color: var(--lp-text-strong, #1b2834);
	margin-bottom: 6px;
}

.cp-ip-import-count {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 1.4rem;
	padding: 0 6px;
	height: 1.25rem;
	border-radius: 999px;
	font-size: 0.7rem;
	font-weight: 700;
	color: var(--lp-primary-700, #086494);
	background: var(--lp-primary-100, #d9f1f8);
}

.cp-ip-import-section--warn .cp-ip-import-count {
	color: #8a5a10;
	background: #fdecc8;
}

.cp-ip-import-hint {
	margin: 0 0 8px;
	font-size: 0.8rem;
	color: var(--lp-text-muted, #5b6b7c);
	line-height: 1.4;
}

.cp-ip-import-chips {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
}

.cp-ip-import-chip {
	display: inline-block;
	padding: 3px 8px;
	border-radius: 6px;
	font-size: 0.75rem;
	background: var(--lp-primary-50, #eff9fc);
	color: var(--lp-primary-800, #0c5278);
	border: 1px solid var(--lp-primary-100, #d9f1f8);
}

.cp-ip-import-chip--omit,
.cp-ip-import-chip--miss {
	background: #fff8ef;
	border-color: #f5e0c0;
	color: #8a5a10;
}

.cp-ip-import-empty {
	font-size: 0.8rem;
	color: var(--lp-text-muted, #5b6b7c);
	font-style: italic;
}

.cp-ip-import-detail-list {
	margin: 6px 0 4px;
	padding: 0 0 0 1.1rem;
	font-size: 0.82rem;
	line-height: 1.4;
	max-height: 200px;
	overflow: auto;
	color: var(--lp-text, #2c3a47);
}

.cp-ip-import-detail-list li {
	margin-bottom: 4px;
}

.cp-ip-import-sec {
	margin: 0 0 10px;
	padding: 10px 12px;
	border-radius: 8px;
	border: 1px solid var(--lp-border, #e6edf3);
	background: #fafcfd;
}

.cp-ip-import-sec.cp-ip-import-section--warn,
.cp-ip-import-section--warn .cp-ip-import-sec {
	background: #fffaf3;
	border-color: #f0e0c4;
}

.cp-ip-import-sec-head {
	font-size: 0.85rem;
	line-height: 1.4;
}

.cp-ip-import-sec-head strong {
	color: var(--lp-text-strong, #1b2834);
}

.cp-ip-import-pill {
	display: inline-block;
	margin-left: 6px;
	padding: 1px 7px;
	border-radius: 999px;
	font-size: 0.7rem;
	font-weight: 700;
	background: var(--lp-primary-100, #d9f1f8);
	color: var(--lp-primary-700, #086494);
	vertical-align: middle;
}

.cp-ip-import-pill--warn {
	background: #fdecc8;
	color: #8a5a10;
}

.cp-ip-import-pill--ok {
	background: #e4f5ea;
	color: #1f6b3a;
}

.lp-app #cp-ip-filters.lp-matrix-toolbar {
	padding-top: 4px;
}

.lp-app #cp-table-ip.lp-matrix {
	min-width: 1200px;
	border-collapse: separate;
}

.lp-app #cp-table-ip.lp-matrix th,
.lp-app #cp-table-ip.lp-matrix td {
	border-right: 1px solid var(--lp-border);
	border-bottom: 1px solid var(--lp-border);
}

.lp-app #cp-table-ip .cp-ip-row-clase td {
	background: #eaf5fa !important;
	font-weight: 800;
	color: var(--lp-text-strong);
}

.lp-app #cp-table-ip .cp-ip-row-categoria td {
	background: #f5f9fb !important;
	font-weight: 700;
}

/* Preservar colores estimado / real / forecast (app.css) */
.lp-app #cp-table-ip .cp-ip-estimado-value,
.lp-app #cp-table-ip input.cp-ip-estimado-value {
	color: #8540F5 !important;
}

.lp-app #cp-table-ip .cp-ip-real-value,
.lp-app #cp-table-ip input.cp-ip-real-value {
	color: #FF4D4F !important;
}

.lp-app #cp-table-ip .cp-ip-forecast-value,
.lp-app #cp-table-ip input.cp-ip-forecast-value {
	color: #2E7D32 !important;
}

.lp-app .cp-ip-actions-bar.lp-sticky-actions {
	margin-top: 14px;
	justify-content: space-between;
}

.lp-app .cp-ip-actions-end {
	margin-left: auto;
	justify-content: flex-end;
	flex-wrap: wrap;
}

.lp-app #cp-ip-zero.is-active {
	background: var(--lp-danger-soft, #fff0f2);
	border-color: var(--lp-danger, #c43b4d);
	color: var(--lp-danger, #c43b4d);
}

.lp-app #cp-ip-save-state.is-dirty {
	color: var(--lp-warning, #b76b00);
}

.lp-app #cp-ip-save-state.is-locked {
	color: var(--lp-text-muted);
}

/* Ocultar FABs legacy si quedaron en DOM */
.cp-ip-save-fab,
.cp-ip-close-fab,
.cp-ip-zero-fab,
#cp-ip-save-fab,
#cp-ip-close-fab,
#cp-ip-zero-fab {
	display: none !important;
}

.lp-app .cp-ip-grid-nav-btn {
	border-radius: 10px;
}

/* Asignar gerencias: busqueda con icono centrado en el input */
body > .lp-modal-backdrop .cp-usuario-gerencias-search-wrap,
#cp-modals-container .cp-usuario-gerencias-search-wrap,
.lp-app .cp-usuario-gerencias-search-wrap {
	display: block;
	position: relative;
	width: 100%;
	margin-bottom: 12px;
}

body > .lp-modal-backdrop .cp-usuario-gerencias-search-wrap .lp-icon,
#cp-modals-container .cp-usuario-gerencias-search-wrap .lp-icon,
.lp-app .cp-usuario-gerencias-search-wrap .lp-icon {
	position: absolute;
	top: 50%;
	left: 12px;
	width: 18px;
	height: 18px;
	margin: 0;
	transform: translateY(-50%);
	pointer-events: none;
	z-index: 1;
	color: var(--lp-text-subtle, #7d8794);
}

body > .lp-modal-backdrop .cp-usuario-gerencias-search-wrap .lp-input,
#cp-modals-container .cp-usuario-gerencias-search-wrap .lp-input,
.lp-app .cp-usuario-gerencias-search-wrap .lp-input {
	width: 100%;
	margin: 0;
	padding-left: 40px;
	box-sizing: border-box;
}

/* Asignar gerencias: switch en gerencia, checks en centros */
.lp-app .cp-gerencia-main-header {
	display: flex;
	align-items: center;
}

.lp-app .cp-gerencia-main-switch {
	width: 100%;
	justify-content: flex-start;
	gap: 10px;
	font-size: 14px;
	font-weight: 700;
	color: var(--lp-text-strong);
	cursor: pointer;
}

.lp-app .cp-gerencia-main-switch .cp-gerencia-main-label {
	font-weight: 700;
	color: var(--lp-text-strong);
}

.lp-app .cp-gerencia-main-switch input.cp-gerencia-main-check {
	position: absolute;
	opacity: 0;
	width: 1px;
	height: 1px;
	margin: 0;
}

.lp-app .cp-usuario-gerencia-item .cp-gerencia-cc-container {
	margin-left: 44px;
	margin-top: 10px;
	padding-left: 12px;
	border-left: 2px solid var(--lp-border);
}

/* =================== Drivers LP =================== */
.lp-app .lp-drv-body {
	background: transparent;
}

.lp-app #cp-drv-tabs-host,
.lp-app #cp-drivers-main > .lp-card {
	margin-bottom: 16px;
}

/* Shell de matriz: chrome LP sin pisar colores cp-cad-* / app.css */
.lp-app .lp-matrix.lp-matrix--drivers {
	min-width: 1480px;
	border-collapse: separate;
	border-spacing: 0;
	font-size: 12px;
}

.lp-app .lp-matrix.lp-matrix--drivers th,
.lp-app .lp-matrix.lp-matrix--drivers td {
	min-width: unset;
	height: auto;
	text-transform: none;
	font-weight: inherit;
	font-size: inherit;
	text-align: inherit;
	border-right: 1px solid var(--lp-border);
	border-bottom: 1px solid var(--lp-border);
}

/* Solo chrome de thead; fondos de tbody los define app.css (.cp-cad-*) */
.lp-app .lp-matrix.lp-matrix--drivers thead th {
	position: sticky;
	top: 0;
	z-index: 5;
	background: #f7f9fb;
	color: #536071;
	font-size: 10px;
	font-weight: 800;
	text-align: center;
	text-transform: uppercase;
	letter-spacing: 0.02em;
	height: 42px;
	padding: 6px 8px;
}

.lp-app .lp-matrix.lp-matrix--drivers thead th.lp-matrix__sticky,
.lp-app .lp-matrix.lp-matrix--drivers thead th.sticky-col {
	z-index: 8;
	background: #f7f9fb;
}

.lp-app .lp-matrix.lp-matrix--drivers td.lp-matrix__sticky,
.lp-app .lp-matrix.lp-matrix--drivers td.sticky-col {
	position: sticky;
	z-index: 3;
	box-shadow: 8px 0 12px rgba(16, 24, 40, 0.035);
}

.lp-app .lp-matrix.lp-matrix--drivers th.cp-cad-row-num-col.lp-matrix__sticky,
.lp-app .lp-matrix.lp-matrix--drivers td.cp-cad-row-num.lp-matrix__sticky {
	left: 0;
	z-index: 4;
	min-width: 40px;
	width: 40px;
}

.lp-app .lp-matrix.lp-matrix--drivers th.cp-cad-driver-col-h.lp-matrix__sticky,
.lp-app .lp-matrix.lp-matrix--drivers td.cp-cad-driver-col.lp-matrix__sticky {
	left: 40px;
	min-width: 260px;
	text-align: left;
}

/* Inputs: forma maqueta; color de valor intacto (app.css) */
.lp-app .lp-matrix.lp-matrix--drivers .cp-cad-val.form-control {
	min-height: 32px;
	height: 32px;
	padding: 5px 7px;
	border: 1px solid #ccd8e3;
	border-radius: 7px;
	box-shadow: none;
}

.lp-app .lp-matrix.lp-matrix--drivers .cp-cad-val.form-control:focus {
	border-color: var(--lp-primary);
	box-shadow: 0 0 0 3px rgba(0, 125, 181, 0.12);
}

.lp-app .cp-drv-cadena-matriz-scroll.lp-matrix-shell {
	max-height: 620px;
	border: 1px solid var(--lp-border);
	border-radius: 12px;
	background: #fff;
}

.lp-app .cp-drv-cadena-toolbar.lp-sticky-actions {
	justify-content: space-between;
	flex-direction: row;
	flex-wrap: wrap;
}

.lp-app #cp-drv-cad-work .cp-drv-cadena-toolbar.lp-sticky-actions {
	display: flex;
	align-items: center;
	gap: 14px;
	width: 100%;
	border-top: 0;
	padding-top: 12px;
}

.lp-app #cp-drv-cad-save-state {
	flex: 1 1 auto;
	min-width: 0;
}

.lp-app #cp-drv-cad-save-state.is-dirty {
	color: var(--lp-warning, #b76b00);
}

.lp-app #cp-drv-cad-save-state.is-locked {
	color: var(--lp-text-muted);
}

.lp-app .cp-drv-cadena-toolbar-capture.lp-page-actions {
	margin-left: auto;
	flex: 0 0 auto;
	flex-direction: row;
	justify-content: flex-end;
	gap: 10px;
}

.lp-app #cp-drv-cad-captura-tabs.lp-tabs {
	flex-wrap: wrap;
	width: 100%;
}

.lp-app #cp-drv-cad-captura-tabs .lp-tab.cp-drv-cad-tab-plus {
	color: var(--lp-primary-700);
	font-size: 18px;
	font-weight: 800;
}

/* Admin: solo chrome; la grilla gigante conserva estilos/colores propios */
.lp-app .cp-drv-admin-toolbar {
	align-items: center;
}

.lp-app .cp-drv-admin-toolbar .lp-filter-actions,
.lp-app .cp-drv-admin-toolbar .lp-page-actions {
	margin-left: auto;
	justify-content: flex-end;
	flex-wrap: wrap;
	gap: 10px;
}

.lp-app .cp-drv-admin-toolbar .lp-button {
	width: auto !important;
	flex: 0 0 auto;
}

.lp-app .cp-drv-admin-excel-scroll {
	border: 1px solid var(--lp-border);
	border-radius: 12px;
	background: #fff;
	max-height: min(70vh, 720px);
	overflow: auto;
}

/* Evitar hueco blanco en celdas de 1 linea vs filas altas */
.lp-app .cp-drv-admin-excel-grid td.cp-drv-admin-tipo-concept,
.lp-app .cp-drv-admin-excel-grid td.cp-drv-admin-concept-col {
	display: table-cell;
	vertical-align: middle;
}

@media (max-width: 1050px) {
	.lp-app .lp-capture-header {
		align-items: stretch;
		flex-direction: column;
	}

	.lp-app .lp-capture-header > .lp-page-actions {
		width: 100%;
		justify-content: flex-end;
		align-self: stretch;
	}
}



