/* Estados comunes de los listados: pendiente de buscar y sin resultados. */
.nexus-list-empty {
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    min-height: 320px;
    width: 100%;
    padding: 48px 24px;
    text-align: center;
    letter-spacing: 0;
}

.nexus-list-empty .nexus-list-empty-icon {
    display: block;
    width: auto;
    height: auto;
    margin-bottom: 4px;
    color: #00a3bf;
    font-size: 36px;
    line-height: 1.2;
}

.nexus-list-empty .nexus-list-empty-title {
    margin: 0;
    color: #172e46;
    font-size: 20px;
    font-weight: 700;
    line-height: 1.35;
}

.nexus-list-empty .nexus-list-empty-description {
    max-width: 760px;
    margin: 0;
    color: #697b8d;
    font-size: 15px;
    line-height: 1.6;
    overflow-wrap: anywhere;
}

#program-body .scroll-container:has(.nexus-list-empty) {
    height: auto;
    min-width: 0;
    overflow: visible;
}

#program-body:has(.nexus-list-empty):not(:has(.registro)) > .leyenda,
#program-body .leyenda:has(+ .scroll-container .nexus-list-empty) {
    display: none;
}

@media (max-width: 600px) {
    .nexus-list-empty { min-height: 240px; padding: 32px 16px; }
    .nexus-list-empty .nexus-list-empty-title { font-size: 18px; }
    .nexus-list-empty .nexus-list-empty-description { font-size: 14px; }
}

@media print {
    .nexus-list-empty { min-height: 0; padding: 20px 0; }
    .nexus-list-empty .nexus-list-empty-icon { display: none; }
}

/* Iconografía Font Awesome */
.fa,
.fas,
.fa-solid {
	font-family: "Font Awesome 6 Pro";
	font-style: normal;
	font-weight: 900;
}

.far,
.fa-regular {
	font-family: "Font Awesome 6 Pro";
	font-style: normal;
	font-weight: 400;
}

.fal,
.fa-light {
	font-family: "Font Awesome 6 Pro";
	font-style: normal;
	font-weight: 300;
}

.fat,
.fa-thin {
	font-family: "Font Awesome 6 Pro";
	font-style: normal;
	font-weight: 100;
}

.fab,
.fa-brands {
	font-family: "Font Awesome 6 Brands";
	font-style: normal;
	font-weight: 400;
}

/* Finders y áreas de resultados: interfaz moderna compartida. */
#program-body-finder,
#program-body,
.program-body {
	box-sizing: border-box;
	width: calc(100% - 40px);
	max-width: 1880px;
	margin-right: auto;
	margin-left: auto;
}

#program-body-finder {
	margin-top: 0;
	margin-bottom: 0;
	padding: 10px 0 14px;
	background: transparent;
	border: 0;
	border-radius: 0;
	box-shadow: none;
}

#program-body-finder .title {
	display: flex;
	align-items: center;
	min-height: 53px;
	gap: 12px;
	margin: 0;
	padding: 0;
	overflow: visible;
	color: #142b43;
	font-size: 24px;
	font-weight: 700;
	letter-spacing: -.4px;
	line-height: 1.15;
}

#program-body-finder .title > .fleft:first-child {
	min-width: 0;
	margin-right: auto;
}

#program-body-finder .finder-title-icon {
	margin-right: 10px;
	color: #079fbe;
	font-size: .82em;
	vertical-align: 1px;
}

#program-body-finder .title > .fleft,
#program-body-finder .title > .fright {
	float: none !important;
}

#program-body-finder .title .button-circle {
	box-sizing: border-box;
	width: 38px;
	height: 37px;
	min-width: 38px;
	margin: 0 !important;
	padding: 0;
	border: 1px solid #d6e2e9;
	border-radius: 9px;
	background: #ffffff;
	box-shadow: none;
	color: #079fbe;
	font-size: 17px;
	text-decoration: none;
}

#program-body-finder .title .button-circle:hover,
#program-body-finder .title .button-circle:focus {
	border-color: #079fbe;
	background: #f0fbfd;
	color: #078ca7;
}

#program-body-finder .title .button-circle i {
	color: currentColor;
}

/* Mantener la acción de búsqueda al extremo derecho en todos los listados. */
#program-body-finder .title #submitfinder,
#program-body-finder .title #projects-search {
	order: 99;
}

#program-body-finder .title .nexus-modern-back-action {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	box-sizing: border-box;
	width: 38px;
	height: 37px;
	min-width: 38px;
	margin-left: 0;
	order: 1;
	padding: 0;
	border: 1px solid #d6e2e9;
	border-radius: 9px;
	background: #ffffff;
	color: #079fbe;
	font-size: 17px;
	line-height: 1;
	text-decoration: none;
}

/* Bloque a la derecha: acciones compactas primero y principales juntas al final. */
#program-body-finder .title > .nexus-modern-back-action {
	margin-left: auto;
}

#program-body-finder .title .nexus-finder-header-actions {
	display: flex;
	align-items: center;
	justify-content: flex-end;
	flex-wrap: wrap;
	gap: 10px;
	min-width: 0;
	margin-left: auto;
}

#program-body-finder .nexus-finder-header-actions .nexus-record-header-actions {
	display: contents;
}

#program-body-finder .nexus-finder-header-actions > *,
#program-body-finder .nexus-finder-header-actions .nexus-record-header-actions > * {
	order: 2;
	margin-left: 0;
}

#program-body-finder .nexus-finder-header-actions .button-circle,
#program-body-finder .nexus-finder-header-actions .nexus-modern-back-action {
	order: 1;
}

#program-body-finder .title .nexus-modern-back-action:hover,
#program-body-finder .title .nexus-modern-back-action:focus {
	border-color: #079fbe;
	background: #f0fbfd;
	color: #078ca7;
	outline: 0;
}

/* Botones de acción del contenido y de las cabeceras */
:where(#program-body) button {
	box-sizing: border-box;
	border-radius: 5px;
	font-family: inherit;
	cursor: pointer;
}

.nexus-action-button,
:where(#program-body) button:not([class]) {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 7px;
	box-sizing: border-box;
	min-height: 37px;
	padding: 0 14px;
	border: 1px solid #1686a4;
	border-radius: 5px;
	background: #1686a4;
	color: #ffffff;
	font-family: inherit;
	font-size: 13px;
	font-weight: 700;
	line-height: 1.2;
	cursor: pointer;
	transition: background-color .15s ease, border-color .15s ease;
}

.inputfile + label.nexus-action-button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 7px;
	box-sizing: border-box;
	min-height: 37px;
	padding: 0 14px;
	border: 1px solid #1686a4;
	border-radius: 5px;
	background: #1686a4;
	color: #ffffff;
	font-size: 13px;
	font-weight: 700;
	line-height: 1.2;
	cursor: pointer;
}

.inputfile + label.nexus-action-button:hover,
.inputfile:focus + label.nexus-action-button {
	border-color: #116d86;
	background: #116d86;
	color: #ffffff;
}

.nexus-action-button:hover,
.nexus-action-button:focus,
:where(#program-body) button:not([class]):hover,
:where(#program-body) button:not([class]):focus {
	border-color: #116d86;
	background: #116d86;
	color: #ffffff;
}

.nexus-action-button i,
.nexus-action-button span[class*="fa-"],
:where(#program-body) button:not([class]) i {
	color: currentColor;
}

/* Variante compacta de las acciones corporativas que solo muestran un icono. */
.nexus-action-button.nexus-action-icon { width: 37px; min-width: 37px; padding: 0; flex-shrink: 0; }
.nexus-form-header-submit { margin-left: 10px; white-space: nowrap; }

.nexus-action-button:disabled,
:where(#program-body) button:not([class]):disabled {
	opacity: .55;
	cursor: not-allowed;
}

/* Barras de acciones de las pantallas de impresión. */
.print-bar {
    box-sizing: border-box;
    width: calc(100% - 40px);
    max-width: 956px;
    margin: 30px auto 0;
    padding: 20px;
    background: #ffffff;
}
.print-bar > .wrapper {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    overflow: visible;
}
.print-bar .nexus-action-button {
    flex: 0 0 auto;
    text-decoration: none;
    white-space: nowrap;
}
.print-bar .return-print {
    margin-right: auto;
    background: #ffffff;
    color: #1686a4;
}
.print-bar .return-print:hover,
.print-bar .return-print:focus {
    border-color: #116d86;
    background: #f4f8fa;
    color: #116d86;
}
.print-bar .nexus-action-button:focus-visible {
    outline: 2px solid #116d86;
    outline-offset: 3px;
}
/* Ventana de envío por email de las pantallas de impresión (mismo estilo que el menú de pagos). */
.nexus-mail-modal[hidden] { display: none; }
.nexus-mail-modal { position: fixed; inset: 0; z-index: 1000; display: flex; align-items: center; justify-content: center; padding: 16px; box-sizing: border-box; }
.nexus-mail-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,.45); }
.nexus-mail-dialog {
    position: relative; box-sizing: border-box; width: min(480px, 100%); max-height: calc(100vh - 32px); overflow: auto;
    border: 1px solid #d6e2e9; border-radius: 8px; background: #fff; color: #333; box-shadow: 0 12px 40px rgba(20,43,67,.25);
}
.nexus-mail-header { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 20px; border-bottom: 1px solid #e6edf1; background: #f8fafb; }
.nexus-mail-header h2 { margin: 0; color: #23758a; font-size: 18px; font-weight: 700; }
.nexus-mail-close {
    display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; padding: 0;
    border: 1px solid #d6e2e9; border-radius: 4px; background: #fff; color: #333; font-size: 16px; cursor: pointer;
}
.nexus-mail-close:hover, .nexus-mail-close:focus-visible { border-color: #1686a4; color: #1686a4; }
.nexus-mail-body { display: grid; gap: 14px; padding: 20px; }
.nexus-mail-field { display: grid; gap: 6px; margin: 0; }
.nexus-mail-field > span { color: #23758a; font-size: 11px; font-weight: 700; letter-spacing: .04em; }
.nexus-mail-field input, .nexus-mail-field textarea {
    box-sizing: border-box; width: 100%; margin: 0; padding: 8px 10px; border: 1px solid #d6e2e9; border-radius: 4px;
    background: #fff; color: #333; font: inherit; font-size: 13px;
}
.nexus-mail-field input { height: 36px; }
.nexus-mail-field textarea { min-height: 110px; resize: vertical; }
.nexus-mail-field input:focus, .nexus-mail-field textarea:focus { outline: none; border-color: #1686a4; box-shadow: 0 0 0 2px rgba(22,134,164,.15); }
.nexus-mail-footer { display: flex; justify-content: flex-end; gap: 10px; padding: 12px 20px; border-top: 1px solid #e6edf1; background: #f8fafb; }
.nexus-mail-footer .nexus-mail-cancel { background: #fff; color: #1686a4; }
.nexus-mail-footer .nexus-mail-cancel:hover, .nexus-mail-footer .nexus-mail-cancel:focus { background: #f4f8fa; color: #116d86; }
@media print { .nexus-mail-modal { display: none !important; } }
.print-bar #download_invoices {
    display: none;
}

/* Menú copiar presupuesto: diálogo ancho con cabecera y pie diferenciados. */
#form-copy.budget-copy-overlay {
	display: none !important;
	position: fixed !important;
	inset: 0 !important;
	top: 0 !important;
	left: 0 !important;
	transform: none !important;
	z-index: 10000 !important;
	width: 100% !important;
	height: 100% !important;
	margin: 0;
	padding: 24px;
	overflow-y: auto;
	border: 0;
	border-radius: 0;
	background: rgba(20, 43, 67, .45);
	box-sizing: border-box;
}
body #form-copy.budget-copy-overlay:not(.nv) { display: flex !important; align-items: center; justify-content: center; }
body #form-copy.budget-copy-overlay.nv { display: none !important; }
body #form-copy.budget-copy-overlay:not(.nv) ~ .overlay { display: none !important; }
#form-copy > form {
	display: flex;
	flex: 0 1 680px;
	width: min(680px, 100%);
	min-width: 0;
	margin: auto;
}
#form-copy .budget-copy-dialog {
	position: relative !important;
	top: auto !important;
	left: auto !important;
	transform: none !important;
	flex: 0 1 680px;
	width: min(680px, 100%) !important;
	max-width: 680px;
	min-width: 0;
	margin: auto;
	border: 1px solid #e1e9ed;
	border-radius: 8px;
	background: #fff;
	box-shadow: 0 12px 40px rgba(20, 43, 67, .25);
	color: #333;
}
#form-copy .budget-copy-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	padding: 18px 24px;
	border-bottom: 1px solid #e6edf1;
	border-radius: 8px 8px 0 0;
	background: #f5f9fa;
}
#form-copy .budget-copy-header h2 {
	margin: 0;
	color: #23758a;
	font-size: 19px;
	font-weight: 700;
}
#form-copy .budget-copy-close {
	position: static;
	flex: 0 0 32px;
}
#form-copy .budget-copy-content {
	padding: 26px 30px;
	text-align: center;
}
#form-copy .budget-copy-content #nombre_cliente { margin-bottom: 12px; }
#form-copy .budget-copy-content label {
	display: block;
	margin-bottom: 8px;
	color: #23758a;
	font-size: 13px;
	font-weight: 700;
}
#form-copy .budget-copy-date { width: min(280px, 100%); margin: 0 auto; }
#form-copy .budget-copy-footer {
	display: flex;
	justify-content: flex-end;
	padding: 16px 24px;
	border-top: 1px solid #e6edf1;
	border-radius: 0 0 8px 8px;
	background: #f5f9fa;
}
#form-copy .budget-copy-footer .nexus-action-button {
	min-height: 36px;
	margin: 0;
	padding: 0 16px;
	gap: 8px;
	border: 0;
	border-radius: 4px;
	font-size: 13px;
	cursor: pointer;
}
#form-copy:not(.nv) ~ .overlay { display: none !important; }
#form-copy .budget-copy-content .input-container { float: none; }
@media (max-width: 650px) {
	#form-copy.budget-copy-overlay { padding: 10px; }
	#form-copy .budget-copy-dialog { flex-basis: 100%; width: 100% !important; max-width: none; margin: auto; }
	#form-copy .budget-copy-header { padding: 16px; }
	#form-copy .budget-copy-content { padding: 22px 16px; }
	#form-copy .budget-copy-footer { padding: 14px 16px; }
}

/* Facturación de albaranes de clientes: acciones y selector. */
#program-body .invoice-delivery-action {
	width: 100px;
	min-width: 100px;
	min-height: 32px;
	height: 32px;
	margin-top: 0;
	padding: 0 7px;
	gap: 6px;
	font-size: 11px;
	white-space: nowrap;
}

#program-body .invoice-delivery-action i {
	font-size: 11px;
}

#form_invoices_client_deliverys.invoice-delivery-overlay {
	display: none;
	position: fixed;
	inset: 0;
	z-index: 1000;
	width: auto;
	height: auto;
	margin: 0;
	padding: 24px;
	overflow-y: auto;
	border-radius: 0;
	background: rgba(20, 43, 67, .45);
	box-sizing: border-box;
}
.invoice-delivery-dialog {
	max-width: 780px;
	margin: 5vh auto;
	padding: 24px;
	border-radius: 8px;
	background: #fff;
	box-shadow: 0 12px 40px rgba(20, 43, 67, .25);
	color: #333;
}
.invoice-delivery-header { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin: -24px -24px 18px; padding: 20px 24px; border-bottom: 1px solid #e6edf1; border-radius: 8px 8px 0 0; background: #f8fafb; }
.invoice-delivery-header h2 { margin: 0 0 6px; color: #23758a; font-size: 20px; font-weight: 700; }
#form_invoices_client_deliverys #nombre_cliente { margin: 0; line-height: 1.5; text-align: left; font-size: 14px; }
.invoice-delivery-header .invoice-delivery-close { box-sizing:border-box; display:flex; align-items:center; justify-content:center; width:32px; min-width:32px; height:32px; min-height:32px; padding:4px; border:1px solid rgba(0,0,0,.18); border-radius:4px; background:#fff; color:#333; font-size:20px; line-height:22px; cursor:pointer; }
.invoice-delivery-header .invoice-delivery-close:hover { background:#f1f5f6; border-color:#9aaeb2; }
#form_invoices_client_deliverys .invoice-delivery-header .invoice-delivery-close { position:static; flex-shrink:0; }
.invoice-delivery-dates { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 18px; margin-bottom: 14px; }
.invoice-delivery-field label { display: block; margin-bottom: 6px; color: #23758a; font-size: 13px; font-weight: 700; }
.invoice-delivery-field input,
.invoice-delivery-field select { box-sizing: border-box; width: 100%; height: 36px; padding: 0 10px; border: 1px solid #d6e2e9; border-radius: 4px; background: #fff; color: #333; font: inherit; font-size: 13px; }
#invoice_delivery_date_help { grid-column: 1 / -1; margin: 0; font-size: 12px; line-height: 1.5; color: #526976; }
.invoice-delivery-help { margin: 0 0 14px; font-size: 12px; line-height: 1.5; color: #526976; }
#invoice_delivery_error { margin-bottom: 12px; padding: 10px; border: 1px solid #edc6c6; border-radius: 5px; color: #9a3030; background: #fff3f3; font-size: 13px; }
.invoice-delivery-table-wrap { max-height: 330px; overflow: auto; border: 1px solid #d5e2e7; border-radius: 7px; }
.invoice-delivery-table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 13px; }
.invoice-delivery-table th { position: sticky; top: 0; z-index: 1; background: #f4f8fa; color: #23758a; text-align: left; }
.invoice-delivery-table th,
.invoice-delivery-table td { padding: 11px 12px; vertical-align: middle; border-bottom: 1px solid #e5eef2; }
.invoice-delivery-table tbody tr:last-child td { border-bottom: 0; }
.invoice-delivery-table tbody tr:hover { background: #f4f8fa; }
.invoice-delivery-table small { display: block; margin-top: 4px; font-size: 11px; color: #687d88; }
.invoice-delivery-table .invoice-delivery-check { width: 24px; text-align: center; }
.invoice-delivery-check input { width: 16px; height: 16px; margin: 0; accent-color: #1686a4; cursor: pointer; }
.invoice-delivery-table .invoice-delivery-amount { text-align: right; white-space: nowrap; }
.invoice-delivery-empty { text-align: center; color: #687d88; }
.invoice-delivery-footer { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px; margin: 18px -24px -24px; padding: 16px 24px; border-top: 1px solid #e6edf1; border-radius: 0 0 8px 8px; background: #f8fafb; }
#invoice_delivery_summary { font-size: 13px; font-weight: 700; color: #23758a; }
.invoice-delivery-actions { display: flex; flex-wrap: wrap; gap: 10px; }

#form_invoices_intervalo_deliverys.invoice-delivery-overlay { display:none; position:fixed; inset:0; z-index:10001; width:100%; height:100%; margin:0; padding:24px; overflow:auto; border:0; border-radius:0; background:rgba(20,43,67,.58); box-sizing:border-box; align-items:center; justify-content:center; }
body #form_invoices_intervalo_deliverys.invoice-delivery-overlay.is-open { display:flex; }
#form_invoices_intervalo_deliverys > .invoice-interval-dialog { display:block; position:relative; width:min(720px, 100%); max-width:720px; height:auto; margin:0; padding:24px; float:none; box-sizing:border-box; border:1px solid #e1e9ed; border-radius:8px; background:#fff; box-shadow:0 12px 40px rgba(20,43,67,.25); color:#333; }
#form_invoices_intervalo_deliverys #title_form { position:relative; display:flex; align-items:center; justify-content:space-between; gap:12px; margin:-24px -24px 18px; padding:20px 24px; border-bottom:1px solid #e6edf1; border-radius:8px 8px 0 0; background:#f8fafb; color:#23758a; font-size:20px; font-weight:700; line-height:1.4; }
#form_invoices_intervalo_deliverys .invoice-interval-fields { display:grid; grid-template-columns:1fr 1fr; gap:14px 18px; margin-bottom:14px; }
#form_invoices_intervalo_deliverys .invoice-interval-field label { display:block; margin-bottom:6px; color:#23758a; font-size:13px; font-weight:700; }
#form_invoices_intervalo_deliverys .invoice-interval-field input, #form_invoices_intervalo_deliverys .invoice-interval-field select { box-sizing:border-box; width:100%; height:36px; padding:0 10px; border:1px solid #d6e2e9; border-radius:4px; background:#fff; color:#333; font:inherit; font-size:13px; }
#invoice_interval_date_help { grid-column:1/-1; margin:0; color:#526976; font-size:12px; line-height:1.5; }
#form_invoices_intervalo_deliverys .invoice-interval-close { box-sizing:border-box; display:flex; align-items:center; justify-content:center; width:32px; min-width:32px; height:32px; min-height:32px; padding:4px; border:1px solid rgba(0,0,0,.18); border-radius:4px; background:#fff; color:#333; font-size:20px; line-height:20px; cursor:pointer; }
#form_invoices_intervalo_deliverys .invoice-interval-close:hover { background:#f1f5f6; border-color:#9aaeb2; }
#form_invoices_intervalo_deliverys .invoice-interval-footer { display:flex; justify-content:flex-end; margin:18px -24px -24px; padding:16px 24px; border-top:1px solid #e6edf1; border-radius:0 0 8px 8px; background:#f8fafb; }
#form_invoices_intervalo_deliverys .invoice-interval-footer .button-l { display:inline-flex; align-items:center; justify-content:center; min-height:36px; margin:0; padding:0 16px; border:0; border-radius:4px; font-size:13px; cursor:pointer; }
@media (max-width: 650px) {
	#form_invoices_intervalo_deliverys.invoice-delivery-overlay { padding:10px; }
	#form_invoices_intervalo_deliverys .invoice-interval-fields { grid-template-columns:1fr; }
	#form_invoices_intervalo_deliverys > .invoice-interval-dialog { width:100%; margin:auto; padding:16px; }
	#form_invoices_intervalo_deliverys #title_form { margin:-16px -16px 18px; padding:16px; }
	#form_invoices_intervalo_deliverys .invoice-interval-footer { margin:18px -16px -16px; padding:16px; }
	#form_invoices_client_deliverys.invoice-delivery-overlay { padding: 10px; }
	.invoice-delivery-dialog { margin: 2vh auto; padding: 16px; }
	.invoice-delivery-header { margin: -16px -16px 18px; padding: 16px; }
	.invoice-delivery-footer { margin: 18px -16px -16px; padding: 16px; }
	.invoice-delivery-dates { grid-template-columns: 1fr; }
	.invoice-delivery-table th, .invoice-delivery-table td { padding: 9px 7px; }
	.invoice-delivery-footer, .invoice-delivery-actions { justify-content: flex-end; }
}

#program-body-finder .finder {
	height: auto;
	min-height: 60px;
	padding-top: 7px;
}

#program-body-finder .finder form {
	display: flex;
	align-items: flex-end;
	flex-wrap: wrap;
}

#program-body-finder .finder .filter {
	box-sizing: border-box;
	padding-right: 14px;
}

/* Importes de los buscadores: ocultar las flechas del control numérico. */
#program-body-finder input[type="number"][name="preciodesde"],
#program-body-finder input[type="number"][name="preciohasta"] {
    -moz-appearance: textfield;
    appearance: textfield;
}
#program-body-finder input[name="preciodesde"]::-webkit-inner-spin-button,
#program-body-finder input[name="preciodesde"]::-webkit-outer-spin-button,
#program-body-finder input[name="preciohasta"]::-webkit-inner-spin-button,
#program-body-finder input[name="preciohasta"]::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

#program-body-finder .finder .filter.margin-left-20 {
	margin-left: 0;
}

#program-body-finder .finder .label {
	display: flex;
	align-items: center;
	height: 19px;
	margin: 0 0 3px;
	color: #687887 !important;
	font-size: 12px;
	font-weight: 500;
	letter-spacing: 0;
	line-height: 19px;
	text-transform: none;
}

#program-body-finder .finder .select-style,
#program-body-finder .finder .input-container {
	box-sizing: border-box;
	height: 32px;
	border: 1px solid #d6e2e9;
	border-radius: 4px;
	background: #ffffff;
	box-shadow: 0 1px 2px rgba(20, 43, 67, .04);
}

#program-body-finder .finder .select-style > span {
	position: absolute;
	top: 50%;
	right: 13px;
	z-index: 1;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 12px;
	height: 30px;
	padding: 0;
	color: #142b43;
	font-size: 12px;
	line-height: 1;
	pointer-events: none;
	transform: translateY(-50%);
}

#program-body-finder .finder .select-style > span::before {
	content: "\f078";
	font-family: "Font Awesome 6 Pro";
	font-size: 11px;
	font-style: normal;
	font-weight: 900;
	line-height: 1;
}

#program-body-finder .finder .select-style select {
	box-sizing: border-box;
	height: 30px;
	padding: 0 32px 0 10px;
	color: #142b43;
	font-size: 13px;
	font-weight: 500;
	line-height: 30px;
}

.select-style.nexus-form-select-host.nexus-finder-select-host,
#program-body-finder .finder .select-style.nexus-finder-select-host {
	overflow: visible;
	border: 0;
	border-radius: 0;
	background: transparent;
	box-shadow: none;
}

.select-style.nexus-form-select-host.nexus-finder-select-host > span,
#program-body-finder .finder .select-style.nexus-finder-select-host > span {
	display: none;
}

:is(#program-body-finder .finder, .nexus-form-select-host) .nexus-finder-native-select {
	position: absolute !important;
	width: 1px !important;
	height: 1px !important;
	opacity: 0;
	pointer-events: none;
}

:is(#program-body-finder .finder, .nexus-form-select-host) .nexus-finder-select {
	position: relative;
	width: 100%;
	height: 32px;
}

:is(#program-body-finder .finder, .nexus-form-select-host) .nexus-finder-select-input {
	box-sizing: border-box;
	display: block;
	width: 100%;
	height: 32px;
	margin: 0;
	padding: 0 34px 0 10px;
	border: 1px solid #d6e2e9;
	border-radius: 4px;
	background: #ffffff;
	box-shadow: 0 1px 2px rgba(20, 43, 67, .04);
	color: #142b43;
	font-size: 13px;
	font-weight: 500;
	line-height: 30px;
	cursor: text;
}

:is(#program-body-finder .finder, .nexus-form-select-host) .nexus-finder-select-input:focus {
	border-color: #079fbe;
	box-shadow: 0 0 0 2px rgba(7, 159, 190, .12);
	outline: 0;
}

:is(#program-body-finder .finder, .nexus-form-select-host) .nexus-finder-select > .fa {
	position: absolute;
	top: 50%;
	right: 12px;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 12px;
	height: 30px;
	color: #142b43;
	font-size: 11px;
	pointer-events: none;
	transform: translateY(-50%);
}

:is(#program-body-finder .finder, .nexus-form-select-host) .nexus-finder-select-options {
	position: absolute;
	z-index: 1000;
	top: calc(100% + 3px);
	right: 0;
	left: 0;
	max-height: 260px;
	overflow-y: auto;
	border: 1px solid #d5dbe3;
	border-radius: 6px;
	background: #ffffff;
	box-shadow: 0 8px 20px rgba(16, 24, 40, .15);
}

#program-body-finder .finder #invoice-cliente-options {
	left: 0;
	right: auto;
	width: 520px;
	max-width: calc(100vw - 40px);
}

#program-body-finder .finder .nexus-budget-client-filter .nexus-finder-select-options,
#program-body-finder .finder .nexus-pedidos-client-filter .nexus-finder-select-options {
	left: 0;
	right: auto;
	width: 520px;
	max-width: calc(100vw - 40px);
}

:is(#program-body-finder .finder, .nexus-form-select-host) .nexus-finder-select-options[hidden] {
	display: none;
}

:is(#program-body-finder .finder, .nexus-form-select-host) .nexus-finder-select-option[hidden] {
	display: none;
}

:is(#program-body-finder .finder, .nexus-form-select-host) .nexus-finder-select-without-search .nexus-finder-select-input {
	cursor: pointer;
}

:is(#program-body-finder .finder, .nexus-form-select-host) .nexus-finder-select-option {
	display: block;
	box-sizing: border-box;
	width: 100%;
	min-height: 30px;
	padding: 5px 10px;
	border: 0;
	background: #ffffff;
	color: #263244;
	font: inherit;
	font-size: 12px;
	line-height: 20px;
	text-align: left;
	cursor: pointer;
}

:is(#program-body-finder .finder, .nexus-form-select-host) .nexus-finder-select-option:hover,
:is(#program-body-finder .finder, .nexus-form-select-host) .nexus-finder-select-option:focus,
:is(#program-body-finder .finder, .nexus-form-select-host) .nexus-finder-select-option[aria-selected="true"] {
	background: #f0f5fb;
	outline: 0;
}

:is(#program-body-finder .finder, .nexus-form-select-host) .nexus-finder-select-option:disabled {
	color: #98a2b3;
	cursor: default;
}

:is(#program-body-finder .finder, .nexus-form-select-host) .nexus-finder-select-empty {
	box-sizing: border-box;
	text-align: left;
	padding: 6px 10px;
	color: #667085;
	font-size: 11px;
	font-weight: 400;
	line-height: 16px;
}

:is(#program-body-finder .finder, .nexus-form-select-host) .nexus-finder-select-empty:empty {
	display: none;
}

#program-body-finder .finder .input-container .styled-input {
	height: 30px;
	line-height: 30px;
}

#program-body-finder .finder .input-container input {
	box-sizing: border-box;
	height: 28px;
	margin: 0 5px;
	color: #142b43;
	font-size: 13px;
	font-weight: 500;
	line-height: 28px;
}

/* Las fechas reservan solo el ancho de dd-mm-yyyy y sus dos flechas. */
#program-body-finder .finder .nexus-finder-date-filter {
    flex: 0 0 140px;
    width: 140px !important;
    max-width: 100%;
    min-width: 0;
}
#program-body-finder .finder .nexus-finder-date-control {
    box-sizing: border-box;
    width: 126px !important;
    max-width: 100%;
	display: flex;
	align-items: stretch;
	height: 32px;
	overflow: hidden;
	border: 1px solid #d6e2e9;
	border-radius: 4px;
	background: #ffffff;
	box-shadow: none;
}

#program-body-finder .finder .nexus-finder-date-filter .label {
	height: 19px;
	margin: 0 0 3px;
	color: #687887 !important;
	font-size: 12px;
	font-weight: 500;
	line-height: 19px;
}

#program-body-finder .finder .nexus-finder-date-control .styled-input {
	float: none;
	flex: 1 1 auto;
	min-width: 0;
	height: 30px;
	border-right: 1px solid #d6e2e9;
	border-left: 1px solid #d6e2e9;
	line-height: 30px;
}

#program-body-finder .finder .nexus-finder-date-control input.fecha_calendario {
	width: calc(100% - 6px) !important;
	height: 30px;
	margin: 0 3px;
	padding: 0;
	border: 0;
	background: transparent;
	color: #142b43;
	font-size: 13px;
	font-weight: 500;
	line-height: 30px;
	text-align: center;
	cursor: pointer;
}

#program-body-finder .finder .nexus-finder-date-step {
	box-sizing: border-box;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex: 0 0 15px;
	width: 15px;
	height: 30px;
	padding: 0;
	border: 0;
	background: #ffffff;
	color: #142b43;
	font-family: "Font Awesome 6 Pro";
	font-size: 12px;
	line-height: 1;
	cursor: pointer;
}

#program-body-finder .finder .nexus-finder-date-step:hover,
#program-body-finder .finder .nexus-finder-date-step:focus {
	background: #f0fbfd;
	color: #078ca7;
	outline: 0;
}

#program-body-finder .finder .nexus-finder-date-step-prev {
	color: #079fbe;
}

#program-body-finder .finder .nexus-finder-date-step:focus-visible {
	outline: 1px solid #079fbe;
	outline-offset: -1px;
}

/* El calendario de los finders debe aparecer siempre por encima de sus listas. */
#ui-datepicker-div {
	z-index: 10001 !important;
}

#program-body {
	box-sizing: border-box;
	height: auto;
	margin-top: 0;
	margin-bottom: 20px;
	padding: 20px;
	border: 1px solid #e2ebf0;
	border-radius: 11px;
	background: rgba(255, 255, 255, .96);
	box-shadow: 0 2px 8px rgba(20, 43, 67, .045);
	overflow: visible;
}

.program-body {
	min-width: 0;
	margin-top: 0;
	margin-bottom: 20px;
}

@media (max-width: 720px) {
	#program-body-finder,
	#program-body,
	.program-body {
		width: calc(100% - 24px);
	}

	#program-body-finder {
		padding: 8px 0 12px;
	}

	#program-body-finder .title {
		min-height: 45px;
		font-size: 20px;
	}

	#program-body-finder .finder .filter {
		width: 50%;
		padding-right: 10px;
		margin-bottom: 10px;
	}

	#program-body-finder .finder .nexus-finder-date-filter {
		width: 100%;
		min-width: 0;
	}

	#program-body-finder .finder .filter.col-2,
	#program-body-finder .finder .filter.col-3,
	#program-body-finder .finder .filter.col-4,
	#program-body-finder .finder .filter.col-5,
	#program-body-finder .finder .filter.col-6,
	#program-body-finder .finder .filter.col-7,
	#program-body-finder .finder .filter.col-8,
	#program-body-finder .finder .filter.col-9,
	#program-body-finder .finder .filter.col-10,
	#program-body-finder .finder .filter.col-11,
	#program-body-finder .finder .filter.col-12 {
		width: 100%;
	}

	#program-body {
		padding: 14px 14px 0;
	}
}

/* Facturas, presupuestos, pedidos y albaranes valorados: plantillas de 920 px. */
body.invoice-print-page #program-body,
body.budget-print-page #program-body,
body.deliveryval-print-page #program-body,
body.pedido-print-page #program-body {
	box-sizing: content-box;
	max-width: none;
}

@media print {
	body.invoice-print-page #program-body,
	body.budget-print-page #program-body,
	body.deliveryval-print-page #program-body,
	body.pedido-print-page #program-body {
		min-width: 0 !important;
		max-width: none !important;
		margin: 0;
		padding: 0;
		border: 0;
		border-radius: 0;
		background: #fff;
		box-shadow: none;
	}
}

/* Checks globales compactos y alineados con el color corporativo */
input[type="checkbox"] {
	appearance: none;
	-webkit-appearance: none;
	flex: 0 0 16px;
	width: 16px;
	height: 16px;
	margin: 0;
	box-sizing: border-box;
	border: 1px solid #9aa8b2;
	border-radius: 4px;
	background: #fff;
	vertical-align: middle;
	cursor: pointer;
}

input[type="checkbox"]:checked {
	border-color: #1686a4;
	background-color: #1686a4;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' d='m3 8 3 3 7-7'/%3E%3C/svg%3E");
	background-position: center;
	background-repeat: no-repeat;
	background-size: 12px;
}

input[type="checkbox"]:focus-visible {
	outline: 2px solid rgba(22, 134, 164, .28);
	outline-offset: 2px;
}

input[type="checkbox"]:disabled {
	cursor: not-allowed;
	opacity: .55;
}

/* Permisos de usuario: selector y resumen */
.user-permissions {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
	gap: 10px;
	padding: 16px 0 4px;
}

.user-permission {
	display: flex;
	align-items: center;
	gap: 10px;
	min-height: 42px;
	padding: 0 14px;
	border: 1px solid #e4e8ee;
	border-radius: 8px;
	background: #fff;
	color: #28323c;
	cursor: pointer;
	box-sizing: border-box;
}

.user-permission:hover {
	border-color: #aeb9c5;
	background: #f8fafc;
}

.user-permission input {
	flex: 0 0 auto;
	margin: 0;
}

.user-permission span {
	font-size: 13px;
	line-height: 1.25;
}

.permission-summary {
	color: #56616d;
	font-size: 12px;
}


/* Selector global reutilizable de elementos mediante etiquetas. */
.tag-selector.tag-selector {
	position: relative;
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 7px;
	box-sizing: border-box;
	width: 100%;
	min-height: 46px;
	padding: 7px 9px;
	border-radius: 7px;
	background: #eeeeee;
}

.tag-selector__tags {
	display: contents;
}

.tag-selector__tag {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	min-height: 32px;
	box-sizing: border-box;
	padding: 5px 9px;
	border-radius: 6px;
	background: #d3d3d3;
	color: #444444;
	font-size: 12px;
	line-height: 18px;
}

.tag-selector__remove {
	width: 18px;
	height: 18px;
	padding: 0;
	border: 0;
	background: transparent;
	color: #777777;
	font-size: 18px;
	line-height: 16px;
	cursor: pointer;
}

.tag-selector__add {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	min-height: 32px;
	padding: 5px 10px;
	border: 1px solid #aaaaaa;
	border-radius: 6px;
	background: #ffffff;
	color: #4a4a4a;
	font: inherit;
	font-size: 12px;
	cursor: pointer;
}

.tag-selector__add:hover,
.tag-selector__add[aria-expanded="true"] {
	border-color: #00b4ce;
	color: #008ca2;
}

.tag-selector__add.is-icon-only {
	width: 32px;
	padding: 0;
	justify-content: center;
}

.tag-selector__add-icon {
	font-size: 18px;
	line-height: 16px;
}

.tag-selector__popover {
	position: absolute;
	z-index: 1000;
	top: calc(100% + 6px);
	left: 0;
	width: min(360px, 100%);
	box-sizing: border-box;
	padding: 10px;
	border: 1px solid #cccccc;
	border-radius: 6px;
	background: #ffffff;
	box-shadow: 0 5px 18px rgba(0, 0, 0, .16);
}

.tag-selector__popover[hidden] {
	display: none;
}

.tag-selector__search {
	box-sizing: border-box;
	width: 100%;
	height: 34px;
	margin-bottom: 8px;
	padding: 0 9px;
	border: 1px solid #999999;
	border-radius: 4px;
	background: #ffffff;
}

.tag-selector__options {
	max-height: 220px;
	overflow-y: auto;
}

.tag-selector .tag-selector__option {
	display: flex;
	align-items: center;
	gap: 9px;
	box-sizing: border-box;
	width: 100%;
	height: auto;
	min-height: 38px;
	padding: 6px 8px;
	border-bottom: 1px solid #eeeeee;
	color: #333333;
	font-size: 13px;
	letter-spacing: 0;
	text-transform: none;
	cursor: pointer;
}

.tag-selector .tag-selector__option:hover,
.tag-selector .tag-selector__option.is-selected {
	background: #e0f7fa;
}

.tag-selector .tag-selector__option[hidden] {
	display: none !important;
}

.tag-selector .tag-selector__option input {
	flex: 0 0 auto;
	width: 18px !important;
	height: 18px;
	margin: 0;
}

.tag-selector__empty {
	color: #777777;
	font-size: 12px;
}

@media (max-width: 600px) {
	.tag-selector__popover { width: 100%; }
}

/* Paginación */
.pagination-bar {
	width: 100%;
	margin: 0;
	border-top: 1px solid #e5edf1;
}

#pagination {
	width: 100%;
	box-sizing: border-box;
	padding: 0 16px;
}

#pagination a {
	display: block;
	float: left;
	width: 27px;
	height: 27px;
	margin: 16px 2px 6px;
	border-radius: 4px;
	color: #486273;
	font-size: 14px;
	font-weight: 600;
	line-height: 27px;
	text-align: center;
	text-decoration: none;
}

#pagination a.inuse,
#pagination a.not-inuse:hover {
	background: #08acc8;
	color: #ffffff;
}

#pagination a.not-inuse {
	background: #edf3f6;
}

.pagination-top-separator {
	border-top: 1px solid #cccccc;
}

/* Contenedores con listado desplazable */
.scroll-container {
	height: calc(100vh - 350px);
	overflow-x: hidden;
	overflow-y: scroll;
}

/* Plantillas de asientos: datos y líneas editables. */
#program-body.plantilla-entry-body { padding: 22px; background: #fff; }
.plantilla-entry-form .plantilla-name-field { grid-column: span 3; }
.plantilla-entry-form .plantilla-active-field { align-self: end; }
.plantilla-entry-form .nexus-form-area:last-child { margin-bottom: 0; }
.plantilla-entry-form .input-container { box-sizing: border-box; height: 32px; border-color: #d6e2e9; border-radius: 4px; }
.plantilla-entry-form .input-container .styled-input { float: none; height: 100%; line-height: normal; border-radius: inherit; background: transparent; }
.plantilla-entry-form .input-container input:not([type="hidden"]) { box-sizing: border-box; height: 100%; padding-top: 0; padding-bottom: 0; line-height: normal; }
.plantilla-entry-form .input-container:has(:is(input, textarea, select):focus:not([readonly]):not(:disabled)) { border-color: #1686a4; box-shadow: 0 0 0 2px rgba(22,134,164,.12); }
.plantilla-entry-form :is(input, textarea, select):is([readonly], :disabled):focus { outline: none; box-shadow: none; }
.plantilla-entry-head,
.plantilla-entry-form .plantilla-entry-row,
.plantilla-entry-totals {
    display: grid;
    grid-template-columns: 56px minmax(200px, 2fr) minmax(150px, 1.4fr) minmax(130px, 1fr) minmax(105px, .7fr) minmax(105px, .7fr) 30px;
    gap: 12px;
    align-items: center;
}
.plantilla-entry-head { padding: 0 12px 10px; color: #23758a; font-size: 11px; font-weight: 700; }
.plantilla-entry-form .plantilla-entry-row { padding: 12px; border-bottom: 1px solid #d5e2e7; border-radius: 5px; }
.plantilla-entry-form .plantilla-entry-row { background: #fff; }
.plantilla-entry-form .plantilla-entry-row > .campo { box-sizing: border-box; min-width: 0; width: auto; margin: 0; padding: 0; }
.plantilla-entry-form .plantilla-entry-row :is(.input-container, .styled-input) { box-sizing: border-box; width: 100%; max-width: 100%; overflow: visible; }
.plantilla-entry-form .plantilla-entry-row input:not([type="hidden"]) { box-sizing: border-box; width: calc(100% - 10px); margin-right: 5px; margin-left: 5px; }
.plantilla-entry-form .plantilla-entry-row :is(.impd, .imph) { text-align: right; font-variant-numeric: tabular-nums; }
.plantilla-entry-form .cue_elegida { position: relative; }
.plantilla-entry-form .listacuentascontables { left: 0; box-sizing: border-box; width: 100%; max-height: 240px; overflow-y: auto; z-index: 50; }
.plantilla-entry-form .plantilla-remove-line { display: inline-flex; align-items: center; justify-content: center; box-sizing: border-box; width: 30px; height: 32px; margin: 0; padding: 0; }
.plantilla-entry-form .plantilla-add-line { margin-top: 18px; }
.plantilla-entry-totals { margin-top: 18px; padding: 12px; }
.plantilla-entry-totals > .campo { min-width: 0; margin: 0; padding: 0; }
.plantilla-entry-totals .plantilla-total-difference { grid-column: 4; }
.plantilla-entry-totals .plantilla-total-debe { grid-column: 5; }
.plantilla-entry-totals .plantilla-total-haber { grid-column: 6; }
.plantilla-entry-totals .input-container { width: 100%; }
.plantilla-entry-totals input { text-align: right; font-variant-numeric: tabular-nums; }
@media (max-width: 1100px) {
    .plantilla-entry-form .plantilla-name-field { grid-column: auto; }
    .plantilla-entry-head { display: none; }
    .plantilla-entry-form .plantilla-entry-row { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-bottom: 12px; border: 1px solid #d5e2e7; }
    .plantilla-entry-form .plantilla-entry-row > .campo[data-label]::before { display: block; margin-bottom: 6px; color: #23758a; font-size: 11px; font-weight: 700; content: attr(data-label); }
    .plantilla-entry-form .plantilla-entry-actions { grid-column: 1 / -1; justify-self: end; }
    .plantilla-entry-totals { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .plantilla-entry-totals :is(.plantilla-total-difference, .plantilla-total-debe, .plantilla-total-haber) { grid-column: auto; }
}
@media (max-width: 650px) {
    #program-body.plantilla-entry-body { padding: 14px; }
    .plantilla-entry-form .plantilla-entry-row { grid-template-columns: minmax(0, 1fr); }
    .plantilla-entry-totals { grid-template-columns: minmax(0, 1fr); }
}

/* Asientos: reutilizan los campos y líneas de las plantillas. */
.asiento-entry-form #registros { overflow: visible; }
.asiento-entry-form .plantilla-entry-row > .campo { float: none; width: auto; }
.asiento-entry-form .plantilla-entry-row input[readonly] { cursor: default; }
@media print {
    #program-body.asiento-entry-body { width: 100%; min-width: 0 !important; margin: 0; padding: 0; }
    .asiento-entry-form .nexus-form-area { padding: 12px; background: #fff; }
    .asiento-entry-form .nexus-form-fields { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .asiento-entry-form .plantilla-entry-head,
    .asiento-entry-form .plantilla-entry-row,
    .asiento-entry-form .plantilla-entry-totals { display: grid; grid-template-columns: 36px minmax(0, 2fr) minmax(0, 1.4fr) minmax(0, 1fr) 70px 70px; gap: 8px; }
    .asiento-entry-form .plantilla-entry-row { break-inside: avoid; margin: 0; padding: 8px 12px; }
    .asiento-entry-form .plantilla-entry-row > .campo[data-label]::before,
    .asiento-entry-form .plantilla-entry-actions,
    .asiento-entry-form .plantilla-add-line,
    .asiento-entry-form .asiento-template-field,
    .asiento-entry-form .listacuentascontables { display: none !important; }
    .asiento-entry-form .plantilla-entry-totals .plantilla-total-difference { grid-column: 4; }
    .asiento-entry-form .plantilla-entry-totals .plantilla-total-debe { grid-column: 5; }
    .asiento-entry-form .plantilla-entry-totals .plantilla-total-haber { grid-column: 6; }
    .asiento-entry-form .plantilla-entry-row input:not([type="hidden"]) { font-size: 10px; }
}

/* Cierres contables: ejercicios, estados y acciones. */
#program-body.closure-body { padding: 22px; background: #fff; }
.closure-area { margin-bottom: 0; }
.closure-table-scroll { overflow-x: auto; }
.closure-table { width: 100%; min-width: 1000px; border-collapse: collapse; background: #fff; font-size: 13px; color: #39464c; }
.closure-table thead th { padding: 14px; text-align: left; background: #e9f1f5; color: #23758a; font-size: 11px; }
.closure-table tbody th,
.closure-table td { padding: 14px; border-bottom: 1px solid #dfe8ed; vertical-align: middle; }
.closure-table tbody tr:nth-child(even) { background: #f7fafb; }
.closure-table .closure-year { text-align: left; color: #23758a; font-size: 16px; }
.closure-table .closure-actions { text-align: right; }
.closure-table .nexus-action-button { white-space: nowrap; text-decoration: none; }
.closure-table .closure-quarter-locks { min-width: 270px; }
.quarter-lock-list { display: flex; flex-wrap: wrap; gap: 8px; }
.quarter-lock-item { display: flex; flex-direction: column; align-items: center; gap: 4px; min-width: 60px; }
.quarter-lock-button { min-width: 48px; padding: 7px 10px; border: 1px solid transparent; border-radius: 5px; font-size: 12px; font-weight: 700; cursor: pointer; transition: background-color .15s ease, box-shadow .15s ease; }
.quarter-lock-button:hover, .quarter-lock-button:focus-visible { box-shadow: 0 0 0 3px rgba(35,117,138,.18); outline: none; }
.quarter-lock-button.quarter-unlocked { color: #216b3b; background: #e1f3e7; border-color: #acd8b9; }
.quarter-lock-button.quarter-locked { color: #a12632; background: #ffe6e9; border-color: #efb8bf; }
.quarter-lock-state { font-size: 10px; white-space: nowrap; }
.quarter-lock-state.quarter-unlocked { color: #267344; }
.quarter-lock-state.quarter-locked { color: #ad2737; font-weight: 700; }
.closure-status { display: inline-flex; align-items: center; gap: 7px; padding: 10px 12px; border-radius: 5px; font-size: 12px; }
.closure-status-done { background: #e1f3e7; color: #267344; }
.closure-status-pending { background: #eef1f4; color: #627381; }
.closure-status-error { background: #ffe6e9; color: #ad2737; }
.closure-unavailable { color: #8a98a3; }
.closure-table .closure-empty { padding: 30px; text-align: center; color: #71808d; }
@media (max-width: 650px) {
    #program-body.closure-body { padding: 14px; }
}

/* Ficha de amortizaciones: formulario y calendario anual. */
#program-body.amortization-body { padding: 22px; background: #fff; border-radius: 7px; }
.amortization-form .nexus-form-fields > .campo.nv { display: none; }
.amortization-form .nexus-form-area:last-child { margin-bottom: 0; }
.amortization-form .styled-input { overflow: visible; }
.amortization-table-scroll { overflow-x: auto; }
.amortization-table { width: 100%; min-width: 780px; border-collapse: collapse; background: #fff; color: #39464c; font-size: 13px; }
.amortization-table th { padding: 8px 10px; background: #e9f1f5; color: #23758a; font-size: 11px; text-align: left; }
.amortization-table td { padding: 6px 10px; border-bottom: 1px solid #dfe8ed; vertical-align: middle; }
.amortization-table tbody tr:nth-child(even) { background: #f7fafb; }
.amortization-table .amortization-amount { text-align: right; font-variant-numeric: tabular-nums; }
.amortization-table .amortization-empty { padding: 24px; text-align: center; color: #71808d; }
.amortization-table .nexus-action-button { min-height: 26px; height: 26px; padding: 0 9px; gap: 5px; font-size: 10px; line-height: 24px; white-space: nowrap; }
.amortization-table .nexus-action-button i { font-size: 10px; }
.amortization-status { display: inline-flex; align-items: center; min-height: 22px; box-sizing: border-box; padding: 3px 8px; border-radius: 5px; font-size: 11px; line-height: 16px; white-space: nowrap; }
.amortization-status-done { background: #e1f3e7; color: #267344; }
.amortization-status-pending { background: #fce8e6; color: #a84442; }
@media (max-width: 650px) {
    #program-body.amortization-body { padding: 14px; }
}

/* Edición de trabajadores: áreas, campos y acciones. */
#program-body-finder .title .worker-save-top {
	margin-left: 0;
	white-space: nowrap;
}

.worker-area,
.client-area,
.nexus-form-area {
	box-sizing: border-box;
	min-width: 0;
	margin: 0 0 22px;
	padding: 18px;
	border: 1px solid #d5e2e7;
	border-radius: 7px;
	background: #f4f8fa;
}

.worker-area-title,
.client-area-title,
.nexus-form-area-title {
	margin: 0 0 16px;
	color: #23758a;
	font-size: 16px;
	font-weight: bold;
	letter-spacing: .04em;
	text-transform: uppercase;
}

:is(.worker-fields, .nexus-form-fields) {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 18px;
	overflow: visible;
}

:is(.worker-fields, .nexus-form-fields) > .campo,
.worker-weekly-day > .campo {
	float: none !important;
	box-sizing: border-box;
	width: auto !important;
	min-width: 0;
	margin: 0 !important;
}

:is(.worker-fields, .nexus-form-fields) .input-container,
:is(.worker-fields, .nexus-form-fields) .styled-input,
:is(.worker-fields, .nexus-form-fields) .select-style,
:is(.worker-fields, .nexus-form-fields) select,
.worker-weekly-day .input-container,
.worker-weekly-day .styled-input,
.worker-weekly-day .select-style,
.worker-weekly-day select {
	box-sizing: border-box;
	width: 100% !important;
	max-width: 100%;
}

:is(.worker-fields, .nexus-form-fields) .styled-input input,
.worker-weekly-day .styled-input input {
	box-sizing: border-box;
	width: calc(100% - 10px) !important;
	max-width: calc(100% - 10px);
	margin-right: 5px;
	margin-left: 5px;
}

:is(.worker-fields, .nexus-form-fields) > .worker-check {
	min-width: 0;
	align-self: end;
}

.worker-calendar-heading {
	grid-column: 1;
}

.worker-calendar-button {
	width: 100%;
	margin-top: 7px;
}

/* Ficha de impuestos: controles compactos y estado activo corporativo. */
.tax-form-area .label {
	display: block;
	margin: 0;
	color: #8792a0;
	font-size: 12px;
	font-weight: 400;
	letter-spacing: 0;
	line-height: 16px;
	text-transform: uppercase;
}

.tax-form-area .input-container,
.tax-form-area .select-style {
	box-sizing: border-box;
	position: relative;
	width: 100%;
	height: 36px;
	border: 1px solid #d6e2e9;
	border-radius: 4px;
	background: #fff;
}

.tax-form-area .styled-input {
	box-sizing: border-box;
	width: 100%;
	height: 100%;
	background: transparent;
}

.tax-form-area .styled-input input,
.tax-form-area .select-style select {
	box-sizing: border-box;
	width: 100% !important;
	max-width: 100%;
	height: 34px;
	margin: 0 !important;
	padding: 0 10px;
	border: 0;
	border-radius: 4px;
	background: transparent;
	color: #203b48;
	font: inherit;
	font-size: 13px;
	line-height: 34px;
}

.tax-form-area .select-style > span {
	position: absolute;
	top: 50%;
	right: 11px;
	z-index: 1;
	color: #536875;
	font-size: 11px;
	pointer-events: none;
	transform: translateY(-50%);
}

.tax-form-area .select-style select { padding-right: 30px; }
.tax-form-area .user-permission { width: fit-content; min-width: 150px; margin-top: 18px; }
.tax-form-area .user-permission input[type="checkbox"] { box-sizing: border-box; width: 16px; height: 16px; border: 1px solid #d6e2e9; accent-color: #1686a4; }
.tax-form-area .tax-help { margin: 14px 0; }
.tax-form-fields { grid-template-columns: repeat(4, minmax(0, 1fr)); }

.worker-weekly-day {
	display: grid;
	grid-template-columns: minmax(190px, 2fr) repeat(2, minmax(90px, 1fr));
	gap: 18px;
	max-width: 700px;
	margin-bottom: 14px;
}

@media (max-width: 1100px) {
	:is(.worker-fields, .nexus-form-fields) { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 650px) {
	:is(.worker-fields, .nexus-form-fields),
	.worker-weekly-day { grid-template-columns: 1fr; }
	.worker-calendar-heading { grid-column: auto; }
	#program-body-finder .title .worker-save-top { padding: 0 10px; }
}

/* Ficha de pedidos: distribución de campos, notas, líneas y totales. */
.pedido-form { min-width: 0; }
.pedido-main-row { display: flex; align-items: flex-end; flex-wrap: wrap; gap: 18px; }
.pedido-main-row > .pedido-header-fields {
	flex: 0 1 80%;
	grid-template-columns: minmax(75px, .55fr) minmax(120px, .8fr) minmax(240px, 2.6fr) 50px minmax(180px, 1.7fr) minmax(180px, 1.7fr);
}
.pedido-management-fields { grid-template-columns: repeat(2, minmax(180px, 1fr)); width: 34%; }
.pedido-area-divider { height: 0; margin: 18px 0; border: 0; border-top: 1px solid #d5e2e7; }
.pedido-area .nexus-form-fields > .campo { align-self: start; }
.pedido-area .nexus-form-fields > .campo:has(> .user-permission) { align-self: end; }
.pedido-re-field .user-permission { width: 32px; min-height: 32px; padding: 0; justify-content: center; }
.pedido-re-field .user-permission span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.pedido-area .user-permission input[type="checkbox"] {
	position: static;
	float: none;
	width: 16px;
	height: 16px;
	padding: 0;
	margin: 0;
	accent-color: #1686a4;
}
.pedido-payments { display: flow-root; margin: 0; align-self: flex-end; }
.pedido-payments > .campo { float: none; width: auto; margin: 0; }
.pedido-delivery-fields {
	margin-top: 18px;
	grid-template-columns: minmax(160px, 1.2fr) minmax(240px, 2fr) 100px minmax(160px, 1.2fr) minmax(140px, 1fr) minmax(120px, .9fr);
}
.pedido-delivery-fields.hidden { display: none; }
.pedido-notes-fields { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.pedido-notes-fields > .campo { grid-column: auto; }
.pedido-totals-scroll { overflow-x: auto; padding-bottom: 8px; }
.pedido-totals-fields { display: flex; flex-wrap: nowrap; min-width: 1300px; gap: 0; }
.pedido-totals-fields > .campo { box-sizing: border-box; padding-right: 10px; }
.pedido-totals-fields > .campo.col-1 { flex: 0 0 8.33333333%; }
.pedido-totals-fields > .campo.col-05 { flex: 0 0 6.25%; }
.pedido-totals-fields > .campo.col-0 { flex: 0 0 4.16666667%; }
.pedido-totals-fields > .campo.pedido-total-base { margin-left: 2.08333333% !important; }
.pedido-totals-fields > .campo.pedido-total-final { margin-left: auto !important; padding-right: 0; }
.pedido-totals-fields .label { display: flex; flex-direction: column; justify-content: center; min-height: 36px; line-height: 18px; }
.pedido-notes-fields textarea,
.pedido-related-documents {
	box-sizing: border-box;
	width: 100%;
	min-height: 100px;
	padding: 10px;
	border: 1px solid #d6e2e9;
	border-radius: 4px;
	background: #fff;
}
.pedido-notes-fields textarea { resize: vertical; }
.pedido-related-documents { height: auto; }
.pedido-lines-scroll { overflow-x: auto; padding-bottom: 8px; }
.pedido-lines-heading,
.pedido-lines-scroll > .sortable-container { min-width: 1500px; }
.pedido-lines-heading > .wrapper,
.pedido-lines-scroll .linea-registro,
.pedido-lines-scroll .linea-registro.document-line-active {
	display: grid;
	grid-template-columns: 28px 140px minmax(230px, 1fr) 90px 60px 90px 75px 76px 90px 90px 90px 75px 75px 75px 28px;
	gap: 6px;
	align-items: start;
}
.pedido-lines-heading > .wrapper > div,
.pedido-lines-scroll .linea-registro > .campo {
	float: none !important;
	width: auto !important;
	min-width: 0;
	margin-right: 0 !important;
	margin-left: 0 !important;
}
.pedido-lines-scroll .input-container,
.pedido-lines-scroll .styled-input,
.pedido-lines-scroll .select-style,
.pedido-lines-scroll select,
.pedido-lines-scroll textarea,
.pedido-lines-scroll .styled-input input,
.pedido-lines-scroll .input-container > input {
	box-sizing: border-box;
	width: 100% !important;
	min-width: 0;
	margin-right: 0;
	margin-left: 0;
}
.pedido-lines-scroll select.iva_articulo {
	padding-right: 24px !important;
	background-position: right 6px center !important;
}
@media (max-width: 1400px) {
	.pedido-main-row > .pedido-header-fields { flex-basis: calc(100% - 48px); }
}
@media (max-width: 1100px) {
	.pedido-main-row > .pedido-header-fields { flex-basis: 100%; grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.pedido-management-fields { width: 100%; grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.pedido-delivery-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.pedido-notes-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 650px) {
	.pedido-main-row > .pedido-header-fields,
	.pedido-management-fields,
	.pedido-delivery-fields,
	.pedido-notes-fields { grid-template-columns: 1fr; }
}

/* Calendario laboral unificado de trabajadores. */
#modalCalendario { display:none; position:fixed; z-index:10000; inset:0; align-items:center; justify-content:center; box-sizing:border-box; padding:12px; background:rgba(0,0,0,.35); }
#modalCalendario .worker-calendar-dialog { position:relative; box-sizing:border-box; width:min(1320px,100%); max-height:calc(100vh - 24px); overflow:auto; padding:12px 16px 0; border-radius:14px; background:#fff; }
#modalCalendario .worker-calendar-toolbar { display:flex; align-items:center; gap:12px; }
#modalCalendario .worker-calendar-types { display:flex; flex-wrap:wrap; gap:7px; }
#modalCalendario .worker-calendar-type { padding:7px 10px; border:1px solid #d5e0e4; border-radius:8px; background:#fff; color:#30454e; font:inherit; cursor:pointer; }
#modalCalendario .worker-calendar-type[data-type="vacaciones"]:before { content:""; display:inline-block; width:10px; height:10px; margin-right:6px; border-radius:3px; background:#bdebd1; }
#modalCalendario .worker-calendar-type[data-type="permiso_retribuido"]:before { content:""; display:inline-block; width:10px; height:10px; margin-right:6px; border-radius:3px; background:#c7dafa; }
#modalCalendario .worker-calendar-type[data-type="baja"]:before { content:""; display:inline-block; width:10px; height:10px; margin-right:6px; border-radius:3px; background:#f6d68d; }
#modalCalendario .worker-calendar-type[data-type="sancion"]:before { content:""; display:inline-block; width:10px; height:10px; margin-right:6px; border-radius:3px; background:#f2b8b8; }
#modalCalendario .worker-calendar-type[data-type="jornada"]:before { content:""; display:inline-block; width:10px; height:10px; margin-right:6px; border-radius:3px; background:#8b75ba; }
#modalCalendario .worker-calendar-type.is-active { border-color:#078fa5; background:#e9f8fb; box-shadow:0 0 0 1px #078fa5; font-weight:700; }
#modalCalendario .worker-calendar-close { margin-left:auto; border:0; background:#f0f4f5; color:#53656d; font-size:25px; line-height:30px; cursor:pointer; }
#modalCalendario .worker-calendar-nav { display:flex; align-items:center; justify-content:center; gap:18px; margin:6px 0; }
#modalCalendario .worker-calendar-nav button { width:32px; height:30px; border:1px solid #d5e0e4; border-radius:7px; background:#fff; font-size:21px; cursor:pointer; }
#modalCalendario #yearDisplay { min-width:70px; text-align:center; font-size:18px; color:#20343d; }
#modalCalendario .worker-calendar-count { min-height:20px; margin-bottom:5px; color:#53656d; font-size:12px; }
#calendar { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:8px; user-select:none; }
#calendar .worker-calendar-month { box-sizing:border-box; min-width:0; padding:6px; border:1px solid #e4eaec; border-radius:8px; background:#fff; }
#calendar .worker-calendar-month h4 { margin:0 0 3px; text-align:center; font-size:13px; }
#calendar .worker-calendar-grid { display:grid; grid-template-columns:repeat(7,minmax(0,1fr)); gap:3px; }
#calendar .worker-calendar-grid > * { min-width:0; }
#calendar .worker-calendar-weekday { color:#64747a; text-align:center; font-size:10px; }
#calendar .worker-calendar-day { box-sizing:border-box; width:100%; height:23px; padding:0; border:1px solid #e4eaec; border-radius:5px; background-color:#f7f9fa; color:#26383f; font-size:11px; cursor:pointer; touch-action:none; }
#calendar .worker-calendar-day:hover { border-color:#078fa5; }
#calendar .worker-calendar-day.is-editing { outline:2px solid #087e9a; font-weight:700; }
#calendar .worker-calendar-day.is-jornada { box-shadow:inset 0 -3px #8b75ba; }
#calendar .worker-calendar-day.is-preview-add { outline:2px solid #087e9a; background-color:#b7ebf2; }
#calendar .worker-calendar-day.is-preview-remove { outline:2px dashed #a23838; opacity:.55; }
#modalCalendario .button-bar-calendar { position:sticky; bottom:0; display:flex; justify-content:center; padding:9px; border-top:1px solid #e4eaec; background:#fff; }
#modalCalendario #save-calendario-laboral { padding:9px 22px; border:0; border-radius:8px; background:#b9cbd0; color:#fff; font:inherit; font-weight:700; cursor:default; }
#modalCalendario #save-calendario-laboral.has-changes { background:#e07517; cursor:pointer; }
@media (max-width:900px) { #calendar { grid-template-columns:repeat(3,minmax(0,1fr)); } }
@media (max-width:650px) { #modalCalendario { padding:6px; } #modalCalendario .worker-calendar-dialog { max-height:96vh; padding:10px 10px 0; } #calendar { grid-template-columns:repeat(2,minmax(0,1fr)); } #calendar .worker-calendar-day { height:30px; } }
@media (max-width:420px) { #calendar { grid-template-columns:1fr; } }
/* Edición ampliada hacia abajo sin cambiar la altura de la línea. */
#registros.document-line-has-active {
	overflow: visible;
}

.linea-registro.document-line-active {
	display: flow-root;
	position: relative;
	z-index: 20;
	overflow: visible;
}

.input-container.document-line-container {
	position: relative;
}

.input-container.document-line-container.document-line-active {
	border-color: transparent;
}

.input-container textarea.document-line-field {
	box-sizing: border-box;
	display: block;
	float: none !important;
	width: calc(100% - 10px);
	height: 30px;
	max-height: 260px;
	margin: 0 5px;
	padding: 0;
	border: 0;
	background: transparent;
	color: #333;
	font-family: inherit;
	font-size: 12px;
	line-height: 30px;
	resize: none;
	overflow: hidden;
}

.input-container textarea.document-line-field:focus:not([readonly]) {
	position: absolute;
	top: -1px;
	left: -1px;
	z-index: 1;
	width: calc(100% + 2px);
	min-height: 88px;
	margin: 0;
	padding: 5px;
	border: 1px solid #999;
	border-radius: 4px;
	background: #fff;
	line-height: 1.4;
	resize: vertical;
	overflow: auto;
	outline: none;
}

/* Edición de clientes: distribución adaptable y controles por área. */
.client-area .wrapper,
.client-area .row-form {
    display: flex;
    flex-wrap: wrap;
    gap: 18px;
    overflow: visible;
}
.client-area .wrapper + .wrapper,
.client-area .row-form + .wrapper { margin-top: 18px; }
.client-area .campo,
.client-area > .wrapper > .fleft {
    float: none !important;
    box-sizing: border-box;
    width: auto !important;
    min-width: 0;
    margin: 0 !important;
    flex: 0 0 calc((100% - 54px) / 4);
}
.client-area .campo.col-12 { flex-basis: 100%; }
.client-area .client-identity-fields {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(120px, 180px);
}
.client-area .client-contact-fields {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
}
.client-area .client-email-fields {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
}
.client-area .client-email-permission {
    min-height: 36px;
    padding: 0 8px;
    gap: 7px;
}
.client-area .client-email-permission span { font-size: 12px; }
@media (max-width: 1100px) {
    .client-area .client-identity-fields,
    .client-area .client-contact-fields,
    .client-area .client-email-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 650px) {
    .client-area .client-identity-fields,
    .client-area .client-contact-fields,
    .client-area .client-email-fields { grid-template-columns: minmax(0, 1fr); }
}

.client-bank-fields {
    display: grid;
    grid-template-columns: minmax(180px, 2fr) minmax(82px, .75fr) repeat(2, minmax(88px, .8fr)) minmax(58px, .5fr) minmax(132px, 1.2fr) minmax(120px, 1.1fr);
    gap: 18px;
    width: 100%;
}
.client-bank-fields > .campo {
    float: none !important;
    width: auto !important;
    min-width: 0;
    margin: 0 !important;
    flex: initial !important;
}
.client-bank-fields > .campo:nth-child(8) { grid-column: 1; }
.client-bank-fields > .campo:nth-child(9) { grid-column: 2; }
.client-area .input-container,
.client-area .styled-input,
.client-area .select-style,
.client-area select,
.client-area textarea {
    box-sizing: border-box;
    width: 100% !important;
    max-width: 100%;
}
.client-area .styled-input input {
    box-sizing: border-box;
    width: calc(100% - 10px) !important;
    max-width: calc(100% - 10px);
    margin-right: 5px;
    margin-left: 5px;
}
.client-area #banco_iban { width: calc(100% - 35px) !important; }
.client-check { align-self: flex-end; min-height: 42px; }
.client-area .campo > .client-check { margin-top: 20px; }
.client-area input[type="checkbox"] {
    flex: 0 0 auto;
    width: 16px;
    height: 16px;
    margin: 0;
    accent-color: #1689a5;
}
.client-check span { color: #374151; font-size: 13px; }
.client-area .leyenda:empty { display: none; }
.client-area-heading { margin-top: 22px; }
@media (max-width: 1100px) {
    .client-bank-fields { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .client-bank-fields > .campo:nth-child(8),
    .client-bank-fields > .campo:nth-child(9) { grid-column: auto; }
    .client-area .campo,
    .client-area > .wrapper > .fleft { flex-basis: calc((100% - 18px) / 2); }
    .client-area .campo.col-12 { flex-basis: 100%; }
}
@media (max-width: 650px) {
    .client-bank-fields { grid-template-columns: 1fr 1fr; }
    .client-area .campo,
    .client-area > .wrapper > .fleft { flex-basis: 100%; }
    .client-area { padding: 16px; }
}

/* Ficha de categorías: descripción y campos del formulario. */
.category-form .category-description-field { grid-column: 1 / -1; }
.category-form .text-area {
    box-sizing: border-box;
    width: 100%;
    min-height: 120px;
    padding: 10px;
    border: 1px solid #d6e2e9;
    border-radius: 4px;
    background: #fff;
    font-family: inherit;
    font-size: 13px;
    resize: vertical;
}

/* Ficha de proveedores: controles y acciones del formulario. */
.provider-form .nexus-form-fields + .nexus-form-fields { margin-top: 18px; }
.provider-form .nexus-form-fields > .col-12 { grid-column: 1 / -1; }
.provider-form .provider-address-fields {
    grid-template-columns: minmax(0, 2.7fr) minmax(0, .65fr) minmax(0, 1.5fr) minmax(0, 1fr) minmax(0, .9fr);
}
@media (max-width: 1100px) {
    .provider-form .provider-address-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .provider-form .provider-address-fields > .campo:first-child { grid-column: 1 / -1; }
}
@media (max-width: 650px) {
    .provider-form .provider-address-fields { grid-template-columns: 1fr; }
    .provider-form .provider-address-fields > .campo:first-child { grid-column: auto; }
}
.provider-check { margin-top: 20px; }
.provider-check input { width: 16px; height: 16px; accent-color: #1689a5; }
.provider-form #banco_iban { width: calc(100% - 35px) !important; }

/* Delegaciones del cliente: área con altura según contenido y scroll interno. */
.client-delegations-area {
    display: flex;
    flex-direction: column;
    max-height: 450px;
    overflow: hidden;
}
.client-delegations-area > .nexus-form-area-title { flex: 0 0 auto; }
.client-delegations-scroll {
    min-height: 0;
    flex: 0 1 auto;
    overflow-x: hidden;
    overflow-y: auto;
    padding: 1px;
}
.client-delegation-row {
    box-sizing: border-box;
    padding: 14px;
    border: 1px solid #d5e2e7;
    border-radius: 8px;
    background: #fff;
}
.client-delegation-row + .client-delegation-row { margin-top: 12px; }
.client-delegations-footer {
    display: flex;
    flex: 0 0 auto;
    justify-content: flex-start;
    margin-top: 12px;
}
.client-delegations-add {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 37px;
    box-sizing: border-box;
    width: 37px;
    height: 37px;
    padding: 0;
    border: 2px solid #d5e3ec;
    border-radius: 8px;
    background: #fff;
    cursor: pointer;
}
.client-delegations-add:focus-visible {
    outline: 2px solid #00b3ca;
    outline-offset: 3px;
}
.client-delegations-plus {
    position: relative;
    display: block;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #00b3ca;
}
.client-delegations-plus::before,
.client-delegations-plus::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 15px;
    height: 3px;
    border-radius: 3px;
    background: #fff;
    transform: translate(-50%, -50%);
}
.client-delegations-plus::after {
    transform: translate(-50%, -50%) rotate(90deg);
}
.client-delegation-row .delegacion {
    padding: 0;
    overflow: hidden;
    background: transparent;
}

/* Etiquetas NEXUS: banda gris y botón Añadir con borde azul. */
.nexus-tags-bar { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; min-height: 48px; padding: 8px 10px; box-sizing: border-box; border-radius: 8px; background: #efefef; }
.nexus-tags-list { display: contents; }
.nexus-tag { display: inline-flex; align-items: center; max-width: 100%; min-height: 32px; padding: 4px 8px 4px 10px; gap: 6px; box-sizing: border-box; border: 0; border-radius: 6px; background: #cecece; color: #414141; font-size: 13px; }
.nexus-tags-add { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 32px; padding: 4px 10px; border: 2px solid #00a9c2; border-radius: 6px; background: #fafafa; color: #0098b0; font: inherit; font-size: 13px; cursor: pointer; }
.nexus-tags-plus { font-size: 20px; line-height: 1; }
.nexus-tags-add:hover { background: #e5f8fb; }
.nexus-tags-add:focus-visible { outline: 2px solid #1686a4; outline-offset: 3px; }
.client-credit-area { width: 100%; max-width: none; padding: 14px; }
.client-credit-area > .nexus-form-area-title { margin-bottom: 12px; font-size: 14px; }
.client-credit-add-controls { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; max-width: 100%; }
.client-credit-entry { display: flex; width: 200px; max-width: 100%; }
.client-credit-entry[hidden] { display: none; }
.client-credit-entry input { box-sizing: border-box; width: 100%; height: 32px; min-height: 32px; padding: 5px 9px; border: 1px solid #d6e2e9; border-radius: 4px; background: #fff; color: #28323c; font: inherit; font-size: 13px; }
.client-credit-entry input:focus { border-color: #1686a4; outline: 2px solid rgba(22,134,164,.15); }
.client-credit-help { margin: 8px 0 0; color: #71808d; font-size: 11px; line-height: 1.5; }
.client-credit-tag-name { min-width: 0; overflow-wrap: anywhere; }
#program-body .client-credit-remove { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 20px; width: 20px; height: 20px; min-height: 20px; padding: 0; border: 0; border-radius: 4px; background: transparent; color: #555; font-size: 16px; cursor: pointer; }
#program-body .client-credit-remove:hover { background: #bdbdbd; }
#program-body .client-credit-remove:focus-visible { outline: 2px solid #1686a4; }
.client-credit-status { margin: 8px 0 0; color: #23758a; font-size: 12px; }
.client-credit-status:empty { display: none; }

/* Fichas de clientes y proveedores: gráficas con la apariencia del dashboard principal. */
.nexus-history-chart-card { box-sizing: border-box; width: calc(100% - 84px); max-width: 1880px; min-width: 0; margin: 22px auto; padding: 22px; border: 1px solid #e5ebef; border-radius: 12px; background: #fff; box-shadow: 0 4px 14px rgba(34,61,80,.05); }
#program-body .nexus-history-chart-card,
#program-body .client-offers-card { width: 100%; max-width: none; margin-right: 0; margin-left: 0; }
.nexus-history-chart-heading { display: flex; justify-content: space-between; align-items: flex-start; gap: 14px; margin-bottom: 20px; }
.nexus-history-chart-kicker { display: block; color: #00a9c2; font-size: 10px; font-weight: 800; letter-spacing: 1.4px; }
.nexus-history-chart-heading h2 { margin: 5px 0 0; color: #23758a; font-size: 16px; font-weight: bold; letter-spacing: .04em; text-transform: uppercase; }
.nexus-history-chart-period { padding-top: 3px; color: #8a98a3; font-size: 11px; }
.nexus-history-chart-chart { position: relative; height: 290px; }
@media (max-width: 650px) {
    .nexus-history-chart-card { padding: 16px; }
    .nexus-history-chart-heading { flex-direction: column; gap: 6px; }
    .nexus-history-chart-chart { height: 240px; }
}

/* Acciones de las fichas de cliente y proveedor en la cabecera del finder. */
#program-body-finder .nexus-record-header-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 10px;
    min-width: 0;
}
.nexus-action-button.nexus-action-danger,
#program-body-finder .title .button-circle.nexus-action-danger {
    border-color: #dc3545;
    background: #dc3545;
    color: #fff;
}
.nexus-action-button.nexus-action-danger:hover,
.nexus-action-button.nexus-action-danger:focus,
#program-body-finder .title .button-circle.nexus-action-danger:hover,
#program-body-finder .title .button-circle.nexus-action-danger:focus {
    border-color: #b52a37;
    background: #b52a37;
    color: #fff;
}
@media (max-width: 650px) {
    #program-body-finder .title:has(.nexus-record-header-actions) { flex-wrap: wrap; }
    #program-body-finder .title .nexus-finder-header-actions { flex-basis: 100%; }
}

/* Botón de acceso al menú de pagos. */
#pagos-button {
    box-sizing: border-box;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    float: left;
    width: 38px;
    height: 38px;
    margin: 30px 0 0 20px;
    padding: 0;
    border: 1px solid #1686a4;
    border-radius: 7px;
    background: #1686a4;
    color: #fff;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(22, 134, 164, .2);
    transition: background-color .15s ease, border-color .15s ease;
}
#pagos-button:hover,
#pagos-button:focus {
    border-color: #116d86;
    background: #116d86;
    color: #fff;
}
#pagos-button:focus-visible {
    outline: 2px solid #1686a4;
    outline-offset: 3px;
}

/* Ficha de facturas: campos compactos, líneas y totales dentro del program-body. */
.invoice-main-row { display: flex; align-items: flex-end; gap: 12px; }
.invoice-main-row > .invoice-header-fields { flex: 1; min-width: 0; }
.invoice-header-fields {
    grid-template-columns: minmax(130px, 1.35fr) minmax(72px, .65fr) minmax(115px, 1fr) minmax(75px, .65fr) minmax(135px, 1.2fr) minmax(230px, 2.4fr) 48px 58px minmax(110px, 1fr) minmax(175px, 1.65fr);
}
.invoice-payments { display: flow-root; flex: 0 0 38px; }
.invoice-payments > .campo { float: none; width: auto; margin: 0; }
.invoice-payments #pagos-button { margin: 0; }
.invoice-check.user-permission { box-sizing: border-box; width: 32px; min-height: 32px; padding: 0; justify-content: center; }
.invoice-check span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.invoice-management-fields { grid-template-columns: repeat(3, minmax(150px, 1fr)) minmax(240px, 1.5fr); max-width: 1200px; }
.invoice-notes-fields { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.invoice-notes-fields textarea,
.invoice-notes-fields .text-area { box-sizing: border-box; width: 100%; min-height: 100px; padding: 10px; border: 1px solid #d6e2e9; border-radius: 4px; background: #fff; }
.invoice-notes-fields .campo > .wrapper { width: 100%; }
.invoice-lines-scroll { overflow-x: auto; padding-bottom: 8px; }
.invoice-lines-scroll > .wrapper { min-width: 1120px; }
.invoice-lines-scroll .margin-top-30 { margin-top: 0; }
.invoice-lines-scroll .margin-top-30 > .wrapper,
.invoice-lines-scroll .linea-registro {
    display: grid;
    grid-template-columns: 28px 140px minmax(230px, 1fr) 90px 60px 90px 75px 65px 90px 75px 75px 28px;
    gap: 6px;
    align-items: start;
}
.invoice-lines-scroll .linea-registro > div,
.invoice-lines-scroll .margin-top-30 > .wrapper > div { float: none !important; box-sizing: border-box; width: auto !important; min-width: 0; margin: 0 !important; }
.invoice-lines-scroll .styled-input,
.invoice-lines-scroll .input-container,
.invoice-lines-scroll .select-style,
.invoice-lines-scroll select,
.invoice-lines-scroll textarea,
.invoice-lines-scroll .styled-input input { box-sizing: border-box; width: 100% !important; max-width: 100%; min-width: 0; margin-left: 0; margin-right: 0; }
.invoice-totals-fields { min-width: 1300px; }
.invoice-totals-fields .input-container,
.invoice-totals-fields .styled-input { box-sizing: border-box; width: 100%; }
.invoice-legacy-actions { display: none; }
.invoice-header-actions .nexus-action-button { cursor: pointer; }
.invoice-lock-notice,
.invoice-provider-lock-notice { margin: 0 0 12px; padding: 7px 10px; border: 1px solid #e9e3d3; border-radius: 5px; background: #faf9f5; color: #726b5d; font-size: 12px; font-weight: 400; line-height: 1.45; }
.invoice-payments-lock-notice { margin: 10px 20px 0; padding: 7px 10px; border: 1px solid #e9e3d3; border-radius: 4px; background: #faf9f5; color: #726b5d; font-size: 11px; font-weight: 400; line-height: 1.45; }
.invoice-totals-locked .input-container,
.invoice-totals-locked .styled-input,
.invoice-totals-locked .styled-input input { background-color: #eeeeee; border-color: #d8d8d8; color: #777777; box-shadow: none; }
.invoice-totals-locked .styled-input input { opacity: 1; -webkit-text-fill-color: #777777; cursor: default; }
.invoice-totals-locked .label { color: #777777; }
@media (max-width: 1500px) {
    .invoice-header-fields { grid-template-columns: repeat(5, minmax(0, 1fr)); }
    .invoice-header-fields > .campo.col-3 { grid-column: span 2; }
}
@media (max-width: 1100px) {
    .invoice-main-row { flex-wrap: wrap; }
    .invoice-main-row > .invoice-header-fields { flex-basis: 100%; }
    .invoice-header-fields,
    .invoice-management-fields,
    .invoice-notes-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 650px) {
    .invoice-header-fields,
    .invoice-management-fields,
    .invoice-notes-fields { grid-template-columns: minmax(0, 1fr); }
    .invoice-header-fields > .campo.col-3 { grid-column: auto; }
}

/* Cliente: tarjeta independiente de productos, precios y ofertas especiales. */
.client-offers-card { box-sizing: border-box; width: calc(100% - 40px); max-width: 1880px; margin: 22px auto; padding: 22px; border: 1px solid #e5ebef; border-radius: 12px; background: #fff; box-shadow: 0 4px 14px rgba(34,61,80,.05); }
#program-body > .client-offers-card { width: 100%; max-width: none; margin: 22px 0; }
.client-offers-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 20px; }
.client-offers-kicker { color: #00a9c2; font-size: 10px; font-weight: 800; letter-spacing: 1.4px; }
.client-offers-heading h2 { margin: 5px 0 0; color: #23758a; font-size: 16px; font-weight: bold; letter-spacing: .04em; text-transform: uppercase; }
.client-offers-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.client-offers-actions a { text-decoration: none; }
.client-offers-scroll { overflow-x: auto; border: 1px solid #e5ebef; border-radius: 8px; }
.client-offers-columns,
.client-offers-row { display: grid; grid-template-columns: 120px minmax(140px, 1fr) minmax(240px, 3fr) minmax(180px, 1.5fr); align-items: center; gap: 16px; box-sizing: border-box; min-width: 760px; padding: 14px 16px; }
.client-offers-columns { background: #f4f8fa; color: #71808d; font-size: 11px; font-weight: 700; letter-spacing: .04em; }
.client-offers-row { border-top: 1px solid #edf1f4; color: #28323c; font-size: 13px; line-height: 1.5; text-decoration: none; }
.client-offers-row > span { min-width: 0; overflow-wrap: anywhere; }
.client-offers-row:hover { background: #f0f8fa; color: #23758a; }
.client-offers-row:focus-visible { outline: 2px solid #1686a4; outline-offset: -2px; }
.client-offers-global { color: #1686a4; text-align: center; }
.client-offers-reference { color: #23758a; font-weight: 600; }
.client-offers-empty { padding: 24px 16px; color: #71808d; font-size: 13px; }
.client-offers-print-info { display: none; }
.client-offers-sr-only { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
@media (max-width: 650px) {
    .client-offers-card { padding: 16px; }
    .client-offers-heading { align-items: flex-start; flex-direction: column; }
}
@media print {
    .client-offers-card { width: 100%; margin: 0; padding: 0; border: 0; box-shadow: none; }
    .client-offers-print-info { display: flex; flex-wrap: wrap; gap: 16px; margin-bottom: 16px; font-size: 11px; }
    .client-offers-scroll { overflow: visible; }
    .client-offers-columns,
    .client-offers-row { min-width: 0; grid-template-columns: 75px minmax(70px, 1fr) minmax(120px, 3fr) minmax(100px, 1.5fr); gap: 8px; padding: 8px; font-size: 10px; }
    .client-offers-actions { display: none; }
}

/* Ofertas del cliente: popup corporativo y edición sin abandonar la ficha. */
.nexus-offer-dialog { box-sizing: border-box; width: min(920px, calc(100% - 32px)); max-height: calc(100vh - 32px); padding: 0; border: 1px solid #d5e2e7; border-radius: 12px; background: #fff; color: #28323c; box-shadow: 0 20px 70px rgba(20,45,60,.24); }
.nexus-offer-dialog::backdrop { background: rgba(17,40,55,.48); }
.nexus-offer-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 18px 22px; border-bottom: 1px solid #e5ebef; }
.nexus-offer-heading h2 { margin: 5px 0 0; color: #17232e; font-size: 19px; }
.nexus-offer-close, .nexus-offer-remove { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; padding: 0; border: 1px solid #d5e2e7; border-radius: 5px; background: #fff; color: #23758a; font-size: 22px; cursor: pointer; }
.nexus-offer-close:hover, .nexus-offer-remove:hover { background: #e5f5f8; }
.nexus-offer-content { padding: 20px 22px; }
.nexus-offer-dialog .nexus-form-area { margin: 0 0 16px; padding: 16px; }
.nexus-offer-dialog .nexus-form-area-title { font-size: 13px; margin: 0 0 12px; }
.nexus-offer-dialog .nexus-offer-fields { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.nexus-offer-product-field { grid-column: span 2; }
.nexus-offer-dialog input[readonly] { background: #f4f8fa; color: #52616c; }
.nexus-offer-dialog #client-offer-delete { margin-right: auto; }
.nexus-offer-dialog [hidden] { display: none; }
.nexus-offer-dialog label { display: block; color: #71808d; font-size: 11px; line-height: 1.4; }
.nexus-offer-dialog input, .nexus-offer-dialog select { box-sizing: border-box; display: block; width: 100%; height: 34px; margin-top: 6px; padding: 6px 9px; border: 1px solid #d6e2e9; border-radius: 4px; background: #fff; color: #28323c; font: inherit; font-size: 13px; }
.nexus-offer-dialog input:focus, .nexus-offer-dialog select:focus { outline: 2px solid rgba(22,134,164,.15); border-color: #1686a4; }
.nexus-offer-search { position: relative; }
#client-offer-products { position: absolute; z-index: 1; top: 100%; left: 0; right: 0; max-height: 210px; overflow-y: auto; margin-top: 4px; padding: 4px; border: 1px solid #d6e2e9; border-radius: 6px; background: #fff; box-shadow: 0 8px 20px rgba(20,45,60,.15); }
#client-offer-products[hidden], .nexus-offer-notice[hidden], #client-offer-error[hidden] { display: none; }
.nexus-offer-product-option { display: block; width: 100%; padding: 9px; border: 0; border-radius: 4px; background: #fff; color: #28323c; font: inherit; font-size: 13px; text-align: left; cursor: pointer; }
.nexus-offer-product-option:hover, .nexus-offer-product-option[aria-selected="true"] { background: #e5f5f8; }
.nexus-offer-range-headings, .nexus-offer-range { display: grid; grid-template-columns: 1fr 1fr 1.5fr 32px; align-items: end; gap: 10px; }
.nexus-offer-range-headings { margin-bottom: 6px; color: #71808d; font-size: 11px; line-height: 1.4; }
.nexus-offer-range { margin-bottom: 12px; }
.nexus-offer-sr-only { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.nexus-offer-footer { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 10px; padding: 16px 22px; border-top: 1px solid #e5ebef; background: #f4f8fa; }
.nexus-offer-notice { padding: 10px 12px; border: 1px solid #ecd9a6; border-radius: 5px; background: #fff8e7; color: #715722; font-size: 13px; }
#client-offer-error { color: #b52a37; font-size: 13px; }
#client-offers-feedback { margin: 12px 0 0; color: #23758a; font-size: 12px; }
#client-offers-feedback:empty, #client-offer-refresh[hidden], #client-offer-save[hidden] { display: none; }
@media (max-width: 650px) {
    .nexus-offer-heading, .nexus-offer-content, .nexus-offer-footer { padding: 14px; }
    .nexus-offer-dialog .nexus-offer-fields { grid-template-columns: 1fr; }
    .nexus-offer-product-field { grid-column: auto; }
    .nexus-offer-range-headings, .nexus-offer-range { grid-template-columns: 1fr 1fr 32px; }
    .nexus-offer-range-headings > span:nth-child(3) { grid-column: 1 / 3; grid-row: 2; }
    .nexus-offer-range-headings > span:last-child { display: none; }
    .nexus-offer-range > label:nth-child(3) { grid-column: 1 / 3; grid-row: 2; }
    .nexus-offer-range > button { grid-column: 3; grid-row: 2; }
}

/* Ficha de pedidos a proveedor: campos, observaciones y líneas. */
.provider-order-header-fields,
.provider-order-date-fields,
.provider-order-subject-fields { display: flex; flex-wrap: wrap; }
.provider-order-header-fields > .campo.col-05 { flex: 0 0 6.25%; }
.provider-order-header-fields > .campo.col-3 { flex: 0 0 25%; }
.provider-order-header-fields > .campo.col-2,
.provider-order-subject-fields > .campo.col-2 { flex: 0 0 16.66666667%; }
.provider-order-date-fields > .campo.col-105 { flex: 0 0 12.5%; }
.provider-order-subject-fields > .campo.col-4 { flex: 0 0 33.33333333%; }
.provider-order-date-fields .label { display: flex; align-items: center; min-height: 36px; line-height: 18px; white-space: normal; }
.provider-order-form .provider-order-field-wide { grid-column: 1 / -1; }
.provider-order-form .nexus-form-fields > .campo.nv { display: none; }
.provider-order-form .nexus-form-fields textarea,
.provider-order-form .provider-order-additional-data {
    box-sizing: border-box;
    width: 100%;
    min-height: 100px;
    border-radius: 4px;
}
.provider-order-form .nexus-form-fields textarea { resize: vertical; }
.provider-order-form .provider-order-lines-scroll { overflow-x: auto; }
.provider-order-form .provider-order-lines { min-width: 1400px; }
.provider-order-form .provider-order-lines-heading { margin-top: 0; }
.provider-order-lines-heading > .wrapper,
.provider-order-lines .linea-registro {
	display: grid;
	grid-template-columns: 28px 190px minmax(180px, 1fr) 90px 60px 90px 75px 65px 90px 28px 75px 28px 75px 28px 28px;
	gap: 6px;
	align-items: start;
}
.provider-order-lines-heading > .wrapper > div,
.provider-order-lines .linea-registro > .campo { float: none !important; width: auto !important; min-width: 0; margin: 0 !important; }
.provider-order-lines .input-container,
.provider-order-lines .styled-input,
.provider-order-lines .select-style,
.provider-order-lines select,
.provider-order-lines textarea,
.provider-order-lines .styled-input input { box-sizing: border-box; width: 100% !important; min-width: 0; margin-right: 0; margin-left: 0; }
/* Los campos interiores deben caber en los 28px útiles del contenedor con borde. */
.provider-order-lines .input-container .styled-input,
.provider-order-lines .input-container .styled-input input {
	height: 100%;
	line-height: 28px;
}
@media (max-width: 1100px) {
	.provider-order-header-fields,
	.provider-order-date-fields,
	.provider-order-subject-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 650px) {
	.provider-order-header-fields,
	.provider-order-date-fields,
	.provider-order-subject-fields { grid-template-columns: 1fr; }
}

/* Finder del listado general de facturas de cliente. */
#program-body-finder .finder .invoice-client-report-finder { row-gap: 12px; }

/* Fichas de series de facturas de cliente y proveedor. */
.invoice-series-form .nexus-form-area:last-child { margin-bottom: 0; }
.invoice-series-form .invoice-series-default { align-self: end; }
.invoice-series-form .user-permission input[type="checkbox"] { width: 16px; height: 16px; accent-color: #1686a4; }

/* Ficha de facturas de proveedor: áreas, campos compactos, líneas y totales. */
.invoice-provider-form { min-width: 0; }
/* El interior respeta los 28px útiles del control de 30px, incluidos sus bordes. */
.invoice-provider-form .input-container .styled-input { height: 100%; line-height: 28px; border-radius: 3px; }
.invoice-provider-form .input-container .styled-input input { height: 100%; line-height: 28px; }
.invoice-provider-data-area > .invoice-provider-header-fields {
	grid-template-columns: minmax(120px, 1.3fr) minmax(72px, .65fr) minmax(80px, .7fr) minmax(110px, .9fr) minmax(140px, 1.2fr) minmax(220px, 2.4fr) minmax(95px, .8fr) minmax(140px, 1.2fr) minmax(48px, .45fr);
}
.invoice-provider-header-fields > .campo,
.invoice-provider-management-fields > .campo { min-width: 0; }
.invoice-provider-header-fields .styled-input input,
.invoice-provider-management-fields .styled-input input { box-sizing: border-box; width: calc(100% - 10px) !important; }
.invoice-provider-management-fields { grid-template-columns: repeat(4, minmax(135px, 1fr)); }
.invoice-provider-notes-fields { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.invoice-provider-notes-fields textarea { box-sizing: border-box; width: 100% !important; min-height: 100px; resize: vertical; }
.invoice-provider-notes-fields .campo > .wrapper { width: 100%; }
.invoice-provider-lines-scroll,
.invoice-provider-totals-scroll { overflow-x: auto; padding-bottom: 8px; }
.invoice-provider-lines-scroll > #wrapper { min-width: 1030px; }
.invoice-provider-lines-scroll .margin-top-30 { margin-top: 0; }
.invoice-provider-lines-scroll .margin-top-30 > .wrapper,
.invoice-provider-lines-scroll .linea-registro {
	display: grid;
	grid-template-columns: 28px 105px minmax(220px, 1fr) 72px 58px 72px 72px 60px 88px 28px;
	gap: 7px;
	align-items: start;
}
.invoice-provider-lines-scroll .margin-top-30 > .wrapper > div,
.invoice-provider-lines-scroll .linea-registro > .campo,
.invoice-provider-lines-scroll .linea-registro > div:not(.idp) { float: none !important; box-sizing: border-box; width: auto !important; min-width: 0; margin: 0 !important; }
/* Reservar las columnas de acciones al bloquear la factura contablemente. */
.invoice-provider-lines-scroll .linea-registro > .campo.nv { display: block !important; visibility: hidden; pointer-events: none; }
.invoice-provider-lines-scroll .input-container,
.invoice-provider-lines-scroll .styled-input,
.invoice-provider-lines-scroll .select-style,
.invoice-provider-lines-scroll select,
.invoice-provider-lines-scroll textarea,
.invoice-provider-lines-scroll .styled-input input { box-sizing: border-box; width: 100% !important; min-width: 0; margin: 0 !important; }
.invoice-provider-totals-fields { min-width: 1300px; }
.invoice-provider-totals-fields .invoice-provider-tax-field { margin-left: 1% !important; }
.invoice-provider-totals-fields .pedido-total-final { margin-left: auto !important; }
.invoice-provider-totals-fields .label { display: flex; flex-direction: column; justify-content: center; min-height: 36px; line-height: 18px; }
.invoice-provider-totals-fields .input-container,
.invoice-provider-totals-fields .styled-input { box-sizing: border-box; width: 100%; }
.invoice-provider-totals-fields .styled-input input { box-sizing: border-box; width: calc(100% - 10px) !important; margin-right: 5px; margin-left: 5px; }
.invoice-provider-totals-fields .label span { white-space: nowrap; }
.invoice-provider-balance { display: flow-root; }
.invoice-provider-balance-field { float: right; width: 150px; max-width: 100%; }
.invoice-provider-balance-field .input-container,
.invoice-provider-balance-field .styled-input,
.invoice-provider-balance-field input { box-sizing: border-box; width: 100%; }
.invoice-provider-management-fields > .campo:has(> .user-permission) { align-self: end; }
@media (max-width: 1100px) {
	.invoice-provider-data-area > .invoice-provider-header-fields,
	.invoice-provider-management-fields,
	.invoice-provider-notes-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 650px) {
	.invoice-provider-data-area > .invoice-provider-header-fields,
	.invoice-provider-management-fields,
	.invoice-provider-notes-fields { grid-template-columns: minmax(0, 1fr); }
}

/* Ficha de albaranes valorados de proveedor: datos, observaciones, líneas y totales. */
.delivery-provider-header-fields { grid-template-columns: minmax(110px, 1fr) minmax(130px, 1.1fr) minmax(220px, 2.5fr) minmax(180px, 1.7fr) minmax(120px, 1fr) minmax(150px, 1.3fr); }
.delivery-provider-header-fields .label { min-height: 36px; line-height: 18px; }
.delivery-provider-management-fields { grid-template-columns: repeat(2, minmax(160px, 1fr)); max-width: 650px; }
.delivery-provider-form #listaproveedor { box-sizing: border-box; width: 100%; max-width: 100%; }
.delivery-provider-form #file_albaran_label { position: relative; justify-content:flex-start; box-sizing:border-box; width:100%; min-height:34px; height:34px; border-radius:5px; background:#1686a4; }
.delivery-provider-form #file_albaran_label:hover { background:#116d86; }
.delivery-provider-form #file_albaran_label .inputfile_name { min-width:0; overflow:hidden; text-overflow:ellipsis; }
.delivery-provider-notes-fields { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.delivery-provider-notes-fields textarea { box-sizing: border-box; width: 100%; min-height: 90px; padding: 10px; border: 1px solid #d6e2e9; border-radius: 4px; background: #fff; resize: vertical; }
.delivery-provider-lines-scroll { overflow-x: auto; padding-bottom: 8px; }
.delivery-provider-lines { min-width: 1000px; }
.delivery-provider-lines-heading,
.delivery-provider-lines .linea-registro { display: grid; grid-template-columns: 28px 105px minmax(220px, 1fr) 78px 58px 78px 72px 60px 92px 28px; gap: 7px; align-items: start; }
.delivery-provider-lines-heading > div,
.delivery-provider-lines .linea-registro > div { float: none !important; box-sizing: border-box; width: auto !important; min-width: 0; margin: 0 !important; }
.delivery-provider-lines .input-container,
.delivery-provider-lines .styled-input,
.delivery-provider-lines .select-style,
.delivery-provider-lines select,
.delivery-provider-lines textarea,
.delivery-provider-lines .styled-input input { box-sizing: border-box; width: 100% !important; max-width: 100%; min-width: 0; margin: 0 !important; }
.delivery-provider-totals-fields .label span { white-space: nowrap; }
@media (max-width: 1100px) {
    .delivery-provider-header-fields,
    .delivery-provider-management-fields,
    .delivery-provider-notes-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .delivery-provider-management-fields { max-width: none; }
}
@media (max-width: 650px) {
    .delivery-provider-header-fields,
    .delivery-provider-management-fields,
    .delivery-provider-notes-fields { grid-template-columns: minmax(0, 1fr); }
}

/* Ficha de albaranes valorados de cliente: cabecera, gestión y firma; notas, líneas y totales compartidos con pedidos y facturas. */
.delivery-val-header-fields { grid-template-columns: minmax(72px, .65fr) minmax(115px, 1fr) minmax(240px, 2.8fr) 48px 58px minmax(150px, 1.3fr) minmax(100px, .9fr) minmax(100px, .9fr); }
.delivery-val-header-fields .label,
.delivery-val-management-fields .label { min-height: 36px; line-height: 18px; }
.delivery-val-management-fields { grid-template-columns: repeat(3, minmax(150px, 1fr)) minmax(240px, 1.5fr); max-width: 1200px; }
.delivery-val-service-fields.nv { display: none; }
.delivery-val-form .pedido-totals-fields { min-width: 1300px; }
.delivery-val-form .pedido-totals-fields .label span { white-space: nowrap; }
.delivery-val-signature { display: flow-root; }
.delivery-val-signature-box { float: right; width: 502px; max-width: 100%; }
.delivery-val-signature canvas { box-sizing: border-box; max-width: 100%; height: auto; border: 1px solid #999; background: #fff; }
.delivery-val-signature .nexus-action-button { margin-top: 7px; }
@media (max-width: 1100px) {
    .delivery-val-header-fields,
    .delivery-val-management-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 650px) {
    .delivery-val-header-fields,
    .delivery-val-management-fields { grid-template-columns: minmax(0, 1fr); }
}

/* Informe de valoración de stock */
.stock-value-table { overflow-x: auto; }
.stock-value-table > .leyenda,
.stock-value-table > .scroll-container { min-width: 920px; }
.stock-value-table .campo-leyenda,
.stock-value-table .campo-registro { box-sizing: border-box; min-width: 0; padding-right: 10px; }
.stock-value-total { margin-top: 18px; margin-bottom: 0; }
.stock-value-total .nexus-form-area-title { margin-bottom: 8px; }
.stock-value-total-amount { color: #23758a; font-size: 24px; font-weight: 700; font-variant-numeric: tabular-nums; }

/* Modal de progreso para lecturas de documentos con IA. */
.nexus-ai-progress-overlay { display:none; position:fixed; inset:0; z-index:100001; align-items:flex-start; justify-content:center; padding: min(18vh,190px) 16px 24px; box-sizing:border-box; background:rgba(0,0,0,.58); text-align:center; }
.nexus-ai-progress-overlay[style*="display: block"] { display:flex !important; }
.nexus-ai-progress-box { width:min(380px,100%); box-sizing:border-box; padding:30px 26px 27px; border-radius:10px; background:#fff; box-shadow:0 8px 35px rgba(0,0,0,.28); }
.nexus-ai-progress-icon { position:relative; display:flex; align-items:center; justify-content:center; width:64px; height:64px; margin:0 auto 15px; overflow:hidden; border-radius:18px; background:linear-gradient(145deg,#edfbff,#d5f6fb); color:#00a8bd; font-size:32px; box-shadow:0 4px 14px rgba(0,188,212,.22); }
.nexus-ai-progress-icon:after { position:absolute; top:-25%; left:-65%; width:42%; height:150%; content:""; transform:rotate(18deg); background:linear-gradient(90deg,transparent,rgba(255,255,255,.95),transparent); animation:nexusAiShine 1.8s ease-in-out infinite; }
.nexus-ai-progress-spark { position:absolute; width:6px; height:6px; border-radius:50%; background:#45d9e8; box-shadow:0 0 9px #00bcd4; animation:nexusAiSpark 1.4s ease-in-out infinite; }
.nexus-ai-progress-spark.spark-one { top:9px; right:8px; }
.nexus-ai-progress-spark.spark-two { bottom:10px; left:9px; animation-delay:.65s; }
.nexus-ai-progress-title { color:#222; font-size:16px; font-weight:700; }
.nexus-ai-progress-text { min-height:18px; margin-top:8px; color:#777; font-size:12px; font-weight:400; letter-spacing:.1px; }
@keyframes nexusAiShine { 0%{left:-65%} 55%,100%{left:125%} }
@keyframes nexusAiSpark { 0%,100%{opacity:.25;transform:scale(.7)} 50%{opacity:1;transform:scale(1.25)} }

/* Control corporativo para adjuntar un único fichero con acciones integradas. */
.nexus-single-file-control,
.invoice-file-control,
.budget-file-uploader,
.provider-order-document-button { display:inline-flex; position:relative; align-items:center; box-sizing:border-box; min-width:0; min-height:34px; max-width:100%; overflow:hidden; border:1px solid transparent; border-radius:5px; background:#1686a4; color:#fff; vertical-align:middle; }
.invoice-file-control { width:155px; max-width:calc(100% - 10px); height:34px; transition:width .15s ease,background-color .2s,border-color .2s; }
.invoice-file-control.has-file { width:calc(100% - 10px); }
.budget-invoice-file-control.client-sepa-file-control,
.budget-invoice-file-control.client-identity-file-control { width:auto !important; max-width:100%; height:34px; }
.nexus-single-file-control.is-dragover,
.invoice-file-control.is-dragover,
.budget-file-uploader.is-dragover { outline:2px dashed #1686a4; outline-offset:2px; }
.nexus-single-file-control input.inputfile,
.budget-file-uploader input.inputfile { position:absolute; width:1px; height:1px; opacity:0; overflow:hidden; z-index:-1; }
.nexus-single-file-trigger,
.invoice-file-control > label,
.budget-file-uploader .budget-file-dropzone,
.provider-order-document-button #provider-order-document-attach { display:inline-flex; flex:1 1 auto; align-items:center; justify-content:center; gap:7px; box-sizing:border-box; min-width:0; min-height:32px; height:32px; margin:0; padding:5px 11px; border:0; border-radius:0; background:transparent; color:#fff; font-size:12px; font-weight:600; line-height:1.2; white-space:nowrap; overflow:hidden; cursor:pointer; }
.nexus-single-file-trigger:hover,
.invoice-file-control > label:hover,
.budget-file-uploader .budget-file-dropzone:hover,
.provider-order-document-button #provider-order-document-attach:hover { background:rgba(0,0,0,.12); color:#fff; }
.nexus-single-file-trigger i,
.invoice-file-control > label i,
.budget-file-dropzone i { flex:0 0 auto; font-size:13px; }
.nexus-single-file-trigger span,
.invoice-file-control > label span { display:block; min-width:0; overflow:hidden; text-overflow:ellipsis; }
.nexus-single-file-actions,
.budget-file-actions,
.provider-order-document-links { display:inline-flex; flex:0 0 auto; align-items:center; gap:0; }
.nexus-single-file-actions[hidden],
.provider-order-document-links[hidden] { display:none; }
.nexus-single-file-action,
.invoice-file-control .afile1_download,
.invoice-file-control #afile1_delete,
.budget-file-uploader .budget-file-action,
.provider-order-document-links a,
.provider-order-document-links button { display:inline-flex; flex:0 0 30px; align-items:center; justify-content:center; box-sizing:border-box; width:30px !important; height:30px !important; margin:0 !important; padding:0; border:0; border-left:1px solid rgba(255,255,255,.3); border-radius:0; background:transparent; color:#fff !important; font-size:12px; line-height:1; text-decoration:none; cursor:pointer; }
.nexus-single-file-action:hover,
.invoice-file-control .afile1_download:hover,
.invoice-file-control #afile1_delete:hover,
.budget-file-uploader .budget-file-action:hover,
.provider-order-document-links a:hover,
.provider-order-document-links button:hover { background:rgba(0,0,0,.12); color:#fff !important; }
.budget-file-uploader { width:auto; min-width:110px; }
.budget-file-uploader .budget-file-dropzone { justify-content:flex-start; }
.budget-file-dropzone-content { display:flex; align-items:center; gap:7px; }
.budget-file-dropzone strong { font-size:12px; font-weight:600; }
.budget-file-dropzone small { display:none; }
.budget-file-name { display:none; }
.budget-file-uploader.has-file .budget-file-name { display:block; max-width:180px; overflow:hidden; text-overflow:ellipsis; }
.budget-file-actions { position:static; }
.budget-file-actions .budget-file-action-delete { display:none; }
.client-identity-file-control { display:inline-flex; width:max-content !important; vertical-align:top; }
.client-sepa-file-control #client-sepa-file-label { flex:1 1 auto; height:32px; padding:5px 11px; font-size:12px; }
.client-sepa-file-control.is-readonly #client-sepa-file-label { opacity:.6; cursor:not-allowed; }
.client-identity-file-control.pending-delete,
.client-sepa-file-control.pending-delete { background:#b45353; border-color:#943e3e; }
#client-sepa button:disabled,#client-identity button:disabled { opacity:.6; cursor:not-allowed; }

/* Acciones SEPA en el área bancaria de la ficha de cliente. */
#client-sepa { margin-top: 20px; }
#client-sepa:empty { display: none; }
.client-sepa-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.client-sepa-message { margin: 12px 0 0; font-size: 13px; color: #276343; }
.client-sepa-message.is-error { color: #a33131; }
#client-sepa button:disabled { opacity: .6; cursor: wait; }


/* Las listas de clientes y proveedores ocupan al menos el doble del campo si caben. */
#program-body-finder .finder .nexus-finder-provider-select .nexus-finder-select-options,
#program-body-finder .finder .nexus-finder-client-select .nexus-finder-select-options {
    box-sizing: border-box;
    left: 0;
    right: auto;
    width: max-content;
    min-width: min(200%, calc(100vw - 64px));
    max-width: min(960px, calc(100vw - 64px));
    overflow-x: auto;
}
#program-body-finder .finder .nexus-finder-provider-select .nexus-finder-select-option,
#program-body-finder .finder .nexus-finder-client-select .nexus-finder-select-option {
    white-space: nowrap;
}

/* Lupa de las líneas: forma de la papelera y colores del botón de pagos. */
.line-find-button {
    color: #fff;
    background: #1686a4;
    border-color: #1686a4;
    font-size: 16px;
}
.line-find-button:hover {
    background: #116d86;
    border-color: #116d86;
    color: #fff;
}

/* Papelera de las líneas: mismo botón rojo en todos los módulos. */
.delete-product-row {
    color: #b52a37;
    background: #fff0f1;
    border-color: #efc3c7;
    font-size: 16px;
}
.delete-product-row > .fa-trash { color: inherit; font-size: 16px; line-height: 1; }
.delete-product-row:hover { background: #b52a37; border-color: #b52a37; color: #fff; }

/* Proveedores del producto: selección corporativa del proveedor por defecto. */
.product-provider-default.user-permission { padding: 0 8px; gap: 6px; }
.product-provider-default input[type="radio"] {
    position: static; float: none; width: 16px; height: 16px; min-width: 16px;
    padding: 0; margin: 0; accent-color: #1686a4; cursor: pointer;
}
.product-provider-default:has(input:checked) { border-color: #1686a4; background: #e5f5f8; color: #23758a; }
.product-provider-default:focus-within { outline: 2px solid #1686a4; outline-offset: 2px; }

/* Ficha de ofertas: tramos y acciones de las líneas. */
.offer-form .offer-line-fields {
    grid-template-columns: minmax(100px, 1fr) minmax(100px, 1fr) minmax(190px, 1.5fr) 30px;
    align-items: end;
    margin-bottom: 18px;
}
.offer-form .offer-line-fields .input-container,
.offer-form .offer-line-fields .select-style { margin-top: 7px; }
.offer-form .offer-line-fields .delete-product-row {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    width: 30px;
    height: 32px;
    margin: 0;
    padding: 0;
}
.offer-form .offer-add-line { margin-top: 4px; }
@media (max-width: 1100px) {
    .offer-form .offer-line-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 650px) {
    .offer-form .offer-line-fields { grid-template-columns: minmax(0, 1fr); }
}

/* Ficha de almacén: observaciones a todo el ancho del formulario. */
.almacen-update-form .almacen-observaciones { grid-column: 1 / -1; }
.almacen-update-form .almacen-default-field {
	justify-self: start;
	align-self: end;
	width: max-content;
	max-width: 100%;
	min-width: 0;
	padding: 0 10px;
	gap: 7px;
}
.almacen-update-form .almacen-default-field input[type="checkbox"] {
	flex: 0 0 16px;
	width: 16px;
	height: 16px;
}
.almacen-update-form .almacen-observaciones textarea {
	box-sizing: border-box;
	display: block;
	width: 100%;
	max-width: 100%;
	min-height: 100px;
	resize: vertical;
}

/* Alta de contrapartidas: contenedor y selector de cuenta principal. */
#program-body.contrapartida-insert-body { padding: 22px; background: #fff; border-radius: 7px; }
.contrapartida-insert-body .contrapartida-insert-fields { display: flex; flex-wrap: wrap; gap: 18px; align-items: flex-start; }
.contrapartida-insert-fields > .campo { float: none; margin: 0; min-width: 0; }
.contrapartida-insert-fields > .col-3 { flex: 0 0 25%; }
.contrapartida-insert-fields > .col-105 { flex: 0 0 12.5%; }
.contrapartida-insert-fields .label { display: block; margin-bottom: 3px; color: #687887; font-size: 12px; line-height: 19px; }
.contrapartida-insert-fields :is(.select-style, .input-container, .styled-input) { box-sizing: border-box; width: 100%; }
.contrapartida-insert-fields .input-container { height: 32px; border-color: #d6e2e9; border-radius: 4px; }
.contrapartida-insert-fields .styled-input { height: 30px; line-height: 30px; }
.contrapartida-insert-fields .styled-input input { box-sizing: border-box; height: 30px; line-height: 30px; font-size: 13px; }
.contrapartida-insert-fields .contrapartida-code-input { display: flex; align-items: center; }
.contrapartida-code-input #cabecera_contrapartida { flex: 0 0 30%; width: 30%; min-width: 0; text-align: right; font-weight: bold; }
.contrapartida-code-input #contrapartida { flex: 1; width: 0; min-width: 0; }
.contrapartida-insert-body .nexus-finder-select-option[data-value="0"] { display: none; }
.contrapartida-insert-body .nexus-finder-select-options { text-align: left; }
@media (max-width: 700px) {
    #program-body.contrapartida-insert-body { padding: 14px; }
    .contrapartida-insert-fields > .campo { flex: 1 1 100%; width: 100%; }
}

/* Amortización masiva: elección de ejercicio, revisión y confirmación. */
#amortizar-todo-dialog { box-sizing: border-box; width: min(560px, calc(100vw - 32px)); max-height: calc(100vh - 32px); padding: 22px; border: 1px solid #d5e2e7; border-radius: 7px; background: #fff; color: #39464c; box-shadow: 0 12px 40px rgba(16,24,40,.2); }
#amortizar-todo-dialog::backdrop { background: rgba(20,43,67,.4); }
#amortizar-todo-dialog h2 { margin: 0 -22px 18px; padding: 0 22px 16px; border-bottom: 1px solid #e6edf1; color: #23758a; font-size: 16px; }
#amortizar-todo-dialog p { font-size: 13px; line-height: 1.5; }
.amortizar-todo-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin: 18px 0; }
.amortizar-todo-fields label { display: block; color: #687887; font-size: 12px; }
.amortizar-todo-fields input, .amortizar-todo-fields select { box-sizing: border-box; display: block; width: 100%; height: 32px; margin: 4px 0 0; padding: 0 8px; border: 1px solid #d6e2e9; border-radius: 4px; background: #fff; color: #142b43; font: inherit; font-size: 13px; }
#amortizar-todo-dialog .amortizar-todo-note { color: #687887; font-size: 12px; }
#amortizar-todo-result { margin: 16px 0; font-size: 13px; line-height: 1.5; }
#amortizar-todo-result.is-error { color: #a84442; }
#amortizar-todo-result.is-success { color: #267344; }
.amortizar-todo-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 20px -22px -22px; padding: 16px 22px; border-top: 1px solid #e6edf1; background: #f8fafb; border-radius: 0 0 7px 7px; }
#amortizar-todo-dialog [hidden] { display: none !important; }
@media (max-width: 500px) { .amortizar-todo-fields { grid-template-columns: 1fr; } }

/* Ficha de producto: motivo de corrección manual de existencias. */
.stock-product-row .stock-motive-field {
	width: 320px;
	max-width: calc(100% - 40px);
}


/* Ficha de proyectos: campos, líneas, adjuntos y actividad. */
.project-update .pr-shell { padding:20px;background:#fff }
.project-update .pr-alert { padding:10px 15px;margin:10px 0;background:#e5f7fa;border-left:4px solid #00b4ce;color:#333 }
.project-update .pr-alert.error { background:#fdeaea;border-color:#c33 }
.project-update .pr-field > label { display:flex;align-items:center;height:25px;font-size:11px;color:#7d8290;letter-spacing:1px;text-transform:uppercase }
.project-update .pr-field input:not([type=checkbox]):not([type=range]), .project-update .pr-field select { box-sizing:border-box;width:100%;height:32px;border:1px solid #d6e2e9;border-radius:4px;padding:0 7px;background:#fff }
.project-update .pr-field textarea { box-sizing:border-box;width:100%;min-height:110px;border:1px solid #d6e2e9;border-radius:4px;padding:9px;background:#fff;resize:vertical }
.project-update .pr-span-2 { grid-column:span 2 }
.project-update .pr-span-4 { grid-column:1 / -1 }
.project-update .pr-members { display:flex;flex-wrap:wrap;gap:10px;padding:8px 10px }
.project-update .pr-drop { border:2px dashed #9bcbd2;border-radius:4px;padding:25px;text-align:center;color:#555;background:#fff;cursor:pointer }
.project-update .pr-drop.drag { background:#e0f7fa;border-color:#00b4ce }
.project-update .pr-gallery { display:grid;grid-template-columns:repeat(auto-fill,minmax(150px,1fr));gap:12px;margin-top:14px }
.project-update .pr-photo { height:145px;border-radius:4px;background-size:cover;background-position:center;position:relative;border:1px solid #ccc }
.project-update .pr-file { display:flex;gap:10px;align-items:center;padding:10px;border-bottom:1px solid #ddd }
.project-update .pr-secret { background:#fffbea!important }
.project-update .pr-help { font-size:11px;color:#777;margin-top:4px }
.project-update .pr-drop .pr-gallery { width:100%;margin-top:20px;text-align:left }
.project-update .pr-drop .pr-gallery:empty { display:none }
.project-update .pr-drop .pr-photo { background-color:#fff }
.project-update .pr-delete { position:absolute;right:6px;top:6px;cursor:pointer;width:26px;height:24px;border:1px solid #d3d3d3;border-radius:5px;background:#fff;color:#111;font-size:17px;line-height:20px;box-shadow:0 1px 4px rgba(0,0,0,.18) }
.project-update .pr-delete:hover { background:#f2f2f2;color:#000 }
.project-update .pr-drop-empty { padding:18px 10px;color:#999 }
.project-update .pr-drop-empty .fa { display:block;margin-bottom:8px;color:#bbb }
.project-update #project-photo-drop, .project-update #project-document-drop { margin-top:5px }
.project-update .pr-document-drop { padding:12px 20px }
.project-update .pr-document-drop .pr-drop-empty { padding:18px 10px }
.project-update .pr-document-grid { display:grid;grid-template-columns:repeat(auto-fill,minmax(145px,1fr));gap:12px;text-align:left }
.project-update .pr-document-grid:empty { display:none }
.project-update .pr-document-card { position:relative;aspect-ratio:1/1;min-height:145px;border:1px solid #ccc;border-radius:4px;background:#fff;overflow:hidden }
.project-update .pr-document-link { box-sizing:border-box;width:100%;height:100%;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:8px;padding:24px 12px 12px;color:#444!important;text-decoration:none;text-align:center }
.project-update .pr-document-link>.fa { font-size:40px;color:#66717a }
.project-update .pr-document-name { width:100%;font-size:11px;line-height:15px;overflow:hidden;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;word-break:break-word }
.project-update .pr-document-size { font-size:10px;color:#999 }
.project-update .pr-activity-content { height:200px;overflow-y:auto;border-bottom:1px solid #ddd }
.project-update .pr-activity-content .pr-file { padding:7px 10px;font-size:11px;line-height:15px }
.project-update .pr-activity-content .pr-file strong { font-size:11px }
.project-update .pr-activity-content .pr-help { font-size:10px;line-height:14px }
.project-update .pr-progress-control { display:flex;align-items:center;gap:10px;height:32px }
.project-update .pr-progress-control progress { flex: 1; min-width: 0; width: 100%; height: 14px; border: 0; border-radius: 7px; overflow: hidden; appearance: none; -webkit-appearance: none; background: #dce5e9; color: #238553; }
.project-update .pr-progress-control progress::-webkit-progress-bar { background: #dce5e9; border-radius: 7px; }
.project-update .pr-progress-control progress::-webkit-progress-value { background: #238553; border-radius: 7px; }
.project-update .pr-progress-control progress::-moz-progress-bar { background: #238553; border-radius: 7px; }
.project-update .pr-progress-value { min-width:42px;text-align:right;font-weight:bold;color:#238553 }
.project-update .nexus-project-progress-track { position: relative; display: block; flex: 1; min-width: 0; height: 14px; overflow: hidden; border-radius: 7px; background: #dce5e9; }
.project-update .nexus-project-progress-done { position: absolute; inset: 0 auto 0 0; background: #238553; }
.project-update .nexus-project-progress-over { position: absolute; top: 0; bottom: 0; background: #c33; }
.project-update .nexus-project-progress-status { display: block; margin-top: 3px; font-size: 11px; font-weight: 600; }
.project-update .pr-field { min-width: 0; }
.project-update .pr-grid.two > .pr-field { grid-column: span 2; }
.project-update .pr-field input:focus,
.project-update .pr-field select:focus,
.project-update .pr-field textarea:focus { border-color: #1686a4; outline: 0; box-shadow: 0 0 0 2px rgba(22, 134, 164, .12); }
.project-update .pr-members input[type=checkbox] { width: 16px; height: 16px; }
#program-body-finder .title .project-save-top { margin-left: 0; white-space: nowrap; }
@media (max-width: 650px) {
    .project-update .pr-span-2,
    .project-update .pr-grid.two > .pr-field { grid-column: 1 / -1; }
    .project-update .pr-shell { padding: 12px; }
}


/* Ficha de proyectos: tareas compartidas con Scrum y listas de pendientes. */
.project-update .pr-tasks-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.project-update .pr-tasks-heading .nexus-form-area-title { margin: 0; }
.project-update .pr-tasks-heading a { text-decoration: none; }
.project-update .pr-tasks-list { display: grid; gap: 16px; }
.project-update .pr-task-filters { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 16px; }
.project-update .pr-task-filter { display: inline-flex; align-items: center; gap: 7px; padding: 7px 11px; border: 1px solid #d5e0e5; border-radius: 18px; background: #fff; color: #33434b; font: inherit; font-size: 13px; cursor: pointer; }
.project-update .pr-task-filter:hover { border-color: #1686a4; }
.project-update .pr-task-filter.is-active { border-color: #1686a4; background: #e8f5f8; color: #176d83; font-weight: 600; }
.project-update .pr-task-filter span { min-width: 20px; padding: 1px 5px; border-radius: 10px; background: rgba(89,106,116,.12); text-align: center; font-size: 11px; }
.project-update .pr-task-summary[hidden] { display: none !important; }
.project-update .pr-task-card { min-width: 0; padding: 16px; border: 1px solid #d5e2e7; border-radius: 7px; background: #fff; }
/* Papelera compacta en las subtareas del editor de proyectos y Scrum. */
#task-editor .kb-subtask-row .nexus-action-button.nexus-action-icon { width: 28px; min-width: 28px; height: 28px; min-height: 28px; padding: 0; font-size: 12px; }
#task-editor .kb-subtask-drag-handle { display: inline-block; margin-right: 5px; color: #809098; cursor: grab; user-select: none; }
#task-editor .kb-subtask-row .subtask-name { font-size: 13px; }
#task-editor .kb-subtask-drag-handle:active { cursor: grabbing; }
#task-editor .kb-subtask-row.dragging { opacity: .45; }
#task-editor .kb-subtask-row.drop-target { border-top: 2px solid #1686a4; }
.project-update .kb-subtask-row input[type=checkbox] { flex-shrink: 0; width: 16px; height: 16px; accent-color: #1686a4; }
.project-update .kb-subtask-row.done .subtask-name { text-decoration: line-through; color: #888; }
.project-update .kb-subtask-add { display: flex; align-items: center; gap: 8px; margin-top: 12px; }
.project-update .kb-subtask-add input { flex: 1; min-width: 0; height: 37px; padding: 0 9px; box-sizing: border-box; border: 1px solid #d6e2e9; border-radius: 4px; background: #fff; }
.project-update #task-editor { display: flex; flex-direction: column; width: 800px; max-width: calc(100vw - 32px); max-height: 80vh; overflow: hidden; background: #fff; }
.project-update #task-editor .content { flex: 0 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 12px 18px; text-align: left; }
#task-editor { display: flex; flex-direction: column; top: 10vh; transform: translateX(-50%); height: auto; max-height: 80vh; overflow: hidden; }
#task-editor > .title { flex: 0 0 auto; z-index: 2; background: #f4f8fa; box-shadow: 0 2px 6px rgba(38,59,67,.08); }
#task-editor > .content { flex: 0 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 12px 18px; }
#task-editor .kb-editor-footer { flex: 0 0 auto; z-index: 3; display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 10px; margin: 0; padding: 12px 18px; border-top: 1px solid #d5e2e7; background: #f4f8fa; box-shadow: 0 -4px 10px rgba(38,59,67,.08); }
#task-editor .kb-editor-footer form { margin: 0 !important; }
.project-update .kb-task-section,
.project-update .kb-subtasks { margin-bottom: 16px; padding: 18px; box-sizing: border-box; min-width: 0; border: 1px solid #d5e2e7; border-radius: 7px; background: #f4f8fa; }
.project-update .kb-subtasks-title { display: flex; justify-content: space-between; gap: 10px; }
.project-update .kb-task-fields { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }
.project-update .kb-task-assignment-section .kb-task-fields { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.project-update .kb-task-fields > .kb-field:not(.kb-field-wide) { grid-column: span 1; }
.project-update .kb-task-date-field { grid-row: 2; width: fit-content; max-width: 100%; }
.project-update .kb-task-date-field:nth-child(4) { grid-column: 1; }
.project-update .kb-task-date-field:nth-child(5) { grid-column: 2; }
.project-update .kb-task-date-field:nth-child(6) { grid-column: 3; }
.project-update .kb-task-date-field .nexus-project-date-control { width: 240px; max-width: 100%; }
.project-update .kb-task-date-field .nexus-project-date-control input.nexus-project-date { flex: 1 1 auto; width: auto; min-width: 0; }
.project-update .kb-task-fields > .nexus-task-time-assessment.kb-field-wide { grid-column: 1 / -1; }
.project-update .kb-field { min-width: 0; }
.project-update .kb-field-span-2 { grid-column: 1 / -1; }
#task-editor .kb-grid > .kb-task-section:first-child .kb-task-fields { grid-template-columns: 1fr; }
#task-editor .kb-grid > .kb-task-section:first-child .kb-field-span-2 { grid-column: 1 / -1; }
.project-update .kb-field-wide { grid-column: 1 / -1; }
.project-update .kb-field label { display: block; margin-bottom: 5px; color: #667580; font-size: 11px; text-transform: uppercase; }
.project-update .kb-field input,
.project-update .kb-field select,
.project-update .kb-field textarea { width: 100%; height: 32px; box-sizing: border-box; border: 1px solid #d6e2e9; border-radius: 4px; background: #fff; padding: 0 8px; }
.project-update .kb-field textarea { min-height: 110px; padding: 9px; resize: vertical; }
.project-update .kb-subtask-row { display: flex; align-items: center; gap: 8px; padding: 7px 0; border-top: 1px solid #d5e2e7; }
.project-update .kb-subtask-row form { margin: 0; }
.project-update .kb-subtask-row .subtask-name { flex: 1; min-width: 0; overflow-wrap: anywhere; font-size: 13px; }
.project-update .kb-subtask-weight { margin-left: 6px; font-size: 11px; color: #777; }
.project-update .kb-editor-footer { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
.project-update .kb-editor-footer form { margin: 0 !important; }
@media (max-width: 650px) {
    .project-update .kb-subtask-add { flex-wrap: wrap; }
    .project-update .kb-subtask-add input { flex-basis: 100%; }
}


/* Campos del editor de tareas dentro del proyecto. */
.project-update .kb-field input[readonly] { color: #667580; background: #fff; cursor: default; }
/* Diferenciar los totales calculados de los campos editables, en ficha y tablero. */
.kb-task-section .kb-field input[readonly]:is([name="horas_estimadas"], [name="horas_reales"], [data-time-balance]) { background: #e8eef1; border-color: #b9c8cf; cursor: default; }
@media (max-width: 1100px) {
    .project-update .kb-task-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .project-update .kb-task-assignment-section .kb-task-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .project-update .kb-task-fields > .kb-field:not(.kb-field-wide) { grid-column: span 1; }
    .project-update .kb-task-date-field { grid-row: auto; width: 100%; }
    .project-update .kb-task-date-field:nth-child(4), .project-update .kb-task-date-field:nth-child(5), .project-update .kb-task-date-field:nth-child(6) { grid-column: auto; }
    .project-update .kb-task-date-field .nexus-project-date-control { width: 100%; }
}
@media (max-width: 650px) {
    .project-update .kb-task-fields { grid-template-columns: 1fr; }
    .project-update .kb-task-fields > .kb-field:not(.kb-field-wide) { grid-column: 1 / -1; }
    .project-update .kb-field-span-2 { grid-column: 1 / -1; }
    #task-editor .kb-grid > .kb-task-section:first-child .kb-task-fields { grid-template-columns: 1fr; }
}


/* Tarjetas de tareas: apertura del editor y días hasta la fecha límite. */
.project-update .pr-task-summary { display: block; color: inherit; text-decoration: none; cursor: pointer; transition: border-color .15s ease, box-shadow .15s ease; }
.project-update .pr-task-summary:hover { border-color: #1686a4; box-shadow: 0 2px 8px rgba(22, 134, 164, .15); }
.project-update .pr-task-summary:focus-visible { outline: 2px solid #1686a4; outline-offset: 5px; border-radius: 4px; }
.project-update .pr-task-summary-heading { display: flex; align-items: center; flex-wrap: wrap; gap: 10px 16px; padding-bottom: 14px; margin-bottom: 14px; border-bottom: 1px solid #e5ecef; }
.project-update .pr-task-progress { flex-shrink: 0; font-size: 15px; font-weight: bold; }
.project-update .pr-task-name { display: block; min-width: 0; color: #263b43; font-size: 17px; font-weight: bold; overflow-wrap: anywhere; }
.project-update .pr-task-summary-fields { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr) minmax(0, 1fr) minmax(0, 1.2fr); gap: 18px 28px; color: #33434b; font-size: 14px; }
.project-update .pr-task-summary-fields > span { min-width: 0; overflow-wrap: anywhere; }
.project-update .pr-task-summary-label { display: block; margin-bottom: 7px; color: #596a74; font-size: 12px; }
.project-update .pr-task-summary-value { font-weight: 600; }
.project-update .pr-task-dates { display: grid; grid-template-columns: minmax(0, 1fr); align-content: start; gap: 3px; }
.project-update .pr-task-dates-title { display: block; margin: 0 0 1px; color: #596a74; font-size: 12px; line-height: 1.2; }
.project-update .pr-task-date-entry { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 3px; min-width: 0; }
.project-update .pr-task-date-entry .pr-task-summary-label { display: inline-block; flex: 0 0 auto; margin: 0; color: #33434b; font-size: 13px; white-space: nowrap; }
.project-update .pr-task-date-entry .pr-task-summary-value { display: inline; font-size: 14px; line-height: 1.2; font-weight: 600; }
.project-update .pr-task-date-entry .pr-task-deadline { display: inline; margin: 0; font-size: 12px; line-height: 1.2; white-space: nowrap; }
.project-update .pr-task-badges { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.project-update .pr-task-status,
.project-update .pr-task-priority { padding: 4px 9px; border-radius: 5px; font-size: 12px; font-weight: 600; }
.project-update .pr-task-status.status-backlog { background: #e8edf0; color: #596a74; }
.project-update .pr-task-status.status-pendiente { background: #e1edf2; color: #23758a; }
.project-update .pr-task-status.status-en_curso { background: #d9f1f5; color: #23758a; }
.project-update .pr-task-status.status-revision { background: #fff1d5; color: #815800; }
.project-update .pr-task-status.status-bloqueada { background: #fde8e7; color: #a82f2f; }
.project-update .pr-task-status.status-hecha { background: #e6f4e8; color: #397d3f; }
.project-update .pr-task-priority.priority-baja { background: #e6f4e8; color: #397d3f; }
.project-update .pr-task-priority.priority-media { background: #fff1d5; color: #815800; }
.project-update .pr-task-priority.priority-alta { background: #fde8e7; color: #a82f2f; }
.project-update .pr-task-hours { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; font-size: 13px; }
.project-update .pr-task-hours > span { white-space: nowrap; }
.project-update .pr-task-hours strong { font-weight: 600; }
.project-update .pr-task-progress-header { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 4px 12px; margin: 6px 0 3px; }
.project-update .pr-task-progress-percent { display: inline-flex; align-items: center; padding: 3px 7px; border-radius: 4px; background: #238553; color: #fff; font-size: 10px; font-weight: 700; line-height: 15px; white-space: nowrap; }
.project-update .pr-task-progress-header .pr-task-time-remaining { margin-left: auto; }
.project-update .pr-task-summary-realizado { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.project-update .pr-task-subtask-count { color: #596a74; font-size: 12px; text-align: right; }
.project-update .pr-task-deadline { display: block; margin-top: 5px; color: #23758a; font-size: 12px; font-weight: bold; }
.project-update .pr-task-deadline.overdue { color: #c33; }
.project-update .pr-task-deadline.today { color: #936000; }
@media (max-width: 1100px) {
    .project-update .pr-task-summary-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 650px) {
    .project-update .pr-task-summary-fields { gap: 18px; }
    .project-update .pr-task-name { flex-basis: 100%; }
}
@media (max-width: 380px) {
    .project-update .pr-task-summary-fields { grid-template-columns: 1fr; }
}


/* Fechas de proyectos y tareas: calendario común con navegación diaria. */
.nexus-project-date-control { display: flex; align-items: stretch; box-sizing: border-box; width: 100%; height: 32px; overflow: hidden; border: 1px solid #d6e2e9; border-radius: 4px; background: #fff; }

/* Fechas segmentadas en proyectos. */
.nexus-project-date-control.nexus-date-parts-host { overflow: visible; }
.nexus-project-date-control.nexus-date-parts-host .nexus-date-parts { height: 30px; }
.project-update .pr-field .nexus-project-date-control .nexus-date-parts input.nexus-date-part,
.project-update .kb-field .nexus-project-date-control .nexus-date-parts input.nexus-date-part,
.nexus-project-date-control.nexus-date-parts-host .nexus-date-parts input.nexus-date-part { box-sizing: border-box; flex: 0 0 2ch; width: 2ch; min-width: 0; height: 28px; padding: 0; border: 0; background: transparent; text-align: center; }
.project-update .pr-field .nexus-project-date-control .nexus-date-parts input.nexus-date-part:nth-of-type(3),
.project-update .kb-field .nexus-project-date-control .nexus-date-parts input.nexus-date-part:nth-of-type(3),
.nexus-project-date-control.nexus-date-parts-host .nexus-date-parts input.nexus-date-part:nth-of-type(3) { flex-basis: 4ch; width: 4ch; }


.nexus-project-date-control.nexus-date-parts-host .nexus-date-parts .nexus-date-step { flex: 0 0 15px; width: 15px; min-width: 15px; height: 30px; }
.nexus-project-date-control.nexus-date-parts-host .nexus-date-parts .nexus-date-step:first-child { margin-right: auto; }
.nexus-project-date-control.nexus-date-parts-host .nexus-date-parts .nexus-date-step:last-child { margin-left: auto; }


/* Mantener la fecha compacta y centrada entre las flechas laterales. */
.nexus-project-date-control.nexus-date-parts-host:has(input[data-nexus-date-ui="payment"]) .nexus-date-parts { position: relative; justify-content: center; gap: 2px; padding: 0 15px; }
.nexus-project-date-control.nexus-date-parts-host:has(input[data-nexus-date-ui="payment"]) .nexus-date-parts input.nexus-date-part { flex: 0 0 2ch; width: 2ch; }
.nexus-project-date-control.nexus-date-parts-host:has(input[data-nexus-date-ui="payment"]) .nexus-date-parts input.nexus-date-part:nth-of-type(3) { flex: 0 0 4ch; width: 4ch; }
.nexus-project-date-control.nexus-date-parts-host:has(input[data-nexus-date-ui="payment"]) .nexus-date-parts .nexus-date-step { position: absolute; top: 0; margin: 0; border-radius: 0; }
.nexus-project-date-control.nexus-date-parts-host:has(input[data-nexus-date-ui="payment"]) .nexus-date-parts .nexus-date-step:first-child { left: 0; border-radius: 3px 0 0 3px; }
.nexus-project-date-control.nexus-date-parts-host:has(input[data-nexus-date-ui="payment"]) .nexus-date-parts .nexus-date-step:last-child { right: 0; border-radius: 0 3px 3px 0; }

.nexus-project-date-control:focus-within { border-color: #1686a4; box-shadow: 0 0 0 2px rgba(22, 134, 164, .12); }
.nexus-project-date-control input.nexus-project-date { float: none; flex: 1; min-width: 0; width: 100%; height: 30px; margin: 0; padding: 0 4px; border: 0; border-radius: 0; border-left: 1px solid #d6e2e9; border-right: 1px solid #d6e2e9; background: #fff; color: #142b43; font-size: 13px; line-height: 30px; text-align: center; cursor: pointer; outline: 0; box-shadow: none; }
.nexus-project-date-control .nexus-project-date-step { box-sizing: border-box; display: inline-flex; align-items: center; justify-content: center; flex: 0 0 15px; width: 15px; min-height: 0; height: 30px; padding: 0; border: 0; border-radius: 0; background: #fff; color: #1686a4; cursor: pointer; }
.nexus-project-date-control .nexus-project-date-clear { flex-basis: 24px; width: 24px; border-left: 1px solid #d6e2e9; color: #667580; }
.nexus-project-date-control .nexus-project-date-step:hover,
.nexus-project-date-control .nexus-project-date-step:focus-visible { background: #edf6f9; outline: 1px solid #1686a4; outline-offset: -1px; }
.project-update .pr-field .nexus-project-date-control input.nexus-project-date,
.project-update .kb-field .nexus-project-date-control input.nexus-project-date { height: 30px; padding: 0 4px; border: 0; border-left: 1px solid #d6e2e9; border-right: 1px solid #d6e2e9; border-radius: 0; box-shadow: none; }

/* Diálogo de tiempo dedicado al completar una subtarea. */
.nexus-subtask-time-dialog { box-sizing: border-box; width: 440px; max-width: calc(100vw - 32px); padding: 22px; border: 1px solid #d5e2e7; border-radius: 7px; background: #f4f8fa; color: #33434b; box-shadow: 0 10px 35px rgba(20, 43, 67, .25); }
.nexus-subtask-time-dialog::backdrop { background: rgba(20, 43, 67, .4); }
.nexus-subtask-time-name { margin: 0 0 18px; font-size: 14px; font-weight: 600; overflow-wrap: anywhere; }
.nexus-subtask-time-dialog label { display: block; margin-bottom: 6px; font-size: 13px; }
.nexus-subtask-time-dialog input { box-sizing: border-box; width: 100%; height: 37px; padding: 0 10px; border: 1px solid #d6e2e9; border-radius: 4px; background: #fff; font-size: 14px; }
.nexus-subtask-time-help { color: #596a74; font-size: 12px; line-height: 1.5; }
.nexus-subtask-time-actions { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 10px; margin-top: 18px; }

/* Comparación de tiempo estimado y real respecto al avance de las tareas. */
.nexus-task-time-good { color: #238553; }
.nexus-task-time-bad { color: #c33; }
.nexus-task-time-neutral { color: #667580; }
.nexus-task-time-state { display: block; margin-top: 7px; font-size: 12px; font-weight: 600; }
.nexus-task-time-detail { display: block; margin-top: 4px; color: #596a74; font-size: 12px; line-height: 1.4; }
.nexus-task-time-board { display: flex; flex-wrap: wrap; gap: 4px 12px; margin-top: 9px; font-size: 11px; }
.nexus-task-time-board-bar { display: block; width: 100%; }
.nexus-task-time-board-bar .nexus-task-time-bar { height: 12px; }
.nexus-task-time-board .nexus-task-time-state,
.nexus-task-time-board .nexus-task-time-detail { flex-basis: 100%; margin-top: 2px; font-size: 11px; }
.nexus-task-time-assessment { align-self: end; padding-bottom: 3px; }
.nexus-task-time-assessment .nexus-task-time-state { margin-top: 0; }
.kb-field input.nexus-task-time-good[readonly] { color: #238553; font-weight: 600; }
.kb-field input.nexus-task-time-bad[readonly] { color: #c33; font-weight: 600; }
.kb-field input.nexus-task-time-neutral[readonly] { color: #667580; }
#task-editor .kb-field input[name="horas_reales"][readonly] { color: #000; }
.project-update .kb-field input.nexus-task-time-good[readonly] { color: #238553; }
.project-update .kb-field input.nexus-task-time-bad[readonly] { color: #c33; }


/* Horas globales del proyecto calculadas desde sus tareas. */
.project-update .pr-field input.nexus-task-time-good[readonly] { color: #238553; font-weight: 600; }
.project-update .pr-field input.nexus-task-time-bad[readonly] { color: #c33; font-weight: 600; }
.project-update .pr-field input.nexus-task-time-neutral[readonly] { color: #667580; }


/* Títulos corporativos y comparación visual de horas en el editor de tareas. */
#task-editor .kb-task-section-title.nexus-form-area-title,
#task-editor .kb-subtasks-title.nexus-form-area-title { margin: 0 0 16px; color: #23758a; font-size: 16px; font-weight: bold; letter-spacing: .04em; text-transform: uppercase; }
#task-editor .kb-subtasks-title { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
/* Acceso al asistente de IA junto al contador de subtareas. */
#task-editor .kb-subtasks-tools { display: inline-flex; align-items: center; gap: 16px; flex-shrink: 0; }
#task-editor .project-subtask-ai[hidden] { display: none !important; }
/* Propuesta compacta de subtareas del asistente de IA. */
#task-editor .project-subtask-ai-columns, #task-editor .project-subtask-ai-row { display: grid; grid-template-columns: minmax(0,1fr) 112px 28px; align-items: center; gap: 6px; }
#task-editor .project-subtask-ai-columns { padding: 8px 0; color: #667580; font-size: 10px; font-weight: 700; text-transform: uppercase; }
#task-editor .project-subtask-ai-columns span:nth-child(2) { text-align: center; }
#task-editor .project-subtask-ai-row { padding: 6px 0; border-top: 1px solid #d5e2e7; }
#task-editor .project-subtask-ai-name { display: flex; align-items: center; min-width: 0; }
#task-editor .project-subtask-ai .project-subtask-ai-name input { height: 28px; min-height: 28px; padding: 2px 8px; border-color: #d6e2e9; font-size: 13px; }
#task-editor .project-subtask-ai-name .kb-subtask-description-toggle { flex-shrink: 0; }
#task-editor .project-subtask-ai .kb-subtask-stepper input[type="number"] { height: 26px; min-height: 26px; padding: 2px 3px; border: 0; border-right: 1px solid #dce7eb; border-left: 1px solid #dce7eb; border-radius: 0; font-size: 12px; }
#task-editor .project-subtask-ai-row > .nexus-action-icon { width: 28px; min-width: 28px; height: 28px; min-height: 28px; padding: 0; font-size: 12px; }
#task-editor .project-subtask-ai-description { grid-column: 1 / -1; padding: 8px; border-top: 1px dashed #d5e2e7; background: #f8fbfc; }
#task-editor .project-subtask-ai .project-subtask-ai-description textarea { display: block; min-height: 58px; padding: 6px 8px; border-color: #d6e2e9; font-family: inherit; font-size: 13px; }
@media (max-width: 540px) { #task-editor .project-subtask-ai-columns, #task-editor .project-subtask-ai-row { grid-template-columns: minmax(0,1fr) 100px 28px; gap: 4px; } }
/* Columnas compactas del editor de subtareas (proyecto y Scrum). */
#task-editor .kb-subtasks { --subtask-gap: 6px; --subtask-check: 18px; --subtask-drag: 16px; --subtask-hours: 112px; --subtask-percent: 94px; --subtask-action: 28px; }
#task-editor .kb-subtask-columns, #task-editor .kb-subtask-row, #task-editor .kb-subtask-add { display: grid; grid-template-columns: var(--subtask-check) var(--subtask-drag) minmax(0, 1fr) var(--subtask-hours) var(--subtask-hours) var(--subtask-percent) var(--subtask-action); gap: var(--subtask-gap); align-items: center; }
#task-editor .kb-subtask-columns { padding: 2px 0 8px; color: #667580; font-size: 10px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
#task-editor .kb-subtask-columns span:first-child { grid-column: 1 / 4; }
#task-editor .kb-subtask-columns span:nth-child(n+2) { text-align: center; }
#task-editor .kb-subtask-row { border-top: 1px solid #d5e2e7; margin: 0; padding: 6px 0; }
#task-editor .kb-subtask-row > form:first-child { grid-column: 1; }
#task-editor .kb-subtask-row > .kb-subtask-drag-handle { grid-column: 2; justify-self: center; cursor: grab; color: #809098; user-select: none; }
#task-editor .kb-subtask-row .subtask-name { grid-column: 3; min-width: 0; }
#task-editor .kb-subtask-row .kb-subtask-hours { display: contents; }
#task-editor .kb-subtask-row > form { min-width: 0; margin: 0; }
#task-editor .kb-subtask-stepper { display: grid; grid-template-columns: 18px minmax(0, 1fr) 18px; gap: 0; align-items: center; min-width: 0; overflow: hidden; border: 1px solid #cbdde4; border-radius: 5px; background: #fff; }
#task-editor .kb-subtask-row .kb-subtask-stepper:nth-child(1), #task-editor .kb-subtask-add .kb-subtask-stepper:nth-of-type(1) { grid-column: 4; }
#task-editor .kb-subtask-row .kb-subtask-stepper:nth-child(2), #task-editor .kb-subtask-add .kb-subtask-stepper:nth-of-type(2) { grid-column: 5; }
#task-editor .kb-subtask-row .kb-subtask-stepper:nth-child(3), #task-editor .kb-subtask-add .kb-subtask-stepper:nth-of-type(3) { grid-column: 6; }
#task-editor .kb-subtask-step { display: flex; align-items: center; justify-content: center; width: 18px; min-width: 18px; height: 26px; min-height: 26px; padding: 0; border: 0; border-radius: 0; background: #edf4f6; color: #23758a; font-size: 12px; font-weight: 700; line-height: 1; cursor: pointer; }
#task-editor .kb-subtask-step:hover { background: #dcecf1; }
#task-editor .kb-subtask-stepper input[type="number"] { height: 26px; min-height: 26px; padding: 2px 3px; border: 0; border-right: 1px solid #dce7eb; border-left: 1px solid #dce7eb; border-radius: 0; text-align: center; box-shadow: none; }
#task-editor .kb-subtask-stepper input[type="number"]:focus { position: relative; z-index: 1; border-color: #1686a4; outline: 0; box-shadow: inset 0 0 0 1px #1686a4; }
#task-editor .kb-subtask-description-toggle { display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 22px; margin-left: 5px; padding: 0; border: 0; border-radius: 50%; background: transparent; color: #71838b; vertical-align: middle; cursor: pointer; }
#task-editor .kb-subtask-description-toggle:hover, #task-editor .kb-subtask-description-toggle[aria-expanded="true"] { background: #e1f1f4; color: #1686a4; }
#task-editor .kb-subtask-description-toggle.has-description { background: #e5f4e9; color: #238553; }
#task-editor .kb-subtask-description-toggle:focus-visible { outline: 2px solid #1686a4; outline-offset: 1px; }
#task-editor .kb-subtask-description-panel { box-sizing: border-box; margin: -1px 0 0; padding: 8px 8px 10px 42px; border-top: 1px dashed #cbdde4; background: #f8fbfc; }
#task-editor .kb-subtask-description-panel[hidden] { display: none; }
#task-editor .kb-subtask-description-panel textarea, #task-editor .kb-subtask-add-description textarea { box-sizing: border-box; display: block; width: min(100%, 620px); min-height: 62px; padding: 7px; border: 1px solid #cbdde4; border-radius: 4px; background: #fff; color: #263b43; font: inherit; font-size: 12px; resize: vertical; }
#task-editor .kb-subtask-add-description { margin: 4px 0 0 24px; }
#task-editor .kb-subtask-add-description summary { color: #23758a; font-size: 11px; cursor: pointer; }
#task-editor .kb-subtask-add-description textarea { margin-top: 5px; }
#task-editor .kb-subtask-row > form:last-child { grid-column: 7; }
#task-editor .kb-subtask-row input[type="number"], #task-editor .kb-subtask-add input[type="number"] { box-sizing: border-box; width: 100%; min-width: 0; height: 28px; min-height: 28px; padding: 2px 5px; border: 1px solid #d6e2e9; border-radius: 4px; background: #fff; color: #263b43; font: inherit; font-size: 12px; box-shadow: none; }
#task-editor .kb-subtask-add { margin-top: 10px; flex-wrap: nowrap; }
#task-editor .kb-subtask-add > input[name="subtitulo"] { grid-column: 1 / 4; min-width: 0; }
#task-editor .kb-subtask-add > .kb-subtask-stepper:nth-of-type(1) { grid-column: 4; }
#task-editor .kb-subtask-add > .kb-subtask-stepper:nth-of-type(2) { grid-column: 5; }
#task-editor .kb-subtask-add > .kb-subtask-stepper:nth-of-type(3) { grid-column: 6; }
#task-editor .kb-subtask-add > input[name="subtitulo"] { height: 28px; min-height: 28px; padding: 2px 8px; border: 1px solid #d6e2e9; border-radius: 4px; background: #fff; }
#task-editor .kb-subtask-add > button.nexus-action-icon { grid-column: 7; justify-self: center; width: 28px; min-width: 28px; height: 28px; min-height: 28px; padding: 0; font-size: 12px; }
#task-editor .kb-subtask-add > input[name="subtitulo"], #task-editor .kb-subtask-add > input[type="number"] { flex: initial; }
#task-editor .kb-subtask-row input[type="number"]:focus, #task-editor .kb-subtask-add input[type="number"]:focus { border-color: #1686a4; outline: 0; box-shadow: 0 0 0 2px rgba(22,134,164,.12); }
#task-editor .kb-subtask-stepper input[type="number"] { height: 26px; min-height: 26px; padding: 2px 3px; border: 0; border-right: 1px solid #dce7eb; border-left: 1px solid #dce7eb; border-radius: 0; text-align: center; box-shadow: none; }
#task-editor .kb-subtask-stepper input[type="number"]:focus { position: relative; z-index: 1; border-color: #1686a4; outline: 0; box-shadow: inset 0 0 0 1px #1686a4; }
@media (max-width: 560px) { #task-editor .kb-subtasks { --subtask-gap: 4px; --subtask-check: 18px; --subtask-drag: 16px; --subtask-hours: 104px; --subtask-percent: 90px; --subtask-action: 26px; } #task-editor .kb-subtask-columns { font-size: 9px; } }
@media (max-width: 430px) { #task-editor .kb-subtasks { overflow-x: auto; } #task-editor .kb-subtask-columns, #task-editor .kb-subtask-row, #task-editor .kb-subtask-add { min-width: 390px; } }
.nexus-task-time-assessment { margin-top: 4px; }
.nexus-task-time-bar-heading,
.nexus-task-time-bar-values,
.nexus-task-time-bar-scale { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 6px 14px; }
.nexus-task-time-bar-heading { margin-bottom: 8px; }
.nexus-task-time-advance { display: inline-flex; align-items: center; padding: 5px 9px; border-radius: 4px; background: #1686a4; color: #fff; font-size: 12px; font-weight: 700; }
.nexus-task-time-position { position: relative; height: 29px; margin-bottom: 5px; }
.nexus-task-time-position .nexus-task-time-advance { position: absolute; bottom: 0; left: 0; padding: 4px 8px; font-size: 11px; line-height: 16px; background: #238553; }
.nexus-task-time-position .nexus-task-time-remaining { position: absolute; bottom: 0; right: 0; padding: 4px 8px; border-radius: 4px; background: #e1edf2; color: #23758a; font-size: 11px; font-weight: 700; line-height: 16px; white-space: nowrap; }
.nexus-task-time-consumed { position: relative; height: 33px; margin-top: 5px; }
.nexus-task-time-consumed .nexus-task-time-used { position: absolute; top: 6px; left: clamp(120px, var(--nexus-time-position), calc(100% - 120px)); transform: translateX(-50%); box-sizing: border-box; max-width: min(100%, 270px); padding: 4px 8px; border-radius: 4px; background: #238553; color: #fff; font-size: 11px; font-weight: 700; line-height: 16px; white-space: nowrap; }
.nexus-task-time-consumed .nexus-task-time-used.nexus-task-time-bad { background: #c33; }
.nexus-task-time-consumed .nexus-task-time-used.nexus-task-time-neutral { background: #667580; }
.nexus-task-time-consumed .nexus-task-time-used::before { position: absolute; bottom: 100%; left: 50%; border: 5px solid transparent; border-bottom-color: #238553; content: ''; transform: translateX(-50%); }
.nexus-task-time-consumed .nexus-task-time-used.nexus-task-time-bad::before { border-bottom-color: #c33; }
.nexus-task-time-consumed .nexus-task-time-used.nexus-task-time-neutral::before { border-bottom-color: #667580; }
@media (max-width: 560px) { .nexus-task-time-consumed .nexus-task-time-used { font-size: 10px; } }
.nexus-task-time-bar-values { margin-bottom: 12px; color: #33434b; font-size: 13px; }
.nexus-task-time-bar-values .nexus-task-time-detail { margin: 0; }
.nexus-task-time-bar { display: block; width: 100%; height: 20px; overflow: visible; }
.nexus-task-time-track { fill: #dce5e9; }
.nexus-task-time-used-fill.on-budget { fill: #238553; }
.nexus-task-time-used-fill.over-budget { fill: #238553; }
.nexus-task-time-excess-fill { fill: #dc3545; }
.nexus-task-time-marker { stroke: #263b43; stroke-width: 2; stroke-dasharray: 4 3; }
.nexus-task-time-bar-scale { margin-top: 10px; color: #596a74; font-size: 11px; }
.kb-field input.nexus-task-time-balance[readonly] { font-size: 12px; font-weight: 600; }
.kb-field input.nexus-task-time-balance.nexus-task-time-good[readonly] { color: #238553; }
.kb-field input.nexus-task-time-balance.nexus-task-time-bad[readonly] { color: #c33; }
.kb-field input.nexus-task-time-balance.nexus-task-time-neutral[readonly] { color: #667580; }
.nexus-task-time-overflow { display: block; margin-top: 4px; color: #c33; font-size: 12px; }
.nexus-task-time-overflow:empty { display: none; }


/* Barra de estimación y consumo en el resumen de cada tarea. */
.project-update .pr-task-time-summary { display: block; margin-top: 9px; }
.project-update .pr-task-time-summary-top { display: flex; align-items: center; justify-content: space-between; gap: 6px; margin-bottom: 4px; }
.project-update .pr-task-time-label { color: #596a74; font-size: 11px; font-weight: 600; }
.project-update .pr-task-time-remaining { display: inline-flex; align-items: center; padding: 3px 7px; border-radius: 4px; font-size: 10px; font-weight: 700; line-height: 15px; white-space: nowrap; }
.project-update .pr-task-time-remaining { background: #e1edf2; color: #23758a; }
.project-update .pr-task-time-summary-bar { display: block; width: 100%; height: 12px; }
.project-update .pr-task-time-summary-bar .nexus-task-time-bar { height: 12px; }
.project-update .pr-task-time-summary-bar .nexus-task-time-used-fill.over-budget { fill: #238553; }
.project-update .pr-task-time-summary-status { display: block; position: relative; height: 28px; margin-top: 3px; }
.project-update .pr-task-time-summary-status .nexus-task-time-used { position: absolute; top: 2px; left: var(--nexus-time-position); transform: translateX(calc(-1 * var(--nexus-time-label-offset))); box-sizing: border-box; max-width: 100%; padding: 3px 7px; border-radius: 4px; background: #238553; color: #fff; font-size: 10px; font-weight: 700; line-height: 15px; white-space: nowrap; }

.project-update .pr-task-time-summary-status .nexus-task-time-used.nexus-task-time-bad { background: #c33; }
.project-update .pr-task-time-summary-status .nexus-task-time-used.nexus-task-time-neutral { background: #667580; }
.project-update .pr-task-time-summary-status .nexus-task-time-used::before { position: absolute; bottom: 100%; left: calc(var(--nexus-time-label-offset) + var(--nexus-time-pointer-offset)); border: 5px solid transparent; border-bottom-color: #238553; content: ''; transform: translateX(-50%); }
.project-update .pr-task-time-summary-status .nexus-task-time-used.nexus-task-time-bad::before { border-bottom-color: #c33; }
.project-update .pr-task-time-summary-status .nexus-task-time-used.nexus-task-time-neutral::before { border-bottom-color: #667580; }


/* Desviación del tiempo real respecto al avance y a la estimación total. */
.nexus-task-time-deviations { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-top: 7px; font-size: 12px; line-height: 1.4; }
.nexus-task-time-board .nexus-task-time-deviations { flex-basis: 100%; font-size: 11px; }


/* Exceso de horas junto al tiempo real en el resumen de tareas. */
.project-update .pr-task-hours > .pr-task-hours-real { white-space: normal; color: #000; }
.project-update .pr-task-hours-excess { font-size: 11px; font-weight: 600; }


/* Listado de proyectos: progreso de realización compacto en su columna. */
.projects-list .registro .project-progress-cell { box-sizing: border-box; min-width: 0; padding-right: 10px; gap: 6px; align-items: center; }
.projects-list .project-list-progress-bar { display: block; flex: 1; min-width: 0; width: 100%; height: 8px; border: 0; border-radius: 4px; overflow: hidden; appearance: none; -webkit-appearance: none; background: #dce5e9; color: #238553; }
.projects-list .project-list-progress-bar::-webkit-progress-bar { background: #dce5e9; border-radius: 4px; }
.projects-list .project-list-progress-bar::-webkit-progress-value { background: #238553; border-radius: 4px; }
.projects-list .project-list-progress-bar::-moz-progress-bar { background: #238553; border-radius: 4px; }
.projects-list .project-list-progress-value { flex: 0 0 auto; white-space: nowrap; font-size: 12px; font-weight: 600; color: #238553; line-height: 1; }

/* Confirmación del cierre del proyecto al completar todas sus tareas. */
.project-finish-dialog { width: 480px; max-width: calc(100vw - 32px); max-height: calc(100vh - 32px); overflow-y: auto; background: #fff; }
.project-finish-dialog .content { padding: 18px; text-align: left; }
.project-finish-dialog .nexus-form-area p { margin: 0 0 16px; color: #596a74; font-size: 13px; line-height: 1.5; }
.project-finish-dialog label { display: block; margin-bottom: 6px; font-size: 13px; }
.project-finish-actions { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 10px; }
.project-finish-close { position: absolute; top: 10px; right: 10px; width: 32px; height: 32px; min-height: 0; border: 1px solid #d6e2e9; border-radius: 4px; background: #fff; color: #33434b; cursor: pointer; }
#program-body-finder .title .project-finish-top,
#program-body-finder .title .project-save-top { white-space: nowrap; }


/* Objetivo y cierre del proyecto en el listado. */
.projects-list .registro .project-deadline-cell { box-sizing: border-box; min-width: 0; padding-right: 10px; flex-direction: column; align-items: flex-start; justify-content: center; gap: 2px; line-height: 1.2; }
.projects-list .project-deadline-cell.finished { color: #238553; font-weight: 600; }
.projects-list .project-deadline-cell.overdue { color: #b40000; font-weight: 600; }
.projects-list .project-deadline { white-space: nowrap; }
.projects-list .project-deadline-note { max-width: 100%; font-size: 10px; text-transform: none; }

/* Contador de tareas y desviación de horas en el listado de proyectos. */
.projects-list .project-task-count { display: inline-flex; align-items: center; justify-content: center; min-width: 48px; padding: 4px 8px; border: 1px solid #c5dce6; border-radius: 5px; background: #e1edf2; color: #23758a; font-size: 12px; font-weight: 700; line-height: 18px; white-space: nowrap; }
.projects-list .registro .project-hours-deviation-cell { box-sizing: border-box; min-width: 0; padding-right: 8px; }
.projects-list .project-hours-deviation { display: inline-block; padding: 4px 7px; border-radius: 5px; font-size: 11px; font-weight: 700; line-height: 18px; white-space: nowrap; }
.projects-list .project-hours-deviation.bad { background: #fde8e9; color: #b52b39; }
.projects-list .project-hours-deviation.good { background: #e1f2e7; color: #237746; }
.projects-list .project-hours-deviation.neutral { background: #edf1f3; color: #667580; }

/* Mantener las columnas del listado en una sola fila, incluido su padding. */
.projects-list #program-body .campo-leyenda, .projects-list #program-body .campo-registro { box-sizing: border-box; }

#task-editor .kb-subtask-row input[name$="[progreso]"], #task-editor .kb-subtask-add input[name="progreso"] { text-align: center; }

#task-editor .kb-subtask-progress-help { margin: -8px 0 12px; color: #667580; font-size: 11px; line-height: 1.45; }


/* Organización Scrum: estilos del tablero centralizados en la hoja corporativa. */

.kb-shell{padding:18px;background:#fff;min-height:calc(100vh - 70px);box-sizing:border-box}.kb-top{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;border-bottom:1px solid #ccc;padding-bottom:12px}.kb-btn{display:inline-flex;gap:7px;align-items:center;border:1px solid #4dbdd5;border-radius:4px;padding:8px 12px;background:#00b4ce;color:#fff!important;text-decoration:none;cursor:pointer}.kb-btn.dark{background:#555;border-color:#555}.kb-filter{height:32px;min-width:320px;border:1px solid #999;border-radius:4px;padding:0 8px}.kb-finder{display:flex;gap:8px;align-items:end;flex-wrap:wrap;margin:0 0 15px;padding:12px;background:#eee}.kb-finder label{font-size:10px;color:#666;text-transform:uppercase}.kb-finder input{height:30px;min-width:300px;border:1px solid #999;border-radius:4px;padding:0 8px}.kb-editor-modal{width:800px;max-width:calc(100vw - 40px);max-height:calc(100vh - 40px);overflow:auto}.kb-editor-modal .content{text-align:left;padding:22px 25px 0}.kb-editor-footer{border-top:1px solid #ccc;margin-top:22px;padding:15px 25px 18px;text-align:center}.kb-grid{display:grid;grid-template-columns:2fr repeat(4,1fr);gap:10px}.kb-grid input,.kb-grid select,.kb-grid textarea{box-sizing:border-box;width:100%;padding:7px;border:1px solid #999;border-radius:4px;background:#fff}.kb-grid textarea{min-height:70px}.kb-wide{grid-column:span 2}.kb-board{display:grid;grid-template-columns:repeat(6,minmax(230px,1fr));gap:0;overflow:auto;padding:15px 0;min-height:calc(100vh - 235px)}.kb-column{background:#e3e8ea;border:0;border-right:1px solid #bcc8cd;border-top:4px solid #00b4ce;min-height:calc(100vh - 290px);padding:10px}.kb-column:first-child{border-left:1px solid #bcc8cd}.kb-column.over{background:#d2f2f6}.kb-column-head{display:flex;justify-content:space-between;margin:-10px -10px 10px;padding:12px 13px;font-weight:bold;color:#fff;background:#263b43}.kb-count{background:#00b4ce;color:#fff;border-radius:3px;padding:2px 8px}.kb-card{display:block;background:#fff;border:1px solid #c5ced2;border-radius:4px;box-shadow:0 1px 3px rgba(38,59,67,.12);margin-bottom:8px;padding:10px;color:#333!important;text-decoration:none;cursor:grab}.kb-card.dragging{opacity:.45}.kb-card-top{display:flex;align-items:center;justify-content:space-between;gap:8px;min-height:20px}.kb-card-assignment{display:flex;align-items:center;gap:6px;color:#777;font-size:10px;line-height:18px;white-space:nowrap;text-align:right}.kb-card-assignment span+span:before{content:'·';margin-right:6px;color:#aab3b7}.kb-card-title{font-weight:bold;margin:5px 0}.kb-project{font-size:10px;color:#2387a6;text-transform:uppercase}.kb-meta{font-size:11px;color:#777;display:flex;gap:7px;flex-wrap:wrap}.kb-tag{display:inline-block;background:#eee;padding:3px 7px;font-size:10px;line-height:12px;text-transform:uppercase}.kb-baja{border-left:4px solid #58a65c}.kb-media{border-left:4px solid #d9a441}.kb-alta{border-left:4px solid #c94b4b}.kb-error{background:#fdeaea;color:#962d2d;padding:10px;border-left:4px solid #c33;margin:10px 0}@media(max-width:1000px){.kb-grid{grid-template-columns:1fr 1fr}.kb-wide{grid-column:span 2}.kb-board{grid-template-columns:repeat(3,minmax(230px,1fr))}}@media(max-width:600px){.kb-grid{grid-template-columns:1fr}.kb-wide{grid-column:span 1}.kb-board{grid-template-columns:repeat(1,minmax(230px,1fr))}.kb-finder input{min-width:0;width:100%}}
.kb-grid{grid-template-columns:repeat(4,minmax(0,1fr))}.kb-task-section{grid-column:1 / -1;min-width:0;margin-top:8px;padding:15px;background:#f4f8fa;border:1px solid #d5e2e7;border-radius:6px}.kb-task-fields{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px}.kb-editor-modal .kb-field{min-width:0}.kb-editor-modal .kb-field label{display:block;margin:0 0 4px;font-size:10px;line-height:15px;color:#666;text-transform:uppercase;letter-spacing:.04em}.kb-editor-modal .kb-field-wide{grid-column:1 / -1}.kb-editor-modal .kb-field-span-2{grid-column:span 2}.kb-editor-modal .kb-field textarea{min-height:90px;resize:vertical}@media(max-width:1000px){.kb-task-fields{grid-template-columns:1fr 1fr}}@media(max-width:600px){.kb-task-fields{grid-template-columns:1fr}.kb-editor-modal .kb-field-span-2{grid-column:span 1}}
.kb-task-section{box-sizing:border-box;max-width:100%}.kb-task-assignment-section .kb-task-fields{grid-template-columns:repeat(3,minmax(0,1fr))}.kb-btn.danger{background:#c33;border-color:#c33}
.kb-task-date-field{grid-row:2;width:fit-content;max-width:100%}.kb-task-date-field:nth-child(4){grid-column:1}.kb-task-date-field:nth-child(5){grid-column:2}.kb-task-date-field:nth-child(6){grid-column:3}.kb-task-date-field .nexus-project-date-control{width:240px;max-width:100%}.kb-task-date-field .nexus-project-date-control input.nexus-project-date{flex:1 1 auto;width:auto;min-width:0}@media(max-width:1000px){.kb-task-assignment-section .kb-task-fields{grid-template-columns:repeat(2,minmax(0,1fr))}.kb-task-date-field{grid-row:auto;width:100%}.kb-task-date-field:nth-child(4),.kb-task-date-field:nth-child(5),.kb-task-date-field:nth-child(6){grid-column:auto}.kb-task-date-field .nexus-project-date-control{width:100%}}@media(max-width:600px){.kb-task-assignment-section .kb-task-fields{grid-template-columns:1fr}}
.kb-subtasks{box-sizing:border-box;max-width:100%;min-width:0;margin-top:18px;padding:15px;background:#f4f8fa;border:1px solid #d5e2e7;border-radius:6px}.kb-subtask-row{display:flex;align-items:center;gap:8px;padding:7px 0;border-top:1px solid #dbe5e8}.kb-subtask-row form{margin:0}.kb-subtask-row .subtask-name{flex:1;min-width:0;overflow-wrap:anywhere}.kb-subtask-row.done .subtask-name{text-decoration:line-through;color:#888}.kb-subtask-weight{margin-left:6px;color:#777;font-size:10px}.kb-subtask-row input[type=number]{width:62px;padding:5px;border:1px solid #999;border-radius:4px}.kb-subtask-add{display:flex;gap:8px;margin-top:12px}.kb-subtask-add input{flex:1;min-width:0;box-sizing:border-box;padding:7px;border:1px solid #999;border-radius:4px}
.kb-card{cursor:grab;transition:box-shadow .15s ease,background .15s ease}.kb-card.edit-hover,.kb-card:has(.kb-card-main:hover){background:#c9edf3;box-shadow:0 5px 15px rgba(22,105,125,.34);border-color:#70c8d8}.kb-card-main{display:block;color:#333!important;text-decoration:none;cursor:pointer}.kb-task-progress{display:inline-block;flex-shrink:0;white-space:nowrap;padding:3px 7px;background:#d9f1f5;color:#23758a;border:1px solid #a8d6df;border-radius:9px;font-size:10px;font-weight:bold;line-height:12px}.kb-card-subtasks{margin-top:9px;padding-top:8px;border-top:1px solid #dce4e7;cursor:default}.kb-card-subtasks summary{cursor:pointer;color:#23758a;font-size:11px;font-weight:bold;list-style:none}.kb-card-subtasks summary::-webkit-details-marker{display:none}.kb-card-subtasks summary:before{content:'▸';display:inline-block;margin-right:5px}.kb-card-subtasks[open] summary:before{content:'▾'}.kb-card-subtask-row{display:flex;gap:6px;align-items:center;padding:5px 0;border-bottom:1px solid #edf1f2;font-size:11px}.kb-card-subtask-row span{flex:1}.kb-card-subtask-row.done span{text-decoration:line-through;color:#888}.kb-card-subtask-row form{margin:0}.kb-card-subtask-add{display:flex;gap:5px;margin-top:8px}.kb-card-subtask-add input{min-width:0;flex:1;padding:5px;border:1px solid #aab8bd;border-radius:3px;font-size:11px}.kb-card-subtask-add input[type=number]{max-width:55px}

.kb-column-head .kb-hours{font-size:10px;padding:2px 4px;margin-left:4px}.kb-column-head{align-items:center;gap:5px}
.kb-completed-period{margin:0 0 10px;font-size:11px;color:#596a74}.kb-completed-period a{color:#23758a}.kb-time-caption{display:flex;align-items:center;justify-content:space-between;gap:8px;margin:6px 0 4px;font-size:10px;color:#667580}.kb-date-overdue{color:#c33!important;font-weight:bold}
.kb-column[data-state="backlog"]{border-top-color:#87949d}.kb-column[data-state="pendiente"]{border-top-color:#4b99ad}.kb-column[data-state="en_curso"]{border-top-color:#00b4ce}.kb-column[data-state="revision"]{border-top-color:#d9a441}.kb-column[data-state="bloqueada"]{border-top-color:#c94b4b}.kb-column[data-state="hecha"]{border-top-color:#58a65c}


.kb-card-subtasks-button{box-sizing:border-box;display:flex;align-items:center;width:100%;min-height:32px;margin-top:9px;padding:0 8px;border:0;border-top:1px solid #dce4e7;background:transparent;color:#23758a;text-align:left;font-size:11px;font-weight:bold;line-height:1.3;cursor:pointer;transition:color .15s ease,background-color .15s ease}.kb-card-subtasks-button:hover{background:#b8e4ed;color:#104f61}.kb-card-subtasks-button:focus-visible{outline:2px solid #1686a4;outline-offset:2px;border-radius:3px}.kb-card-subtasks-button:active{background:#dcecf1}.kb-subtask-manager{box-sizing:border-box;width:min(760px,calc(100vw - 28px));max-width:760px;max-height:calc(100vh - 28px);padding:0;border:1px solid #cbdde4;border-radius:8px;color:#33434b;box-shadow:0 12px 40px rgba(20,43,67,.3)}.kb-subtask-manager::backdrop{background:rgba(20,43,67,.45)}.kb-subtask-manager-head{position:sticky;top:0;display:flex;align-items:center;justify-content:space-between;gap:12px;padding:16px 20px;background:#f4f8fa;border-bottom:1px solid #d5e2e7;z-index:1}.kb-subtask-manager-head h2{margin:0;color:#23758a;font-size:18px}.kb-subtask-manager-close{border:0;background:transparent;font-size:24px;color:#596a74;cursor:pointer}.kb-subtask-manager-body{padding:8px 20px 18px;overflow:auto}.kb-manager-row{display:grid;grid-template-columns:minmax(140px,1fr) 115px 115px 115px auto;gap:9px;align-items:center;padding:12px 0;border-bottom:1px solid #dce5e8}.kb-manager-name{font-size:13px;font-weight:600;overflow-wrap:anywhere}.kb-manager-name.done{text-decoration:line-through;color:#88949a}.kb-manager-field label{display:block;margin-bottom:4px;color:#667580;font-size:10px;text-transform:uppercase}.kb-manager-field input{box-sizing:border-box;width:100%;height:34px;padding:0 7px;border:1px solid #cbdde4;border-radius:4px}.kb-manager-actions{display:flex;align-items:center;gap:7px}.kb-manager-save{height:34px;padding:0 10px;border:0;border-radius:4px;background:#1686a4;color:#fff;font-weight:600;cursor:pointer}.kb-manager-done{width:18px;height:18px;accent-color:#1686a4}.kb-manager-empty{padding:20px;color:#667580}@media(max-width:650px){.kb-subtask-manager-head{padding:13px 15px}.kb-subtask-manager-body{padding:5px 14px 15px}.kb-manager-row{grid-template-columns:minmax(0,1fr) minmax(68px,.65fr) minmax(68px,.65fr);gap:7px}.kb-manager-name{grid-column:1/-1}.kb-manager-actions{grid-column:1/-1;justify-content:flex-end}.kb-manager-field input{height:36px}}
.kb-subtask-manager .kb-subtasks{--subtask-gap:6px;--subtask-check:18px;--subtask-drag:16px;--subtask-hours:112px;--subtask-percent:94px;--subtask-action:28px;margin:0;padding:0;border:0;background:transparent}.kb-subtask-manager .kb-subtasks-title{display:flex;justify-content:space-between;align-items:center;gap:10px;margin:0 0 16px;color:#23758a;font-size:16px;font-weight:bold;letter-spacing:.04em;text-transform:uppercase}.kb-subtask-manager .kb-subtask-progress-help{margin:-8px 0 12px;color:#667580;font-size:11px;line-height:1.45}.kb-subtask-manager .kb-subtask-columns,.kb-subtask-manager .kb-subtask-row,.kb-subtask-manager .kb-subtask-add{display:grid;grid-template-columns:var(--subtask-check) var(--subtask-drag) minmax(0,1fr) var(--subtask-hours) var(--subtask-hours) var(--subtask-percent) var(--subtask-action);gap:var(--subtask-gap);align-items:center}.kb-subtask-manager .kb-subtask-columns{padding:2px 0 8px;color:#667580;font-size:10px;font-weight:700;letter-spacing:.04em;text-transform:uppercase}.kb-subtask-manager .kb-subtask-columns span:first-child{grid-column:1/4}.kb-subtask-manager .kb-subtask-columns span:nth-child(n+2){text-align:center}.kb-subtask-manager .kb-subtask-row{margin:0;padding:6px 0;border-top:1px solid #d5e2e7}.kb-subtask-manager .kb-subtask-row>.kb-manager-toggle{grid-column:1;margin:0}.kb-subtask-manager .kb-subtask-row>.kb-subtask-drag-handle{grid-column:2;justify-self:center;cursor:grab;color:#809098;user-select:none}.kb-subtask-manager .kb-subtask-row .subtask-name{grid-column:3;min-width:0;overflow-wrap:anywhere;font-size:13px}.kb-subtask-manager .kb-subtask-weight{margin-left:6px;color:#777;font-size:11px}.kb-subtask-manager .kb-subtask-drag-handle{display:inline-block;margin-right:5px;color:#809098;cursor:grab;user-select:none}.kb-subtask-manager .kb-subtask-drag-handle:active{cursor:grabbing}.kb-subtask-manager .kb-subtask-row.dragging{opacity:.45}.kb-subtask-manager .kb-subtask-row.drop-target{border-top:2px solid #1686a4}.kb-subtask-manager .kb-subtask-row .kb-subtask-hours{display:contents}.kb-subtask-manager .kb-subtask-stepper{display:grid;grid-template-columns:18px minmax(0,1fr) 18px;gap:0;align-items:center;min-width:0;overflow:hidden;border:1px solid #cbdde4;border-radius:5px;background:#fff}.kb-subtask-manager .kb-subtask-row .kb-subtask-stepper:nth-child(1){grid-column:4}.kb-subtask-manager .kb-subtask-row .kb-subtask-stepper:nth-child(2){grid-column:5}.kb-subtask-manager .kb-subtask-row .kb-subtask-stepper:nth-child(3){grid-column:6}.kb-subtask-manager .kb-subtask-step{display:flex;align-items:center;justify-content:center;width:18px;min-width:18px;height:26px;min-height:26px;padding:0;border:0;border-radius:0;background:#edf4f6;color:#23758a;font-size:12px;font-weight:700;line-height:1;cursor:pointer}.kb-subtask-manager .kb-subtask-step:hover{background:#dcecf1}.kb-subtask-manager .kb-subtask-stepper input[type=number]{box-sizing:border-box;width:100%;min-width:0;height:26px;min-height:26px;padding:2px 3px;border:0;border-right:1px solid #dce7eb;border-left:1px solid #dce7eb;border-radius:0;background:#fff;color:#263b43;font-size:12px;text-align:center}.kb-subtask-manager .kb-subtask-row>.kb-manager-delete{grid-column:7;width:28px;min-width:28px;height:28px;min-height:28px;padding:0;font-size:12px}.kb-subtask-manager .kb-subtask-row.done .subtask-name{text-decoration:line-through;color:#888}.kb-subtask-manager .kb-subtask-row input[type=checkbox]{width:16px;height:16px;accent-color:#1686a4}.kb-subtask-manager .kb-subtask-add{margin-top:10px}.kb-subtask-manager .kb-subtask-add>input[name=subtitulo]{grid-column:1/4;min-width:0;height:28px;min-height:28px;padding:2px 8px;border:1px solid #d6e2e9;border-radius:4px;background:#fff}.kb-subtask-manager .kb-subtask-add>.kb-subtask-stepper:nth-of-type(1){grid-column:4}.kb-subtask-manager .kb-subtask-add>.kb-subtask-stepper:nth-of-type(2){grid-column:5}.kb-subtask-manager .kb-subtask-add>.kb-subtask-stepper:nth-of-type(3){grid-column:6}.kb-subtask-manager .kb-subtask-add>button.nexus-action-icon{grid-column:7;justify-self:center;width:28px;min-width:28px;height:28px;min-height:28px;padding:0;font-size:12px}.kb-subtask-manager .kb-subtask-add input[type=number]{box-sizing:border-box;width:100%;min-width:0;height:26px;padding:2px 3px;border:0;border-right:1px solid #dce7eb;border-left:1px solid #dce7eb;text-align:center}@media(max-width:650px){.kb-subtask-manager .kb-subtasks{--subtask-gap:4px;--subtask-hours:104px;--subtask-percent:90px;--subtask-action:26px}.kb-subtask-manager .kb-subtask-columns{font-size:9px}}@media(max-width:430px){.kb-subtask-manager .kb-subtasks{overflow-x:auto}.kb-subtask-manager .kb-subtask-columns,.kb-subtask-manager .kb-subtask-row,.kb-subtask-manager .kb-subtask-add{min-width:390px}}


/* Tablero Scrum y finder de proyectos: acabado corporativo NEXUS. */
.project-board-page .kb-shell { padding: 0; min-height: 0; background: transparent; }
.project-board-page .kb-top { min-height: 54px; padding: 0 0 14px; border-bottom: 1px solid #d5e2e7; color: #142b43; }
.project-board-page .kb-top > div:first-child { color: #142b43; font-size: 22px; font-weight: 700; }
.project-board-page .kb-btn { box-sizing: border-box; min-height: 37px; align-items: center; justify-content: center; padding: 0 14px; border: 1px solid #1686a4; border-radius: 5px; background: #1686a4; color: #fff !important; font-size: 13px; font-weight: 600; transition: background-color .15s ease,border-color .15s ease,box-shadow .15s ease; }
.project-board-page .kb-btn:hover,.project-board-page .kb-btn:focus-visible { border-color: #116d86; background: #116d86; box-shadow: 0 0 0 3px rgba(22,134,164,.14); }
.project-board-page .kb-btn.dark { border-color: #d6e2e9; background: #fff; color: #23758a !important; }
.project-board-page .kb-btn.dark:hover,.project-board-page .kb-btn.dark:focus-visible { border-color: #1686a4; background: #e8f6f8; color: #145e70 !important; }
.project-board-page .kb-filter,.project-board-page .kb-finder input { box-sizing: border-box; min-width: 0; height: 36px; border: 1px solid #d6e2e9; border-radius: 5px; padding: 0 10px; color: #142b43; background: #fff; }
.project-board-page .kb-filter:focus,.project-board-page .kb-finder input:focus { border-color: #1686a4; outline: 0; box-shadow: 0 0 0 3px rgba(22,134,164,.13); }
.project-board-page .kb-finder { align-items: end; gap: 12px; margin: 14px 0 16px; padding: 14px; border: 1px solid #d5e2e7; border-radius: 7px; background: #f4f8fa; }
.project-board-page .kb-finder label { color: #687887; font-size: 11px; font-weight: 600; letter-spacing: .02em; }
:is(.project-board-page, .incidencias-board-page) .kb-card { border-color: #d5e2e7; border-radius: 6px; box-shadow: 0 2px 5px rgba(20,43,67,.08); transition: box-shadow .15s ease,background .15s ease,border-color .15s ease; }
.project-board-page .kb-card.edit-hover,.project-board-page .kb-card:has(.kb-card-main:hover) { background: #c9edf3; border-color: #70c8d8; box-shadow: 0 5px 15px rgba(22,105,125,.25); }
.project-board-page .kb-card-subtasks-button { min-height: 34px; border-radius: 0 0 4px 4px; }
.project-board-page .kb-card-subtasks-button:hover { background: #a8dfe9; color: #104f61; }
.project-board-page .kb-card-subtasks-button:focus-visible { outline-offset: 1px; }
@media (max-width: 700px) {
  .project-board-page .kb-shell { padding: 0; }
  .project-board-page .kb-top > div:first-child { font-size: 19px; }
  .project-board-page .kb-finder { align-items: stretch; flex-direction: column; }
  .project-board-page .kb-finder > * { width: 100%; }
}

/* Finder superior del tablero Scrum. */
.project-board-page #board-top-controls { align-items: center; flex-wrap: wrap; gap: 10px; width: 100%; }
.project-board-page #board-top-controls > .kb-filter { box-sizing: border-box; width: min(290px, 28vw); min-width: 205px; height: 37px; padding: 0 34px 0 11px; border: 1px solid #c5dce6; border-radius: 6px; background-color: #fff; color: #142b43; font-size: 13px; font-weight: 500; box-shadow: 0 1px 3px rgba(20,43,67,.08); }
.project-board-page #board-top-controls > .kb-filter:first-child { width: min(360px, 34vw); }
.project-board-page #board-top-controls > .kb-filter:hover,.project-board-page #board-top-controls > .kb-completed-filter .kb-filter:hover { border-color: #1686a4; background-color: #f1fbfd; }
.project-board-page #board-top-controls > .kb-filter:focus,.project-board-page #board-top-controls > .kb-completed-filter .kb-filter:focus { border-color: #1686a4; outline: 0; box-shadow: 0 0 0 3px rgba(22,134,164,.16); }
.project-board-page #board-top-controls .kb-completed-filter { display: inline-flex; align-items: center; gap: 8px; min-height: 37px; margin: 0; color: #526574; font-size: 12px; font-weight: 600; }
.project-board-page #board-top-controls .kb-completed-filter .kb-filter { width: 180px; min-width: 160px; }
.project-board-page #board-top-controls .kb-btn { min-height: 37px; }
@media (max-width: 760px) {
  .project-board-page #board-top-controls > .kb-filter,
  .project-board-page #board-top-controls > .kb-filter:first-child { width: min(100%, 360px); min-width: 0; }
  .project-board-page #board-top-controls { gap: 8px; }
}

/* Tableros de proyectos e incidencias: fondos, columnas y contenedor compartidos. */
:is(.project-board-page, .incidencias-board-page) #program-body:has(:is(#scrum-board, #incidencias-board)) {
	margin-top: 0;
	margin-bottom: 20px;
	padding: 0;
	border: 1px solid #e2ebf0;
	border-radius: 11px;
	background: #fff;
	box-shadow: 0 2px 8px rgba(20, 43, 67, .045);
	overflow: hidden;
}
:is(.project-board-page, .incidencias-board-page) :is(#scrum-board, #incidencias-board) { padding: 0; background: #fff; }
/* Tono anterior del fondo, conservado como referencia: #b1cbd7. */
:is(.project-board-page, .incidencias-board-page) :is(#scrum-board, #incidencias-board) .kb-column { background: #405d69; border-top: 0; border-right: 1px dashed #8ba4b2; }
:is(.project-board-page, .incidencias-board-page) :is(#scrum-board, #incidencias-board) .kb-column:not(:last-child) > .kb-column-head::after {
	content: '';
	position: absolute;
	top: 0;
	right: -1px;
	bottom: 0;
	border-right: 1px solid #8ba4b2;
	pointer-events: none;
}
:is(.project-board-page, .incidencias-board-page) :is(#scrum-board, #incidencias-board) .kb-card { background: #fff; margin-bottom: 12px; }
:is(.project-board-page, .incidencias-board-page) :is(#scrum-board, #incidencias-board) .kb-card.edit-hover,
:is(.project-board-page, .incidencias-board-page) :is(#scrum-board, #incidencias-board) .kb-card:has(.kb-card-main:hover) { background: #c9edf3; }
:is(.project-board-page, .incidencias-board-page) :is(#scrum-board, #incidencias-board) .kb-column:first-child { border-left: 0; }
:is(.project-board-page, .incidencias-board-page) :is(#scrum-board, #incidencias-board) .kb-column:last-child { border-right: 0; }
:is(.project-board-page, .incidencias-board-page) :is(#scrum-board, #incidencias-board) .kb-column.over { background: #d2f2f6; }

/* Cabeceras alineadas con el inicio de su contenedor de desplazamiento. */
:is(.project-board-page, .incidencias-board-page) .kb-column-head {
	position: sticky;
	top: 0;
	z-index: 20;
}


/* Detalles propios de las tarjetas del tablero de incidencias. */
.incidencias-board-page .kb-card-placeholder {height:92px;border:1px dashed #8ca0a8;background:#d2f2f6;border-radius:4px;margin-bottom:8px}
.incidencias-board-page .kb-card-assignment .kb-due-today {color:#c62828;font-weight:bold}
.incidencias-board-page .kb-card-assignment .kb-due-tomorrow {color:#ef8b00;font-weight:bold}
.incidencias-board-page .kb-card-client {margin-top:6px;color:#2387a6;font-size:10px;text-transform:uppercase}
.incidencias-board-page .kb-billable {display:inline-flex;align-items:center;gap:4px;margin-left:5px;padding:3px 6px;border-radius:2px;background:#e2f4e5;color:#287a3d;font-size:9px;font-weight:bold;text-transform:uppercase}
.incidencias-board-page .kb-priority-critica {border-left:4px solid #9b59b6}
.incidencias-board-page .kb-priority-alta {border-left:4px solid #c94b4b}
.incidencias-board-page .kb-priority-normal {border-left:4px solid #d9a441}
.incidencias-board-page .kb-priority-baja {border-left:4px solid #58a65c}
.incidencias-board-page .kb-priority-critica .kb-tag {background:#ead7f2;color:#6d3d82;border:1px solid #c49bd3}
.incidencias-board-page #incidencias-board .kb-card:hover { background: #c9edf3; border-color: #70c8d8; box-shadow: 0 5px 15px rgba(22,105,125,.25); }
.incidencias-board-page .kb-count { white-space: nowrap; }
.incidencias-board-page .kb-cards { min-height: 45px; }

.kb-subtasks .kb-subtask-completed-divider {
	grid-column: 1 / -1;
	height: 0;
	margin: 14px 0 4px;
	border-top: 2px solid #d5e2e7;
}

.kb-subtasks .kb-subtask-completed-toggle {
	grid-column: 1 / -1;
	display: block;
	box-sizing: border-box;
	width: 100%;
	margin: 14px 0 4px;
	padding: 8px 0 0;
	border: 0;
	border-top: 2px solid #d5e2e7;
	background: transparent;
	color: #23758a;
	font: inherit;
	font-size: 12px;
	font-weight: 600;
	text-align: left;
	cursor: pointer;
}

.kb-subtasks .kb-subtask-row[hidden] {
	display: none !important;
}

.kb-subtask-manager-head {
	justify-content: center;
	padding: 14px 52px;
	box-shadow: 0 2px 6px rgba(38,59,67,.08);
}
.kb-subtask-manager-head h2 {
	color: #222;
	font-size: 16px;
	font-weight: 400;
	text-align: center;
}
.kb-subtask-manager-head .kb-subtask-manager-close {
	position: absolute;
	top: 50%;
	right: 10px;
	transform: translateY(-50%);
	width: 32px;
	height: 32px;
	padding: 0;
	border: 1px solid #d5dadd;
	border-radius: 4px;
	background: #fff;
	color: #444;
	font-size: 24px;
	line-height: 1;
}


/* Incidencias: planificación compacta con fechas y horas en paralelo. */
#incidencia-editor { width: 1100px; }
#incidencia-editor .incidencia-date-time { grid-template-columns: minmax(0, 1.2fr) minmax(125px, 1fr); gap: 8px; }
#incidencia-editor .incidencia-date-time > div { min-width: 0; }
#incidencia-editor .incidencia-step-control { display: flex; align-items: stretch; box-sizing: border-box; width: 100%; height: 32px; overflow: hidden; border: 1px solid #d6e2e9; border-radius: 4px; background: #fff; }
#incidencia-editor .incidencia-step-control input,
#incidencia-editor .incidencia-step-control input[type="time"] { box-sizing: border-box; flex: 1 1 auto; width: 0; min-width: 0; height: 30px !important; min-height: 30px !important; margin: 0; padding: 0 2px !important; border: 0 !important; border-right: 1px solid #d6e2e9 !important; border-left: 1px solid #d6e2e9 !important; border-radius: 0; background: #fff; color: #142b43; font-size: 12px; text-align: center; box-shadow: none; }
#incidencia-editor .incidencia-step-control input:focus { border-right: 1px solid #1686a4 !important; border-left: 1px solid #1686a4 !important; outline: 0; box-shadow: inset 0 0 0 1px #1686a4; }
#incidencia-editor .incidencia-step { display: inline-flex; flex: 0 0 26px; align-items: center; justify-content: center; width: 26px; height: 30px; padding: 0; border: 0; background: #f8fafb; color: #23758a; font: inherit; font-size: 15px; line-height: 1; cursor: pointer; }
/* Flechas de fecha y hora con proporción 1:2 (15 × 30 px). */
#incidencia-editor .incidencia-step[aria-label="Día anterior"],
#incidencia-editor .incidencia-step[aria-label="Día siguiente"],
#incidencia-editor .incidencia-step[aria-label="5 minutos antes"],
#incidencia-editor .incidencia-step[aria-label="5 minutos después"],
#incidencia-editor .incidencia-step[aria-label="Restar 15 minutos"],
#incidencia-editor .incidencia-step[aria-label="Sumar 15 minutos"] { box-sizing: border-box; flex-basis: 15px; width: 15px; }
#incidencia-editor .incidencia-step > .fa { font-size: 12px; line-height: 1; }
#incidencia-editor .incidencia-step:first-child { border-right: 1px solid #d6e2e9; }
#incidencia-editor .incidencia-step:last-child { border-left: 1px solid #d6e2e9; }
#incidencia-editor .incidencia-step:hover,
#incidencia-editor .incidencia-step:focus-visible { background: #e8f6f8; color: #145e70; outline: 0; }

/* El control segmentado ocupa el centro entre las flechas de fecha. */
#incidencia-editor .incidencia-step-control.nexus-date-parts-host { position: relative; }
#incidencia-editor .incidencia-step-control.nexus-date-parts-host > input.fecha_calendario { position: absolute; width: 1px; opacity: 0; pointer-events: none; }
#incidencia-editor .incidencia-step-control.nexus-date-parts-host > .incidencia-step[data-step-dir="-1"] { order: 1; border-right: 1px solid #d6e2e9; border-radius: 3px 0 0 3px; }
#incidencia-editor .incidencia-step-control.nexus-date-parts-host > .nexus-date-parts { order: 2; flex: 1 1 auto; width: 0; min-width: 0; height: 30px; justify-content: center; gap: 2px; padding: 0; }
#incidencia-editor .incidencia-step-control.nexus-date-parts-host > .incidencia-step[data-step-dir="1"] { order: 3; border-left: 1px solid #d6e2e9; border-radius: 0 3px 3px 0; }
#incidencia-editor .incidencia-step-control.nexus-date-parts-host .nexus-date-parts input.nexus-date-part { flex: 0 0 2ch; width: 2ch; min-width: 0; padding: 0 !important; border: 0 !important; background: transparent; box-shadow: none; }
#incidencia-editor .incidencia-step-control.nexus-date-parts-host .nexus-date-parts input.nexus-date-part:nth-of-type(3) { flex: 0 0 4ch; width: 4ch; }
#incidencia-editor .incidencia-step-control.nexus-date-parts-host .nexus-date-parts input.nexus-date-part:focus { background: #edf6f9; }

#incidencia-editor .incidencia-step-control input[type="number"] { text-align: center; font-size: 14px; }
#incidencia-editor .incidencia-time-card-work { display: block; }
#incidencia-editor .incidencia-work-control { display: block; min-width: 0; }
#incidencia-editor .incidencia-time-card-work label { display: block; margin: 0 0 4px; font-size: 9px; line-height: 15px; color: #666; }
#incidencia-editor .incidencia-time-card-work .incidencia-step-control { width: min(100%, 180px); }
@media(max-width:900px) {
  #incidencia-editor { width: calc(100vw - 40px); }
  #incidencia-editor .incidencia-date-time { grid-template-columns: minmax(0, 1fr); gap: 7px; }
}
#incidencia-editor .incidencia-step-control input[type="time"]::-webkit-calendar-picker-indicator { display: none; -webkit-appearance: none; }
/* Dictado y revisión de la resolución compartidos por listado y tablero de incidencias. */
#incidencia-editor .incidencia-text-heading { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 5px; }
#incidencia-editor .incidencia-text-heading label { margin: 0; }
#incidencia-editor .incidencia-text-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
#incidencia-editor .incidencia-text-heading .nexus-action-button { min-height: 32px; height: 32px; padding: 0 10px; font-size: 12px; }
#incidencia-editor .incidencia-text-heading .nexus-action-icon { width: 32px; min-width: 32px; padding: 0; }
#incidencia-editor [data-incident-dictate][aria-pressed="true"] { background: #c0392b; border-color: #c0392b; }
#incidencia-editor .incidencia-resolution-preview { margin-top: 10px; padding: 10px; border: 1px solid #d5e2e7; border-radius: 5px; background: #fff; }
#incidencia-editor .incidencia-resolution-preview .incidencia-text-actions { margin-top: 8px; }
#incidencia-editor .incidencia-text-status { grid-column: 1 / -1; font-size: 12px; color: #23758a; }
#incidencia-editor .incidencia-text-status.is-error { color: #b42318; }
#incidencia-editor [data-incident-audio-check] { display: block; width: 100%; margin-top: 8px; }
#incidencia-editor [data-incident-audio-check][hidden] { display: none !important; }
#incidencia-editor [data-incident-cancel][hidden] { display: none !important; }
#incidencia-editor [data-incident-ai-preview][hidden], #incidencia-editor [data-incident-text-status][hidden] { display: none !important; }
#incidencia-editor .incidencia-field .facturable-toggle { display: flex; box-sizing: border-box; height: 32px; min-height: 32px; margin: 0; align-items: center; line-height: 1; }
#incidencia-editor .incidencia-field .facturable-toggle > i,
#incidencia-editor .incidencia-field .facturable-toggle > input { flex: 0 0 auto; align-self: center; vertical-align: middle; }

/* Indicador de archivos adjuntos en los listados de proyectos e incidencias. */
.nexus-attachment-indicator{display:inline-flex;align-items:center;justify-content:center;box-sizing:border-box;width:22px;height:22px;border:1px solid #cbdde4;border-radius:4px;background:#f4f8fa;color:#23758a;font-size:12px;line-height:1;vertical-align:middle}
.project-name-with-attachments{display:inline-flex;align-items:center;gap:7px;min-width:0}
.incidencia-sub .nexus-attachment-indicator{width:18px;height:18px;font-size:10px}
.nexus-message-indicator{display:inline-flex;align-items:center;justify-content:center;box-sizing:border-box;width:22px;height:22px;border:1px solid #cbdde4;border-radius:4px;background:#f4f8fa;color:#23758a;font-size:12px;line-height:1;vertical-align:middle}.incidencia-sub .nexus-message-indicator{width:18px;height:18px;font-size:10px}
.nexus-message-indicator.nexus-initial-message-indicator{color:#1976d2;border-color:#bfdbfe;background:#eff6ff}

/* Detalle de texto y archivos de incidencias. */
.nexus-message-indicator.nexus-resolution-indicator{color:#287a3d;border-color:#b9d8c0;background:#f1fbf3}
#incidencia-editor .incidencia-upload-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}
#incidencia-editor .incidencia-upload-label{display:block;margin-bottom:8px;color:#23758a;font-size:12px;font-weight:600}
#incidencia-editor .incidencia-upload-grid input[type=file]{box-sizing:border-box;width:100%;max-width:100%;height:auto;min-height:32px;padding:4px;background:#fff;border:1px solid #d5e2e7;border-radius:4px;font-size:12px}
#incidencia-editor .incidencia-upload-help,#incidencia-editor .incidencia-pending-files{color:#667580;font-size:11px;overflow-wrap:anywhere}
#incidencia-editor .incidencia-file-grid{display:flex;flex-wrap:wrap;gap:10px;margin-top:10px}
#incidencia-editor .incidencia-file-card{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:6px;box-sizing:border-box;width:140px;padding:8px;border:1px solid #d5e2e7;border-radius:5px;background:#fff;color:#23758a;text-decoration:none}
#incidencia-editor .incidencia-file-card img{width:120px;height:85px;object-fit:cover;border-radius:3px}
#incidencia-editor .incidencia-file-card>i{font-size:26px;padding:16px}
#incidencia-editor .incidencia-file-card span{width:100%;font-size:11px;overflow-wrap:anywhere;text-align:center}
@media(max-width:700px){#incidencia-editor .incidencia-upload-grid{grid-template-columns:1fr}}

/* Incidencias: selección y arrastre de archivos como en proyectos. */
#incidencia-editor .incidencia-upload-group h4{margin:0 0 8px;color:#23758a;font-size:12px}
#incidencia-editor .incidencia-file-drop{position:relative;display:flex;flex-direction:column;gap:10px;align-items:center;justify-content:center;box-sizing:border-box;min-height:130px;padding:15px;border:2px dashed #9bcbd2;border-radius:4px;background:#fff;cursor:pointer}
#incidencia-editor .incidencia-file-drop.drag,#incidencia-editor .incidencia-file-drop:hover{background:#e0f7fa;border-color:#1686a4}
#incidencia-editor .incidencia-file-drop:focus-visible{outline:2px solid #1686a4;outline-offset:3px}
#incidencia-editor .incidencia-drop-prompt{display:flex;flex-direction:column;align-items:center;gap:12px;color:#667580;font-size:12px;text-align:center}
#incidencia-editor .incidencia-drop-prompt i{font-size:30px;color:#9aaeb7}
#incidencia-editor .incidencia-hidden-file{position:absolute;width:1px!important;height:1px!important;min-height:0!important;padding:0!important;border:0!important;overflow:hidden;clip-path:inset(50%)}
#incidencia-editor .incidencia-file-card{position:relative;justify-content:flex-start;padding-top:23px;min-width:0}
#incidencia-editor .incidencia-file-card a{display:flex;flex-direction:column;align-items:center;gap:6px;width:100%;color:#23758a;text-decoration:none}
#incidencia-editor .incidencia-file-card a>i{font-size:30px;padding:20px}
#incidencia-editor .incidencia-file-remove{position:absolute;top:2px;right:3px;display:flex;align-items:center;justify-content:center;width:22px;height:22px;min-height:0;padding:0;border:0;border-radius:3px;background:#fff;color:#a43838;font-size:20px;cursor:pointer}
#incidencia-editor .incidencia-file-remove:hover{background:#fdeaea}
#incidencia-editor .incidencia-file-pending{border-style:dashed}
#incidencia-editor .incidencia-file-drop[aria-disabled=true]{opacity:.6;cursor:wait}

#incidencia-editor .incidencia-file-drop .incidencia-file-grid{width:100%;margin:0;justify-content:flex-start}
#incidencia-editor .incidencia-file-drop .incidencia-file-grid:empty{display:none}
#incidencia-editor .incidencia-file-drop:has(.incidencia-file-card) .incidencia-drop-prompt{display:none}

/* Miniaturas dentro de la zona de arrastre, a escala del editor. */
#incidencia-editor .incidencia-file-drop{min-height:134px;padding:12px}
#incidencia-editor .incidencia-file-drop .incidencia-file-card{flex:0 0 104px;width:104px;height:104px;min-height:104px;padding:23px 6px 6px;overflow:hidden}
#incidencia-editor .incidencia-file-drop .incidencia-file-card a{box-sizing:border-box;min-height:0;justify-content:center;gap:4px;overflow:hidden}
#incidencia-editor .incidencia-file-drop .incidencia-file-card a>i{flex:0 0 auto;padding:0}
#incidencia-editor .incidencia-file-drop .incidencia-file-card span{display:-webkit-box;flex:0 1 auto;max-height:3.6em;overflow:hidden;overflow-wrap:anywhere;line-height:1.2;-webkit-box-orient:vertical;-webkit-line-clamp:3}
#incidencia-editor .incidencia-file-remove{top:4px;right:4px;width:22px;height:22px;border:1px solid #d5e2e7;border-radius:4px;background:#fff;color:#444;font-size:18px;box-shadow:0 1px 3px rgba(0,0,0,.12)}

/* Indicadores integrados justo después del código, sin columna independiente. */
#program-body .campo-leyenda.nexus-code-column,#program-body .campo-registro.nexus-code-column{box-sizing:border-box;width:10.41666667%}
#program-body .campo-registro.nexus-code-column{gap:6px}
#program-body .nexus-code-column>strong{flex:0 0 auto;white-space:nowrap}
#program-body .nexus-code-column .project-indicators,#program-body .nexus-code-column .incidencia-indicators{display:inline-flex;align-items:center;gap:3px;flex:0 0 auto}
#program-body .nexus-code-column .nexus-attachment-indicator,#program-body .nexus-code-column .nexus-message-indicator{flex:0 0 18px;width:18px;height:18px;font-size:10px}

/* Materiales de incidencias: entrada numérica sin controles de incremento. */
.incidencia-material-table input[type="number"] {
    -moz-appearance: textfield;
    appearance: textfield;
}
.incidencia-material-table input[type="number"]::-webkit-inner-spin-button,
.incidencia-material-table input[type="number"]::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* Papelera compacta de materiales, con el acabado rojo de las líneas. */
.incidencia-material-remove {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    width: 28px;
    height: 28px;
    min-height: 0;
    padding: 0;
    border: 1px solid #efc3c7;
    border-radius: 5px;
    background: #fff0f1;
    color: #b52a37;
    font-size: 14px;
    line-height: 1;
    cursor: pointer;
}
.incidencia-material-remove:hover {
    background: #b52a37;
    border-color: #b52a37;
    color: #fff;
}

/* Botón compacto para añadir materiales a incidencias. */
#incidencia-add-material {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    width: 28px;
    height: 28px;
    min-height: 0;
    padding: 0;
    border: 1px solid #aaa;
    border-radius: 5px;
    background: #fff;
    color: #1686a4;
    font-size: 14px;
    line-height: 1;
    cursor: pointer;
}

/* Acciones para añadir líneas e impuestos: cruz azul en recuadro blanco. */
.document-line-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    width: 100%;
    clear: both;
    margin-top: 20px;
}
.document-line-actions > .nexus-line-add-button {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
    color: #1686a4;
    font: inherit;
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
    cursor: pointer;
}
.document-line-actions .nexus-line-add-button :is(#add, .nexus-line-add-icon) {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    width: 28px;
    height: 28px;
    border: 1px solid #aaa;
    border-radius: 5px;
    background: #fff;
    color: #1686a4;
    font-size: 14px;
    line-height: 1;
    flex-shrink: 0;
}
.document-line-actions > .nexus-line-add-button:hover { color: #116d86; }
.document-line-actions > .nexus-line-add-button:hover .nexus-line-add-icon { border-color: #1686a4; color: #116d86; }
.document-line-actions > .nexus-line-add-button:focus-visible { outline: 2px solid #1686a4; outline-offset: 4px; border-radius: 5px; }
.document-line-actions > .nexus-line-add-button:disabled { opacity: .55; cursor: not-allowed; }


/* Entrenamiento IA de proveedores: accesos y menú corporativo. */
#provider-training{box-sizing:border-box;clear:both;margin-top:24px;padding:18px;border:1px solid #e2ebf0;border-radius:8px;background:#f8fafc}
#provider-training .provider-training-title{display:flex;align-items:center;gap:9px;margin:0 0 16px;padding:0;border:0;color:#142b43;font-size:16px;font-weight:600;line-height:1.4;text-transform:none}
#provider-training .provider-training-title>i{color:#079fbe;font-size:16px}
.provider-training-accesses{display:flex;flex-wrap:wrap;gap:10px;margin:0}
.provider-training-accesses button{float:none;cursor:pointer}
.provider-training-accesses .provider-training-open{appearance:none;box-sizing:border-box;display:inline-flex;align-items:center;justify-content:center;min-height:37px;background:#1686a4;color:#fff;border:1px solid #1686a4;border-radius:5px;padding:8px 14px;font-family:inherit;font-size:13px;font-weight:500;line-height:18px;gap:8px;box-shadow:none}
.provider-training-accesses .provider-training-open:hover,.provider-training-accesses .provider-training-open:focus-visible{background:#116d86;border-color:#116d86;color:#fff;opacity:1}
.provider-training-indicator{color:inherit;margin-left:0}
.provider-training-indicator[hidden],[data-training-panel][hidden]{display:none!important}
#provider-training-dialog{box-sizing:border-box;position:fixed;inset:0;transform:none;margin:auto;padding:0;width:800px;max-width:calc(100vw - 32px);max-height:calc(100vh - 32px);overflow:hidden;border:1px solid #d5e2e7;border-radius:4px;color:#263b43;background:#fff;box-shadow:0 3px 5px rgba(0,0,0,.12),0 3px 4px rgba(0,0,0,.24)}
#provider-training-dialog[open]{display:flex;flex-direction:column}
#provider-training-dialog::backdrop{background:rgba(0,0,0,.55)}
#provider-training-dialog>.provider-training-heading{position:relative;flex:0 0 auto;padding:20px 52px 10px;border-bottom:1px solid #ccc;background:#f4f8fa;box-shadow:0 2px 6px rgba(38,59,67,.08);text-align:center}
#provider-training-dialog .provider-training-heading h2{margin:0;color:#111;font-size:16px;font-weight:400;line-height:24px;text-transform:uppercase}
#provider-training-dialog .provider-training-heading>.provider-training-close{position:absolute;top:10px;right:10px;box-sizing:border-box;width:32px;height:32px;padding:4px;border:1px solid rgba(0,0,0,.18);border-radius:4px;background:#fff;color:#333;font-size:20px;line-height:22px;text-align:center;cursor:pointer}
#provider-training-dialog .provider-training-heading>.provider-training-close:hover{background:#f1f5f6;border-color:#9aaeb2}
#provider-training-dialog>.provider-training-dialog-content{flex:1 1 auto;min-height:0;overflow-y:auto;overscroll-behavior:contain;padding:26px 18px 18px;text-align:left}
#provider-training-dialog .nexus-form-area{margin:0 0 22px}
#provider-training-dialog .provider-training-full{grid-column:1 / -1;min-width:0}
#provider-training-dialog .provider-training-provider{margin:0 0 16px;color:#526672;font-size:13px;line-height:1.5;overflow-wrap:anywhere}
#provider-training-dialog .provider-training-field label{display:block;margin:0 0 5px;color:#667580;font-size:11px;font-weight:400;line-height:16px;letter-spacing:.04em;text-transform:uppercase}
#provider-training-dialog textarea{box-sizing:border-box;display:block;width:100%;min-height:100px;resize:vertical;padding:9px;border:1px solid #d6e2e9;border-radius:4px;background:#fff;color:#263b43;font:inherit;font-size:13px;line-height:1.5}
#provider-training-dialog textarea:focus{border-color:#1686a4;outline:0;box-shadow:0 0 0 2px rgba(22,134,164,.12)}
#provider-training-dialog input[type=file]{display:none}
#provider-training-dialog .provider-training-help{margin:8px 0 0;color:#667580;font-size:11px;line-height:1.5}
#provider-training-filename{margin:6px 0 0;color:#526672;font-size:12px;overflow-wrap:anywhere}
#provider-training-filename:empty,#provider-training-status:empty{display:none}
#provider-training-status{margin:12px 0 0;white-space:pre-wrap;color:#23758a;font-size:13px;line-height:1.5}
#provider-training-dialog>.provider-training-actions{flex:0 0 auto;z-index:3;display:flex;align-items:center;justify-content:center;flex-wrap:wrap;gap:10px;margin:0;padding:12px 18px;border-top:1px solid #d5e2e7;background:#f4f8fa;box-shadow:0 -4px 10px rgba(38,59,67,.08)}
#provider-training-dialog .provider-training-review{background:#1686a4;border-color:#1686a4;color:#fff}
#provider-training-dialog .provider-training-review:hover,#provider-training-dialog .provider-training-review:focus-visible{background:#116d86;border-color:#116d86;color:#fff}
#provider-training-dialog button:focus-visible{outline:2px solid #1686a4;outline-offset:2px}
@media(max-width:650px){#provider-training-dialog>.provider-training-dialog-content{padding:18px 12px 12px}#provider-training-dialog>.provider-training-actions{padding:10px 12px}#provider-training-dialog>.provider-training-actions .nexus-action-button{justify-content:center;max-width:100%;font-size:11px}}


/* Listado de proveedores: indicadores de entrenamiento por tipo de documento. */
.providers-list .provider-training-mark{display:inline-flex;align-items:center;justify-content:center;width:24px;height:24px;border-radius:4px;background:#1686a4;color:#fff;font-size:15px;line-height:1}

/* Listados corporativos con paginación.
 * Activación: body.nexus-list-page, #program-body.nexus-data-list y .nexus-list-scroll.
 * Cada página solo declara --nexus-list-columns y --nexus-list-min-width.
 * El nombre principal se marca con .nexus-list-primary; las celdas centradas,
 * con .nexus-list-cell-center. Diseño compartido por todos los listados adheridos.
 */
body.nexus-list-page {
	--nexus-list-finder-gap: 7px;
	--nexus-list-finder-control-height: 32px;
}

/* Una sola separación entre la barra de título y la primera fila de filtros. */
.nexus-list-page #program-body-finder > .finder {
	margin-top: 0;
	padding: var(--nexus-list-finder-gap) 0 0;
}

.nexus-list-page #program-body-finder > .finder > form {
	margin-top: 0;
	padding-top: 0;
	align-items: start;
	row-gap: 10px;
}

/* Casillas de filtro con la misma altura que inputs y selects. */
.nexus-list-page #program-body-finder .finder .filter:has(> .user-permission) {
	min-width: max-content;
}

.nexus-list-page #program-body-finder .finder .user-permission {
	height: var(--nexus-list-finder-control-height);
	min-height: var(--nexus-list-finder-control-height);
	gap: 6px;
	padding: 0 8px;
}

.nexus-list-page #program-body-finder .finder .user-permission span {
	white-space: nowrap;
}

.nexus-list-page #program-body-finder .finder .filter:has(> .user-permission):not(:has(> .label)) {
	/* Espacio de la etiqueta de los demás campos: 19px + 3px. */
	padding-top: 22px;
}

.nexus-data-list {
	/* Medidas corporativas de fila: modificar aquí para todos los listados. */
	--nexus-list-row-min-height: 38px;
	--nexus-list-row-padding-y: 9px;
	--nexus-list-row-font-size: 13px;
	--nexus-list-row-line-height: 1.4;
	--nexus-list-badge-line-height: 18px;
}

.nexus-list-page #program-body-finder .nexus-list-count {
	display: inline-block;
	margin-left: 10px;
	color: #687887;
	font-size: 13px;
	font-weight: 400;
	letter-spacing: 0;
	line-height: 1.4;
	vertical-align: middle;
}

body.nexus-list-page .section {
	box-sizing: border-box;
	padding-right: 25px;
	padding-left: 25px;
}

body.nexus-list-page #program-body-finder {
	width: 100%;
	max-width: 1880px;
	margin-right: auto;
	margin-left: auto;
}

body.nexus-list-page #program-body.nexus-data-list {
	width: 100%;
	max-width: 1880px;
	margin: 0 auto 24px;
	padding: 0;
	border: 1px solid #e2ebf0;
	border-radius: 11px;
	overflow: hidden;
	background: #fff;
	box-shadow: 0 2px 8px rgba(20, 43, 67, .045);
}

.nexus-data-list .nexus-list-scroll {
	height: calc(100vh - 275px);
	min-height: 300px;
	overflow: auto;
}

.nexus-data-list .leyenda,
.nexus-data-list .nexus-list-header {
	position: sticky;
	top: 0;
	z-index: 2;
	display: flex;
	box-sizing: border-box;
	min-width: var(--nexus-list-min-width, 900px);
	min-height: 44px;
	padding: 0;
	border-bottom: 1px solid #e8eff3;
	background: #f8fafc;
}

.nexus-data-list .leyenda > .wrapper,
.nexus-data-list .registro > .wrapper,
.nexus-data-list .nexus-list-grid {
	display: grid;
	grid-template-columns: var(--nexus-list-columns, repeat(2, minmax(0, 1fr)));
	align-items: stretch;
	width: 100%;
	min-width: 0;
}

.nexus-data-list .nexus-list-header.nexus-list-grid {
	min-width: var(--nexus-list-min-width, 900px);
}

/* Columnas fijas opcionales en listados con nexus-list-grid:
   añadir nexus-list-sticky-1 o nexus-list-sticky-2 a nexus-list-scroll.
   Para dos columnas, definir --nexus-list-first-column-width con el ancho fijo
   de la primera y reutilizarlo en --nexus-list-columns (ver proyectos). */
.nexus-data-list .nexus-list-scroll:is(.nexus-list-sticky-1, .nexus-list-sticky-2) .wrapper {
	overflow: visible;
}

.nexus-data-list :is(.nexus-list-sticky-1, .nexus-list-sticky-2) .nexus-list-grid > :first-child,
.nexus-data-list .nexus-list-sticky-2 .nexus-list-grid > :nth-child(2) {
	position: sticky;
	left: 0;
	z-index: 1;
	background: #fff;
}

.nexus-data-list .nexus-list-sticky-2 .nexus-list-grid > :nth-child(2) {
	left: var(--nexus-list-first-column-width, 140px);
}

.nexus-data-list .nexus-list-sticky-1 .nexus-list-grid > :first-child,
.nexus-data-list .nexus-list-sticky-2 .nexus-list-grid > :nth-child(2) {
	border-right: 1px solid #edf2f5;
}

.nexus-data-list :is(.nexus-list-sticky-1, .nexus-list-sticky-2) .nexus-list-header .nexus-list-grid > :first-child,
.nexus-data-list .nexus-list-sticky-2 .nexus-list-header .nexus-list-grid > :nth-child(2) {
	background: #f8fafc;
}

.nexus-data-list :is(.nexus-list-sticky-1, .nexus-list-sticky-2) .registro:hover .nexus-list-grid > :first-child,
.nexus-data-list .nexus-list-sticky-2 .registro:hover .nexus-list-grid > :nth-child(2) {
	background: #f0fbfd;
}

/* Grupos de columnas que permanecen visibles al desplazar fichajes y terminales. */
.nexus-data-list .nexus-list-frozen {
	display: grid;
	grid-column: span var(--nexus-list-frozen-columns, 2);
	grid-template-columns: subgrid;
	align-items: stretch;
	min-width: 0;
	background: inherit;
}

.nexus-data-list .campo-leyenda,
.nexus-data-list .campo-registro {
	box-sizing: border-box;
	width: auto !important;
	min-width: 0;
	padding: 12px 16px;
	height: auto;
	min-height: 44px;
	line-height: 1.4;
	float: none;
	text-transform: none;
}

.nexus-data-list .campo-leyenda + .campo-leyenda,
.nexus-data-list .campo-registro + .campo-registro {
	border-left: 1px solid #edf2f5;
}

.nexus-data-list .campo-leyenda {
	display: flex;
	align-items: center;
	color: #687887;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: .03em;
}

.nexus-data-list .campo-leyenda.nexus-list-cell-center,
.nexus-data-list .registro .campo-registro.nexus-list-cell-center {
	justify-content: center;
	padding-right: 0;
	padding-left: 0;
	text-align: center;
}

.nexus-data-list .scroll-container {
	height: auto;
	width: 100%;
	min-width: var(--nexus-list-min-width, 900px);
	min-height: 0;
	overflow: visible;
	background: #fff;
}

.nexus-data-list .scroll-container > .evenodd {
	background: #fff !important;
}

.nexus-data-list .registro {
	box-sizing: border-box;
	min-width: var(--nexus-list-min-width, 900px);
	border-bottom: 1px solid #edf2f5;
	color: #3e5266;
	background: #fff;
}

.nexus-data-list .registro:hover {
	background: #f0fbfd;
}

.nexus-data-list .registro .campo-registro {
	height: auto;
	min-height: var(--nexus-list-row-min-height);
	padding-top: var(--nexus-list-row-padding-y);
	padding-bottom: var(--nexus-list-row-padding-y);
	font-size: var(--nexus-list-row-font-size);
	line-height: var(--nexus-list-row-line-height);
	overflow-wrap: anywhere;
}

.nexus-data-list .registro .nexus-list-primary,
.nexus-data-list .nexus-list-table .nexus-list-primary {
	font-weight: 700;
	color: #142b43;
}

/* Etiquetas compactas que respetan la altura mínima de las filas. */
.nexus-data-list .nexus-list-badge,
.nexus-data-list .registro .campo-registro .notice,
.nexus-data-list .registro .campo-registro .notice.status-badge {
	display: inline-flex;
	align-items: center;
	box-sizing: border-box;
	padding: 0 8px;
	border-radius: 4px;
	font-size: 12px;
	line-height: var(--nexus-list-badge-line-height);
}

.nexus-data-list .nexus-list-badge {
	color: #000;
}

.nexus-data-list .registro :is(.list-icon, .accounting-indicator, .provider-training-mark) {
	width: var(--nexus-list-badge-line-height);
	height: var(--nexus-list-badge-line-height);
	min-height: 0;
}

.nexus-data-list .nexus-list-status {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	box-sizing: border-box;
	width: var(--nexus-list-badge-line-height);
	height: var(--nexus-list-badge-line-height);
	border: 1px solid #efc3c3;
	border-radius: 4px;
	background: #fff0f0;
	color: #b54444;
	line-height: 1;
}

.nexus-data-list .nexus-list-status.is-active {
	border-color: #b9ddc6;
	background: #e7f6ed;
	color: #21834a;
}

.nexus-data-list .nexus-list-glyph {
	font-size: 16px;
	line-height: var(--nexus-list-badge-line-height);
}

.nexus-data-list .nexus-list-ring {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	box-sizing: border-box;
	width: var(--nexus-list-badge-line-height);
	height: var(--nexus-list-badge-line-height);
	line-height: 1;
}

/* Acciones externas al enlace de la fila, como descargar o borrar remesas. */
.nexus-data-list .nexus-list-action-row {
	min-width: var(--nexus-list-min-width, 900px);
	border-bottom: 1px solid #edf2f5;
}

.nexus-data-list .nexus-list-action-layout {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 45px 45px;
}

.nexus-data-list .nexus-list-action-layout .registro {
	float: none;
	width: 100%;
	min-width: 0;
	border-bottom: 0;
}

.nexus-data-list .nexus-list-action-layout .registro > .wrapper {
	grid-template-columns: var(--nexus-list-main-columns);
}

.nexus-data-list .nexus-list-action,
.nexus-data-list .nexus-list-action-link {
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: var(--nexus-list-row-min-height);
}

.nexus-data-list .nexus-list-action-icon {
	line-height: var(--nexus-list-badge-line-height);
}

/* La misma presentación para informes paginados que utilizan una tabla HTML. */
.nexus-data-list .nexus-list-table {
	width: 100%;
	min-width: var(--nexus-list-min-width, 900px);
	border-collapse: separate;
	border-spacing: 0;
	color: #3e5266;
	font-size: var(--nexus-list-row-font-size);
}

.nexus-data-list .nexus-list-table th,
.nexus-data-list .nexus-list-table td {
	box-sizing: border-box;
	padding: var(--nexus-list-row-padding-y) 16px;
	border-bottom: 1px solid #edf2f5;
	text-align: left;
	vertical-align: middle;
	line-height: var(--nexus-list-row-line-height);
}

.nexus-data-list .nexus-list-table th {
	position: sticky;
	top: 0;
	z-index: 2;
	padding-top: 12px;
	padding-bottom: 12px;
	border-bottom-color: #e8eff3;
	background: #f8fafc;
	color: #687887;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: .03em;
}

.nexus-data-list .nexus-list-table td {
	height: var(--nexus-list-row-min-height);
}

.nexus-data-list .nexus-list-table th + th,
.nexus-data-list .nexus-list-table td + td {
	border-left: 1px solid #edf2f5;
}

.nexus-data-list .nexus-list-table tbody tr {
	background: #fff;
}

.nexus-data-list .nexus-list-table tbody tr:hover {
	background: #f0fbfd;
}

.nexus-data-list .nexus-list-table .number {
	text-align: right;
	white-space: nowrap;
}

.nexus-data-list .nexus-list-badge-danger {
	background: #ff0000;
}

.nexus-data-list .nexus-list-badge-success {
	background: #33ff9f;
}

.nexus-data-list #pagination {
	box-sizing: border-box;
	min-height: 0;
	padding: 0;
	border-top: 1px solid #edf2f5;
	background: #fff;
}

.nexus-data-list #pagination > .wrapper {
	box-sizing: border-box;
	width: 100%;
	padding: 0 16px;
}

.nexus-data-list #pagination a {
	display: block;
	float: left;
	width: 25px;
	height: 25px;
	margin: 15px 2px;
	border-radius: 4px;
	color: #486273;
	font-size: 14px;
	font-weight: 600;
	line-height: 27px;
	text-align: center;
	text-decoration: none;
}

.nexus-data-list #pagination a.inuse {
	background: #08acc8;
	color: #fff;
}

.nexus-data-list #pagination a.not-inuse {
	background: #edf3f6;
	color: #29475e;
}

.nexus-data-list #pagination a.not-inuse:hover,
.nexus-data-list #pagination a.not-inuse:focus-visible {
	background: #08acc8;
	color: #fff;
}

@media (max-width: 760px) {
	body.nexus-list-page .section {
		padding-right: 12px;
		padding-left: 12px;
	}

	.nexus-data-list .nexus-list-scroll {
		height: auto;
		max-height: 65vh;
		min-height: 240px;
	}
}

/* Configuración de columnas por listado; el aspecto se define arriba. */
body.providers-list {
	--nexus-list-columns: 70px minmax(280px, 1fr) repeat(3, 55px) 150px 155px 130px;
	--nexus-list-min-width: 1050px;
}

body.clients-list {
	--nexus-list-columns: 44px 90px minmax(260px, 1fr) 150px 155px 155px 110px 160px 175px 120px;
	--nexus-list-min-width: 1430px;
}

@media print {
	body.nexus-list-page #program-body.nexus-data-list {
		margin: 0;
		border: 0;
		box-shadow: none;
		overflow: visible;
	}

	.nexus-data-list .nexus-list-scroll {
		height: auto;
		min-height: 0;
		max-height: none;
		overflow: visible;
	}

	.nexus-data-list .nexus-list-header,
	.nexus-data-list .nexus-list-table th {
		position: static;
	}

	.nexus-data-list .nexus-list-table {
		min-width: 0;
		font-size: 10pt;
	}
}


/* Columnas de los demás apartados con paginación. */
body.nexus-list-movimientos-almacen {
    --nexus-list-columns: 170px minmax(200px,1fr) 160px 170px 95px 120px 110px 130px minmax(260px,1fr) 170px 140px;
    --nexus-list-min-width: 1725px;
}

body.nexus-list-almacenes {
	--nexus-list-columns: 90px minmax(260px,1fr) 120px;
	--nexus-list-min-width: 560px;
}

body.nexus-list-delegaciones {
	--nexus-list-columns: 70px minmax(220px,1fr) 180px 200px minmax(220px,1fr) 110px;
	--nexus-list-min-width: 1100px;
}

/* Ficha de delegación: almacenes vinculados y almacén por defecto. */
.delegacion-help { margin:0 0 6px; color:#5b6e78; font-size:12px; line-height:1.5; }
.delegacion-almacenes { display:grid; gap:10px; padding:16px 0 4px; }
.delegacion-almacen { display:grid; grid-template-columns:minmax(0,1fr) 160px; gap:10px; }
@media (max-width:600px) { .delegacion-almacen { grid-template-columns:1fr; } }

body.nexus-list-amortizaciones {
	--nexus-list-columns: 70px minmax(240px,1fr) 120px 130px 180px 110px 170px 140px;
	--nexus-list-min-width: 1160px;
}

body.nexus-list-bancos-list {
	--nexus-list-columns: minmax(180px,1fr) 260px 150px 180px 160px 90px 90px 80px;
	--nexus-list-min-width: 1190px;
}

body.nexus-list-budgets {
	--nexus-list-columns: 90px minmax(240px,1fr) 120px 150px 170px 170px 100px 140px;
	--nexus-list-min-width: 1180px;
}

body.nexus-list-cash {
	--nexus-list-columns: 140px 130px 150px 180px 180px minmax(260px,1fr);
	--nexus-list-min-width: 1040px;
}

body.nexus-list-categories {
	--nexus-list-columns: minmax(260px,1fr) minmax(260px,1fr) 140px;
	--nexus-list-min-width: 660px;
}

body.nexus-list-conta-asientos {
	--nexus-list-columns: 44px 90px 120px 80px 120px minmax(220px,1fr) minmax(220px,1fr) 140px 140px 70px;
	--nexus-list-min-width: 1244px;
}

/* Contabilidad: menú corporativo de renumeración de asientos. */
#menu_renumerar { box-sizing:border-box; width:min(560px,calc(100vw - 32px)); max-height:calc(100vh - 32px); overflow-y:auto; border:1px solid #d5e2e7; border-radius:7px; background:#fff; color:#39464c; box-shadow:0 16px 50px rgba(20,43,67,.22); }
#menu_renumerar .renumerar-header { display:flex; align-items:center; justify-content:space-between; gap:16px; padding:18px 22px; border-bottom:1px solid #dfe8ed; text-align:left; }
#menu_renumerar .renumerar-header h2 { display:flex; align-items:center; gap:10px; margin:0; color:#23758a; font-size:16px; font-weight:700; text-transform:uppercase; letter-spacing:.04em; }
#menu_renumerar .renumerar-close { position:static; flex:0 0 32px; border-color:#d5e2e7; color:#23758a; font-size:16px; }
#menu_renumerar .content { padding:22px; text-align:left; }
#menu_renumerar .renumerar-description { margin:0 0 18px; font-size:13px; line-height:1.6; color:#596a74; }
#menu_renumerar .nexus-form-area { margin-bottom:16px; }
#menu_renumerar .nexus-form-area-title { font-size:14px; }
#menu_renumerar .campo { float:none; width:100%; min-width:0; }
#menu_renumerar .label { display:block; margin-bottom:7px; color:#71808d; font-size:11px; letter-spacing:.04em; }
#menu_renumerar .select-style { box-sizing:border-box; width:100%; min-width:0; height:37px; }
#menu_renumerar .renumerar-note { display:flex; align-items:flex-start; gap:8px; margin:0 0 18px; color:#687887; font-size:12px; line-height:1.6; }
#menu_renumerar .renumerar-note i { margin-top:3px; color:#23758a; }
#menu_renumerar #renumerar_progress_container { margin:18px 0; }
#menu_renumerar #renumerar_progress_text { margin-bottom:10px; color:#23758a; font-size:13px; line-height:1.5; }
#menu_renumerar .renumerar-progress-track { height:10px; overflow:hidden; border-radius:5px; background:#e3edf1; }
#menu_renumerar #renumerar_progress_bar { width:0; height:100%; border-radius:inherit; background:#1686a4; transition:width .2s ease; }
#menu_renumerar .renumerar-actions { display:flex; justify-content:flex-end; flex-wrap:wrap; gap:10px; margin-top:20px; padding-top:18px; border-top:1px solid #dfe8ed; }
#menu_renumerar .renumerar-cancel { position:static; width:auto; height:auto; min-height:37px; padding:0 14px; border:1px solid #d5e2e7; border-radius:5px; background:#fff; color:#23758a; font-size:12px; line-height:normal; }
#menu_renumerar .renumerar-cancel:hover { background:#f4f8fa; border-color:#1686a4; }
#menu_renumerar button:disabled { opacity:.5; cursor:not-allowed; }
@media(max-width:650px) { #menu_renumerar .content { padding:16px; } #menu_renumerar .renumerar-header { padding:16px; } #menu_renumerar .renumerar-actions .nexus-action-button { flex:1; justify-content:center; } }

body.nexus-list-contabilidad-ncontabilidad {
	--nexus-list-columns: 44px 120px 100px 140px minmax(180px,1fr) minmax(260px,2fr) 180px 140px 140px 70px;
	--nexus-list-min-width: 1374px;
}

body.nexus-list-contabilidad-plantillas-asientos {
	--nexus-list-columns: 44px minmax(300px,1fr) 180px 180px 90px;
	--nexus-list-min-width: 794px;
}

body.nexus-list-deliverysnote {
	--nexus-list-columns: 140px 150px minmax(300px,1fr);
	--nexus-list-min-width: 600px;
}

body.nexus-list-deliverysprov {
	--nexus-list-columns: 170px minmax(280px,1fr) 120px 140px 150px 130px;
	--nexus-list-min-width: 990px;
}

body.nexus-list-deliverysval {
	--nexus-list-columns: 44px 110px minmax(240px,1fr) 120px 150px 120px 160px 180px 140px;
	--nexus-list-min-width: 1264px;
}

body.nexus-list-deliverysval .deliveryval-content-search {
	display: none;
	flex: 0 0 100%;
	padding: 8px 0 12px;
}

body.nexus-list-deliverysval .deliveryval-content-search.is-open {
	display: block;
}

body.nexus-list-deliverysval .deliveryval-content-search label {
	display: block;
	margin-bottom: 4px;
	font-size: 11px;
}

body.nexus-list-deliverysval .deliveryval-content-search input {
	box-sizing: border-box;
	width: min(100%, 360px);
	padding: 8px 10px;
}

body.nexus-list-fichador-fichajes {
	--nexus-list-columns: 200px 90px 100px 180px 180px 130px 170px 160px 110px 110px 100px 100px minmax(260px,1fr) minmax(260px,1fr) 200px;
	--nexus-list-min-width: 2350px;
	--nexus-list-frozen-columns: 3;
}

body.nexus-list-fichador-terminales {
	--nexus-list-columns: 180px minmax(240px,1fr) minmax(300px,1fr) 240px 120px;
	--nexus-list-min-width: 1080px;
	--nexus-list-frozen-columns: 2;
}

body.nexus-list-impuestos {
	--nexus-list-columns: minmax(260px,1fr) 140px 240px 240px 120px;
	--nexus-list-min-width: 1000px;
}

body.nexus-list-incidencias {
	--nexus-list-columns: minmax(240px,1fr) minmax(220px,1fr) 140px 120px 150px 160px 100px 140px 140px 140px;
	--nexus-list-min-width: 1550px;
}

body.nexus-list-invoices {
	--nexus-list-columns: 44px 70px 120px 95px minmax(240px,1fr) 130px 140px 150px 110px 70px 70px;
	--nexus-list-min-width: 1239px;
}

body.nexus-list-invoices .nexus-data-list .nexus-list-grid > :nth-child(3) {
	white-space: nowrap;
}

body.nexus-list-invoices-provider {
	--nexus-list-columns: 70px 120px minmax(240px,1fr) 130px 140px 150px 100px 190px 90px 70px 70px 70px;
	--nexus-list-min-width: 1440px;
}

body.nexus-list-irpf-list {
	--nexus-list-columns: 140px minmax(240px,1fr) minmax(240px,1fr) 150px 100px;
	--nexus-list-min-width: 870px;
}

body.nexus-list-iva-list {
	--nexus-list-columns: 80px 100px 90px repeat(6,180px) 120px 100px;
	--nexus-list-min-width: 1570px;
}

body.nexus-list-logs-usuarios {
	--nexus-list-columns: 44px 170px minmax(220px,1fr) 170px minmax(300px,1fr);
	--nexus-list-min-width: 904px;
}

body.nexus-list-mail-budgets-mail {
	--nexus-list-columns: 140px 100px minmax(260px,1fr) 300px 120px 120px 100px;
	--nexus-list-min-width: 1140px;
}

body.nexus-list-mail-invoices-mail {
	--nexus-list-columns: 140px 100px minmax(260px,1fr) 300px 120px 120px 100px;
	--nexus-list-min-width: 1140px;
}

body.nexus-list-mail-pedidosproveedor-mail {
	--nexus-list-columns: 140px 120px minmax(260px,1fr) 300px 120px 120px 100px;
	--nexus-list-min-width: 1160px;
}

body.nexus-list-mailing-mailing-campaings {
	--nexus-list-columns: 44px 110px minmax(240px,1fr) minmax(240px,1fr) 140px 180px 200px 120px;
	--nexus-list-min-width: 1274px;
}

body.nexus-list-mailing-mailing-emails {
	--nexus-list-columns: 44px 80px minmax(240px,1fr) minmax(200px,1fr) 90px 90px 160px 160px 180px 160px;
	--nexus-list-min-width: 1404px;
}

body.nexus-list-marcas {
	--nexus-list-columns: 120px minmax(260px,1fr) minmax(240px,1fr);
	--nexus-list-min-width: 620px;
}

body.nexus-list-ofertas {
	--nexus-list-columns: 44px minmax(280px,1fr) minmax(280px,1fr) 180px 240px;
	--nexus-list-min-width: 1024px;
}

body.nexus-list-pedidos {
	--nexus-list-columns: 90px minmax(240px,1fr) 140px 160px 180px 130px 140px 140px;
	--nexus-list-min-width: 1220px;
}

body.nexus-list-pedidos-proveedor {
	--nexus-list-columns: 90px minmax(260px,1fr) 140px 170px minmax(240px,1fr) 150px 140px;
	--nexus-list-min-width: 1190px;
}

body.nexus-list-products {
	--nexus-list-columns: 44px 120px 170px minmax(280px,1fr) 80px 110px 110px 140px 100px 120px;
	--nexus-list-min-width: 1274px;
}

body.nexus-list-projects {
	--nexus-list-first-column-width: 140px;
	--nexus-list-columns: var(--nexus-list-first-column-width) minmax(460px,1.7fr) 140px 120px 170px 150px 150px 140px 160px;
	--nexus-list-min-width: 1630px;
}

.nexus-list-projects .project-summary-cell {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	justify-content: center;
	gap: 2px;
}

.nexus-list-projects .project-subline {
	margin: 0;
	color: #718096;
	font-size: 11px;
	font-weight: 400;
}

body.nexus-list-series-factura {
	--nexus-list-columns: 100px minmax(280px,1fr) 150px 150px 180px 180px;
	--nexus-list-min-width: 1040px;
}

body.nexus-list-series-factura-proveedor {
	--nexus-list-columns: 100px minmax(280px,1fr) 150px 150px 180px 180px;
	--nexus-list-min-width: 1040px;
}

body.nexus-list-trabajadores {
	--nexus-list-columns: 80px 180px minmax(240px,1fr) 280px 150px 130px 210px 130px;
	--nexus-list-min-width: 1400px;
}

body.nexus-list-users {
	--nexus-list-columns: 80px 170px minmax(200px,1fr) 170px 100px 140px 150px 200px 200px 170px 90px;
	--nexus-list-min-width: 1670px;
}

body.nexus-list-stock-value {
	--nexus-list-columns: 140px 200px minmax(280px,1fr) 130px 170px 180px;
	--nexus-list-min-width: 1100px;
}

body.nexus-list-remesas-cliente {
	--nexus-list-columns: 200px minmax(250px,1fr) 140px 150px 120px 120px 140px 160px 90px;
	--nexus-list-min-width: 1370px;
	--nexus-list-main-columns: 200px minmax(250px,1fr) 140px 150px 120px 120px 140px 160px;
}

body.nexus-list-product-movements {
	--nexus-list-min-width: 1100px;
}

body.nexus-list-users-without-permissions {
	--nexus-list-columns: 80px 170px minmax(200px,1fr) 170px 100px 140px 150px 200px 200px 90px;
	--nexus-list-min-width: 1500px;
}

/* Distribución de campos del finder de incidencias; separación vertical común. */
#program-body-finder .finder .incidencias-finder-form{display:grid!important;grid-template-columns:repeat(18,minmax(0,1fr)) 140px 140px;gap:10px 10px}
#program-body-finder .finder .incidencias-finder-form .filter{float:none;width:auto!important;min-width:0;padding:0;margin:0}
#program-body-finder .finder .incidencias-finder-form .inc-filter-client,
#program-body-finder .finder .incidencias-finder-form .inc-filter-incident{grid-column:span 4}
#program-body-finder .finder .incidencias-finder-form .inc-filter-status,
#program-body-finder .finder .incidencias-finder-form .inc-filter-priority,
#program-body-finder .finder .incidencias-finder-form .inc-filter-responsible,
#program-body-finder .finder .incidencias-finder-form .inc-filter-billing{grid-column:span 2}
#program-body-finder .finder .incidencias-finder-form .inc-filter-time{grid-column:span 2}
#program-body-finder .finder .incidencias-finder-form .inc-filter-date{grid-column:span 1;width:140px!important;max-width:100%;padding:0 14px 0 0}
#program-body-finder .finder .incidencias-finder-form .inc-filter-pair{display:flex;gap:4px;min-width:0}
#program-body-finder .finder .incidencias-finder-form .inc-filter-pair input{box-sizing:border-box;width:50%;min-width:0;height:var(--nexus-list-finder-control-height,32px);padding:0 5px;border:1px solid #d6e2e9;border-radius:4px;background:#fff;color:#142b43;font-family:inherit;font-size:12px;font-weight:500}
#program-body-finder .finder .incidencias-finder-form .filter .select-style,#program-body-finder .finder .incidencias-finder-form .filter .nexus-finder-select{height:var(--nexus-list-finder-control-height,32px)}
#program-body-finder .finder .incidencias-finder-form .inc-filter-incident>input{display:block;box-sizing:border-box;width:100%;min-width:0;height:var(--nexus-list-finder-control-height,32px);margin:0;padding:0 10px;border:1px solid #d6e2e9;border-radius:4px;background:#fff;color:#142b43;font-family:inherit;font-size:13px;font-weight:500;line-height:30px;box-shadow:0 1px 2px rgba(20,43,67,.04)}
#program-body-finder .finder .incidencias-finder-form .inc-filter-incident>input:focus{border-color:#1686a4;outline:2px solid rgba(22,134,164,.14)}
#program-body-finder .finder .incidencias-finder-form .select-style{width:100%;min-width:0}
@media(max-width:1100px){#program-body-finder .finder .incidencias-finder-form{grid-template-columns:repeat(6,minmax(0,1fr))}#program-body-finder .finder .incidencias-finder-form .inc-filter-client,#program-body-finder .finder .incidencias-finder-form .inc-filter-incident{grid-column:span 2}#program-body-finder .finder .incidencias-finder-form .inc-filter-status,#program-body-finder .finder .incidencias-finder-form .inc-filter-priority,#program-body-finder .finder .incidencias-finder-form .inc-filter-responsible,#program-body-finder .finder .incidencias-finder-form .inc-filter-billing,#program-body-finder .finder .incidencias-finder-form .inc-filter-time{grid-column:span 1}#program-body-finder .finder .incidencias-finder-form .inc-filter-date{grid-column:span 3}}
@media(max-width:650px){#program-body-finder .finder .incidencias-finder-form{grid-template-columns:repeat(2,minmax(0,1fr))}#program-body-finder .finder .incidencias-finder-form .filter{grid-column:span 1!important}#program-body-finder .finder .incidencias-finder-form .inc-filter-client,#program-body-finder .finder .incidencias-finder-form .inc-filter-incident,#program-body-finder .finder .incidencias-finder-form .inc-filter-time,#program-body-finder .finder .incidencias-finder-form .inc-filter-date{grid-column:span 2!important}}


/* Acciones de los pagos de factura: indicador y papelera del mismo tamaño. */
:is(#menu-pagos, #pagos-menu) .payment-accounting-indicator {
    box-sizing: border-box;
    width: 30px;
    height: 30px;
    font-size: 24px;
    line-height: 1;
}
:is(#menu-pagos, #pagos-menu) .payment-delete-button {
    box-sizing: border-box;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    min-width: 30px;
    height: 30px;
    min-height: 30px;
    margin-top: 0;
    padding: 0;
    line-height: 1;
}


/* Menús de pago de factura: cabecera compacta y campos como el diálogo de facturación. */
:is(#menu-pagos, #pagos-menu).invoice-payment-menu {
    box-sizing: border-box; width: min(980px, calc(100vw - 32px)) !important;
    max-height: calc(100vh - 32px); overflow: auto; border: 1px solid #d6e2e9;
    border-radius: 8px; background: #fff; color: #333;
    box-shadow: 0 12px 40px rgba(20,43,67,.25);
}
.invoice-payment-menu .invoice-payment-header {
    display: flex; align-items: center; justify-content: space-between; gap: 16px;
    padding: 12px 20px; border-bottom: 1px solid #e6edf1; background: #f8fafb;
}
.invoice-payment-menu .invoice-payment-header h2 { margin: 0; color: #23758a; font-size: 18px; font-weight: 700; }
:is(#menu-pagos, #pagos-menu).invoice-payment-menu .invoice-payment-close {
    position: static; display: inline-flex; align-items: center; justify-content: center;
    flex: 0 0 32px; width: 32px; height: 32px; padding: 0; line-height: 1;
}
:is(#menu-pagos, #pagos-menu).invoice-payment-menu .invoice-payment-columns { padding: 16px 20px 10px; background: #f4f8fa; }
:is(#menu-pagos, #pagos-menu).invoice-payment-menu .invoice-payment-columns .label {
    margin: 0; padding: 0; height: auto; color: #23758a; font-size: 11px; font-weight: 700; line-height: 1.4;
}
:is(#menu-pagos, #pagos-menu).invoice-payment-menu #menu_pagos_body {
    height: auto !important; min-height: 140px; max-height: 300px; overflow: auto !important;
    padding: 0 20px 16px !important; border-color: #e6edf1 !important;
}
:is(#menu-pagos, #pagos-menu).invoice-payment-menu .preg { margin-top: 14px !important; }
:is(#menu-pagos, #pagos-menu).invoice-payment-menu .invoice-payment-columns > .row,
:is(#menu-pagos, #pagos-menu).invoice-payment-menu .preg .row {
    display: grid; grid-template-columns: 62px minmax(140px,1fr) 144px 90px minmax(150px,1fr) 30px 30px;
    align-items: center; gap: 10px; min-width: 746px;
}
:is(#menu-pagos, #pagos-menu).invoice-payment-menu.has-advance .invoice-payment-columns > .row,
:is(#menu-pagos, #pagos-menu).invoice-payment-menu.has-advance .preg .row {
    grid-template-columns: 62px 62px minmax(140px,1fr) 144px 90px minmax(150px,1fr) 30px 30px;
    min-width: 818px;
}
:is(#menu-pagos, #pagos-menu).invoice-payment-menu .row::before,
:is(#menu-pagos, #pagos-menu).invoice-payment-menu .row::after { display: none; }
:is(#menu-pagos, #pagos-menu).invoice-payment-menu .preg .row > [class*="col-"],
:is(#menu-pagos, #pagos-menu).invoice-payment-menu .invoice-payment-columns .row > .label { float: none; width: auto; min-width: 0; }
:is(#menu-pagos, #pagos-menu).invoice-payment-menu .preg .input-container,
:is(#menu-pagos, #pagos-menu).invoice-payment-menu .preg .styled-input,
:is(#menu-pagos, #pagos-menu).invoice-payment-menu .preg .select-style { box-sizing: border-box; width: 100% !important; margin: 0; padding: 0; border: 0; background: transparent; }
:is(#menu-pagos, #pagos-menu).invoice-payment-menu .preg input[type="text"],
:is(#menu-pagos, #pagos-menu).invoice-payment-menu .preg select {
    box-sizing: border-box; float: none; width: 100% !important; height: 36px; margin: 0;
    padding: 0 8px; border: 1px solid #d6e2e9; border-radius: 4px;
    background: #fff; color: #333; font: inherit; font-size: 13px; line-height: normal;
}
:is(#menu-pagos, #pagos-menu).invoice-payment-menu .preg .select-style > .fa-sort-down { display: none; }
:is(#menu-pagos, #pagos-menu).invoice-payment-menu .preg select { appearance: auto; }
:is(#menu-pagos, #pagos-menu).invoice-payment-menu .preg input[type="checkbox"] { width: 16px; height: 16px; accent-color: #1686a4; }
:is(#menu-pagos, #pagos-menu).invoice-payment-menu .preg input[readonly],
:is(#menu-pagos, #pagos-menu).invoice-payment-menu .preg input:disabled { background: #f4f6f7; color: #687887; }
:is(#menu-pagos, #pagos-menu).invoice-payment-menu .invoice-payment-footer { padding: 12px 20px !important; background: #f8fafb; }
:is(#menu-pagos, #pagos-menu).invoice-payment-menu .invoice-payment-date { display: flex; align-items: center; height: 36px; }
:is(#menu-pagos, #pagos-menu).invoice-payment-menu .preg .invoice-payment-date input { flex: 1 1 auto; min-width: 0; border-radius: 0; padding: 0 4px; text-align: center; }
:is(#menu-pagos, #pagos-menu).invoice-payment-menu .invoice-payment-date-step {
    box-sizing: border-box; display: inline-flex; align-items: center; justify-content: center;
    flex: 0 0 18px; width: 18px; min-width: 18px; height: 36px; min-height: 36px;
    margin: 0; padding: 0; border: 1px solid #d6e2e9; border-radius: 4px 0 0 4px;
    background: #fff; color: #23758a; font-size: 14px; line-height: 1; cursor: pointer;
}
:is(#menu-pagos, #pagos-menu).invoice-payment-menu .invoice-payment-date-step:last-child { border-radius: 0 4px 4px 0; }
:is(#menu-pagos, #pagos-menu).invoice-payment-menu .invoice-payment-date-step:hover { background: #edf6f9; }
:is(#menu-pagos, #pagos-menu).invoice-payment-menu :is(input,select,button):focus-visible { outline: 2px solid #1686a4; outline-offset: 1px; }

/* Totales del menú de pagos, visibles junto al alta de una nueva fila. */
:is(#menu-pagos, #pagos-menu).invoice-payment-menu .invoice-payment-footer { box-sizing: border-box; width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.invoice-payment-menu .invoice-payment-summary { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 16px 28px; margin: 0; }
.invoice-payment-summary > div {
    box-sizing: border-box; min-width: 130px; padding: 8px 12px; text-align: right;
    border: 1px solid #cbdbe5; border-radius: 6px; background: #eaf1f6;
}
.invoice-payment-summary > div:nth-child(2) { border-color: #b1d9df; background: #e3f3f5; }
.invoice-payment-summary .invoice-payment-balance.is-outstanding { border-color: #edbdc3; background: #fcebed; }
.invoice-payment-summary .invoice-payment-balance.is-settled { border-color: #b3dcca; background: #e7f5ed; }
.invoice-payment-summary dt { margin: 0 0 5px; color: #526976; font-size: 12px; font-weight: 500; }
.invoice-payment-summary dd { margin: 0; color: #23758a; font-size: 17px; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.invoice-payment-summary .invoice-payment-balance.is-outstanding dd { color: #b52a37; }
.invoice-payment-summary .invoice-payment-balance.is-settled dd { color: #008a5a; }
@media (max-width: 600px) {
    .invoice-payment-menu .invoice-payment-summary { gap: 12px 16px; }
    .invoice-payment-summary > div { min-width: 110px; }
    .invoice-payment-summary dd { font-size: 15px; }
}

/* Flecha común de los desplegables: margen interior uniforme y texto separado. */
select:not([multiple]):is(:not([size]), [size="0"], [size="1"]) {
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    appearance: none !important;
    padding-right: 32px !important;
    background-image: var(--nexus-select-chevron, url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='m2 4 4 4 4-4' fill='none' stroke='%23526976' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E")) !important;
    background-repeat: no-repeat !important;
    background-position: right 12px center !important;
    background-size: 12px 12px !important;
}
.invoice-payment-menu select:not([multiple]):is(:not([size]), [size="0"], [size="1"]) {
	padding-right: 24px !important;
	background-position: right 6px center !important;
}
/* El icono antiguo queda sustituido por la flecha del propio select. */
.select-style:has(> select:not([multiple]):is(:not([size]), [size="0"], [size="1"])) > :is(span.fa-sort-down, span.fa-chevron-down, span.fa) {
    display: none !important;
}
.nexus-modern-drawer {
    --nexus-select-chevron: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='m2 4 4 4 4-4' fill='none' stroke='%23ffffff' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}
@media (forced-colors: active) {
    select:not([multiple]):is(:not([size]), [size="0"], [size="1"]) {
        -webkit-appearance: auto !important;
        appearance: auto !important;
        background-image: none !important;
    }
}

/* Los campos de pago usan 36 px completos, sin recorte por el contenedor heredado. */
:is(#menu-pagos, #pagos-menu).invoice-payment-menu .preg .select-style {
    display: flex;
    align-items: stretch;
    height: 36px;
    min-height: 36px;
    overflow: visible;
}
:is(#menu-pagos, #pagos-menu).invoice-payment-menu .preg .select-style select {
    position: static;
    inset: auto;
    height: 36px;
    min-height: 36px;
}

/* Readonly del calendario impide teclear; las fechas abiertas siguen siendo seleccionables. */
:is(#menu-pagos, #pagos-menu).invoice-payment-menu .preg input.fecha_pago.fecha_calendario[readonly]:not(:disabled) { background: #fff; color: #333; }

/* Estructura compartida para menús actuales y formularios de pago con campos numerados. */
.invoice-payment-menu .payment-menu-body { box-sizing: border-box; width: 100% !important; max-height: 300px; overflow: auto; padding: 0 20px 16px !important; }
.invoice-payment-menu .payment-menu-row { box-sizing: border-box; float: none; width: 100% !important; margin: 14px 0 0 !important; }
.invoice-payment-menu .payment-menu-fields {
    display: grid !important; grid-template-columns: 62px minmax(140px,1fr) 144px 90px minmax(150px,1fr) 30px 30px;
    grid-template-areas: "paid method date amount bank delete status"; align-items: center; gap: 10px;
    box-sizing: border-box; width: 100% !important; min-width: 746px; margin: 0 !important; padding: 0 !important;
}
.invoice-payment-menu.has-advance .payment-menu-fields {
    grid-template-columns: 62px 62px minmax(140px,1fr) 144px 90px minmax(150px,1fr) 30px 30px;
    grid-template-areas: "advance paid method date amount bank delete status"; min-width: 818px;
}
.invoice-payment-menu .payment-menu-fields::before,
.invoice-payment-menu .payment-menu-fields::after { display: none; }
.invoice-payment-menu .payment-menu-cell { box-sizing: border-box; float: none; width: auto !important; min-width: 0; margin: 0 !important; }
.invoice-payment-menu .payment-menu-cell[data-payment-field="paid"],
.invoice-payment-menu .payment-menu-cell[data-payment-field="advance"] { text-align: center; }
.invoice-payment-menu .payment-menu-cell .input-container,
.invoice-payment-menu .payment-menu-cell .styled-input,
.invoice-payment-menu .payment-menu-cell .select-style { box-sizing: border-box; width: 100% !important; height: 36px; margin: 0; padding: 0; border: 0; background: transparent; overflow: visible; }
.invoice-payment-menu .payment-menu-cell input[type="text"],
.invoice-payment-menu .payment-menu-cell select {
    box-sizing: border-box; position: static; float: none; width: 100% !important; height: 36px; min-height: 36px; margin: 0;
    padding: 0 8px; border: 1px solid #d6e2e9; border-radius: 4px; background-color: #fff; color: #333; font: inherit; font-size: 13px;
}
.invoice-payment-menu .payment-menu-cell input[type="checkbox"] { width: 16px; height: 16px; accent-color: #1686a4; }
.invoice-payment-menu .payment-menu-columns-row > .label { float: none; width: auto !important; margin: 0 !important; padding: 0; }
.invoice-payment-menu .payment-menu-cell input:disabled,
.invoice-payment-menu .payment-menu-cell input[readonly]:not(.fecha_calendario) { background-color: #f4f6f7; color: #687887; }
/* Un cobro bloqueado (anticipos de pedido) debe seguir viéndose marcado. */
:is(#menu-pagos, #pagos-menu).invoice-payment-menu .preg input[type="checkbox"]:checked:disabled {
    border-color: #1686a4; background-color: #1686a4; background-position: center; background-repeat: no-repeat; background-size: 12px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' d='m3 8 3 3 7-7'/%3E%3C/svg%3E");
}
:is(#menu-pagos, #pagos-menu).invoice-payment-menu .payment-menu-cell .invoice-payment-date input { flex: 1 1 auto; min-width: 0; border-radius: 0; padding: 0 4px; text-align: center; }
/* Clic sin halo ni reborde añadido; el teclado conserva un foco interior discreto. */
:is(#menu-pagos, #pagos-menu).invoice-payment-menu :is(input,select,button):focus,
:is(#menu-pagos, #pagos-menu).invoice-payment-menu :is(.input-container,.styled-input,.select-style):focus-within { outline: none; box-shadow: none; }
:is(#menu-pagos, #pagos-menu).invoice-payment-menu :is(input,select,button):focus-visible { outline: none; box-shadow: none; }
:is(#menu-pagos, #pagos-menu).invoice-payment-menu.payment-menu-keyboard-focus :is(input,select,button):focus { outline: 1px dotted #526976; outline-offset: -3px; box-shadow: none; }

/* Piloto de fechas editables por segmentos: finder de facturas de proveedor. */
#program-body-finder .finder .nexus-segmented-date {
    position: relative; display: flex; align-items: stretch; box-sizing: border-box;
    width: 100%; height: 32px; border: 1px solid #d6e2e9; border-radius: 4px; background: #fff;
}
#program-body-finder .finder .nexus-segmented-date:focus-within { border-color: #079fbe; box-shadow: 0 0 0 2px rgba(7,159,190,.12); }
#program-body-finder .finder .nexus-segmented-date > .styled-input { position: absolute; left: 15px; top: 0; width: 1px; height: 30px; overflow: hidden; opacity: 0; pointer-events: none; }
#program-body-finder .finder .nexus-date-parts { display: flex; flex: 1 1 auto; min-width: 0; align-items: center; justify-content: center; gap: 1px; border-left: 1px solid #d6e2e9; border-right: 1px solid #d6e2e9; color: #687887; }
#program-body-finder .finder input.nexus-date-part { float: none; box-sizing: border-box; width: 2.3ch; min-width: 0; height: 28px; margin: 0; padding: 0; border: 0; border-radius: 2px; background: transparent; color: #142b43; font: 500 13px/28px monospace; text-align: center; outline: 0; }
#program-body-finder .finder input.nexus-date-part:last-child { width: 4.3ch; }
#program-body-finder .finder input.nexus-date-part::placeholder { color: #687887; opacity: 1; }
#program-body-finder .finder input.nexus-date-part:focus { background: #edf6f9; box-shadow: inset 0 -2px #079fbe; }
#program-body-finder .finder .nexus-segmented-date button { box-sizing: border-box; display: inline-flex; align-items: center; justify-content: center; flex: 0 0 15px; width: 15px; min-width: 0; height: 30px; margin: 0; padding: 0; border: 0; border-radius: 0; background: transparent; color: #23758a; font-size: 11px; cursor: pointer; }
#program-body-finder .finder .nexus-segmented-date .nexus-date-calendar { flex-basis: 24px; width: 24px; border-left: 1px solid #d6e2e9; font-size: 13px; }
#program-body-finder .finder .nexus-segmented-date .nexus-date-clear { flex-basis: 18px; width: 18px; color: #687887; }
#program-body-finder .finder .nexus-segmented-date button:hover { background: #edf6f9; }
#program-body-finder .finder .nexus-segmented-date button:focus-visible { outline: 1px solid #079fbe; outline-offset: -1px; }
#program-body-finder .finder .filter:has(.nexus-segmented-date) { width: 200px; max-width: 100%; }
@media (max-width: 720px) { #program-body-finder .finder .filter:has(.nexus-segmented-date) { width: 100%; } }

/* Anular los márgenes de centrado que aplicaban los menús de pagos antiguos. */
:is(#menu-pagos, #pagos-menu).invoice-payment-menu { margin: 0 !important; left: 50% !important; top: 50% !important; transform: translate(-50%,-50%); }

.invoice-payment-menu .invoice-payment-summary { margin-left: auto; }

/* Calendario corporativo del componente común de fechas por segmentos. */
#ui-datepicker-div.nexus-date-popup {
    box-sizing: border-box; width: 290px; max-width: calc(100vw - 20px); padding: 10px;
    border: 1px solid #9bb4c4; border-radius: 7px; background: #fff;
    color: #142b43; font-family: "Inter", sans-serif; font-size: 13px;
    box-shadow: 0 10px 28px rgba(20, 43, 67, .26), 0 2px 6px rgba(20, 43, 67, .12);
}
#ui-datepicker-div.nexus-date-popup .ui-datepicker-header {
    padding: 7px 32px; border: 0; border-radius: 5px; background: #143f56; color: #fff;
}
#ui-datepicker-div.nexus-date-popup .ui-datepicker-title { margin: 0; font-size: 14px; font-weight: 600; line-height: 24px; }
#ui-datepicker-div.nexus-date-popup .ui-datepicker-prev,
#ui-datepicker-div.nexus-date-popup .ui-datepicker-next {
    box-sizing: border-box; top: 5px; display: flex; align-items: center; justify-content: center;
    width: 28px; height: 28px; border: 1px solid #648292; border-radius: 4px;
    background: #24556d; color: #fff; cursor: pointer;
}
#ui-datepicker-div.nexus-date-popup .ui-datepicker-prev { left: 5px; }
#ui-datepicker-div.nexus-date-popup .ui-datepicker-next { right: 5px; }
#ui-datepicker-div.nexus-date-popup .ui-datepicker-prev span,
#ui-datepicker-div.nexus-date-popup .ui-datepicker-next span { position: static; width: 7px; height: 7px; margin: 0; border: solid currentColor; border-width: 0 2px 2px 0; background: none; }
#ui-datepicker-div.nexus-date-popup .ui-datepicker-prev span { transform: rotate(135deg); }
#ui-datepicker-div.nexus-date-popup .ui-datepicker-next span { transform: rotate(-45deg); }
#ui-datepicker-div.nexus-date-popup .ui-datepicker-prev:hover,
#ui-datepicker-div.nexus-date-popup .ui-datepicker-next:hover { border-color: #b4e5ef; background: #326c85; }
#ui-datepicker-div.nexus-date-popup table { width: 100%; margin: 8px 0 0; border-collapse: separate; border-spacing: 3px; font-size: 13px; }
#ui-datepicker-div.nexus-date-popup th { padding: 4px 0; color: #455d70; font-size: 11px; font-weight: 600; }
#ui-datepicker-div.nexus-date-popup td { padding: 0; border: 0; }
#ui-datepicker-div.nexus-date-popup td a,
#ui-datepicker-div.nexus-date-popup td span {
    display: flex; align-items: center; justify-content: center; box-sizing: border-box;
    width: 100%; height: 32px; padding: 0; border: 1px solid #cbdbe5; border-radius: 4px;
    background: #f4f8fa; color: #142b43; font-weight: 600; line-height: 1; text-align: center; text-decoration: none;
}
#ui-datepicker-div.nexus-date-popup td a.ui-state-highlight { border-color: #1686a4; background: #edf6f9; color: #23758a; }
#ui-datepicker-div.nexus-date-popup td a:hover,
#ui-datepicker-div.nexus-date-popup td a:focus-visible { border-color: #1686a4; background: #ccebf3; color: #104c64; outline: 2px solid #1686a4; outline-offset: -2px; }
#ui-datepicker-div.nexus-date-popup td a.ui-state-active { border-color: #1686a4; background: #1686a4; color: #fff; }
#ui-datepicker-div.nexus-date-popup td.ui-state-disabled { opacity: 1; }
#ui-datepicker-div.nexus-date-popup td.ui-state-disabled span { border-color: transparent; background: #f4f6f7; color: #adb8bf; }
#ui-datepicker-div.nexus-date-popup td.ui-datepicker-other-month:empty { background: transparent; }

/* Tamaños específicos del resumen de anticipos de pedidos de cliente. */
.pedido-payments .invoice-payment-menu .invoice-payment-summary { gap: 10px; }
.pedido-payments .invoice-payment-summary > div {
    flex: 1 1 150px; min-width: 150px; padding: 10px 14px;
}
@media (max-width: 600px) {
    .pedido-payments .invoice-payment-menu .invoice-payment-summary { width: 100%; }
    .pedido-payments .invoice-payment-summary > div { flex-basis: 130px; min-width: 0; }
}

/* Resumen compacto de anticipos en pedidos. */
.pedido-payments .invoice-payment-summary { gap: 8px; }
.pedido-payments .invoice-payment-summary > div {
    flex: 0 1 auto; min-width: 158px; padding: 6px 10px;
}
.pedido-payments .invoice-payment-summary dt { margin-bottom: 2px; font-size: 11px; line-height: 1.2; white-space: nowrap; }
.pedido-payments .invoice-payment-summary dd { font-size: 15px; line-height: 1.2; }
@media (max-width: 600px) {
    .pedido-payments .invoice-payment-summary > div { flex: 1 1 145px; min-width: 0; padding: 6px 8px; }
    .pedido-payments .invoice-payment-summary dt { white-space: normal; }
}

/* Campo de fecha segmentado como una sola unidad en las filas de pagos. */
:is(#menu-pagos, #pagos-menu).invoice-payment-menu .preg .nexus-date-parts-host {
    box-sizing: border-box; width: 100%; height: 36px; min-height: 36px;
    border: 1px solid #d6e2e9; border-radius: 4px; background: #fff;
}
:is(#menu-pagos, #pagos-menu).invoice-payment-menu .preg .nexus-date-parts-host:focus-within {
    border-color: #d6e2e9; box-shadow: none;
}
:is(#menu-pagos, #pagos-menu).invoice-payment-menu .preg .nexus-date-parts-host .nexus-date-parts {
    box-sizing: border-box; display: flex; width: 100%; height: 100%; min-height: 0;
    align-items: center; justify-content: center; gap: 0; padding: 0; border: 0; border-radius: 0; background: transparent;
}
:is(#menu-pagos, #pagos-menu).invoice-payment-menu .preg .nexus-date-parts-host .nexus-date-parts input.nexus-date-part {
    box-sizing: border-box; flex: 0 0 2ch; width: 2ch !important; min-width: 0; height: 30px !important;
    margin: 0; padding: 0 !important; border: 0 !important; border-radius: 0 !important;
    background: transparent !important; color: #333; font: 13px/28px Arial,sans-serif;
    text-align: center; box-shadow: none; outline: 0;
}
:is(#menu-pagos, #pagos-menu).invoice-payment-menu .preg .nexus-date-parts-host .nexus-date-parts input.nexus-date-part:nth-of-type(3) { flex: 0 0 4ch; width: 4ch !important; }
:is(#menu-pagos, #pagos-menu).invoice-payment-menu .preg .nexus-date-parts-host .nexus-date-parts input.nexus-date-part:focus { background: #edf6f9 !important; }
:is(#menu-pagos, #pagos-menu).invoice-payment-menu .preg .nexus-date-parts-host .nexus-date-separator { flex: 0 0 8px; color: #687887; text-align: center; }
:is(#menu-pagos, #pagos-menu).invoice-payment-menu .preg .nexus-date-parts-host .nexus-date-step {
    box-sizing: border-box; display: inline-flex; flex: 0 0 18px; width: 18px; min-width: 18px;
    height: 34px; margin: 0; padding: 0; align-items: center; justify-content: center;
    border: 0; border-radius: 0; background: transparent; color: #1686a4; font-size: 11px; cursor: pointer;
    box-shadow: none; outline: none;
}
:is(#menu-pagos, #pagos-menu).invoice-payment-menu .preg .nexus-date-parts-host .nexus-date-step:first-child { margin-right: auto; border: 0; }
:is(#menu-pagos, #pagos-menu).invoice-payment-menu .preg .nexus-date-parts-host .nexus-date-step:last-child { margin-left: auto; border: 0; }
:is(#menu-pagos, #pagos-menu).invoice-payment-menu .preg .nexus-date-parts-host .nexus-date-step:hover { background: #edf6f9; }

/* Flechas de fecha de pagos: geometría estable, sin depender de la fuente de iconos. */
:is(#menu-pagos, #pagos-menu).invoice-payment-menu .preg .nexus-date-parts-host .nexus-date-step i { display: none; }
:is(#menu-pagos, #pagos-menu).invoice-payment-menu .preg .nexus-date-parts-host .nexus-date-step::before {
    content: ""; display: block; box-sizing: border-box; width: 6px; height: 6px;
    border: solid currentColor; border-width: 0 1.5px 1.5px 0; transform: rotate(135deg);
}
:is(#menu-pagos, #pagos-menu).invoice-payment-menu .preg .nexus-date-parts-host .nexus-date-step:last-child::before { transform: rotate(-45deg); }

/* Editor de tareas: pestañas y materiales */
#task-editor .nexus-task-move-controls { display: flex; align-items: center; gap: 8px; }
#task-editor .nexus-task-move-controls select { flex: 1 1 auto; min-width: 0; }
#task-editor .nexus-task-move-controls button { flex: 0 0 auto; }
#task-editor [data-task-panel][hidden] { display: none !important; }
#task-editor .kb-task-tabs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); width: min(420px, calc(100% - 36px)); box-sizing: border-box; gap: 2px; flex: 0 0 auto; padding: 3px; margin: 8px auto 0; border: 1px solid #d5e2e7; border-radius: 8px; background: #e8f0f3; }
#task-editor .kb-task-tabs button { display: flex; align-items: center; justify-content: center; min-width: 0; min-height: 30px; padding: 4px 6px; border: 1px solid transparent; border-radius: 5px; background: transparent; color: #23758a; font-size: 12px; font-weight: 700; cursor: pointer; }
#task-editor .kb-task-tabs button:hover { background: #dbeaf0; }
#task-editor .kb-task-tabs button.is-active { border-color: #1686a4; background: #1686a4; color: #fff; }
#task-editor .kb-task-tabs button.is-active:hover { background: #116d86; }
#task-editor .kb-task-tabs button:focus-visible { outline: 2px solid #116d86; outline-offset: 2px; }
#task-editor .kb-task-materials { padding: 18px; border: 1px solid #d5e2e7; border-radius: 7px; background: #f4f8fa; }
#task-editor .kb-material-scroll { overflow-x: auto; }
#task-editor .kb-material-scroll table { width: 100%; min-width: 570px; border-collapse: collapse; table-layout: fixed; }
#task-editor .kb-material-scroll th, #task-editor .kb-material-scroll td { padding: 6px 4px; border-bottom: 1px solid #d5e2e7; text-align: left; font-size: 12px; overflow-wrap: anywhere; }
#task-editor .kb-material-scroll th { color: #667580; text-transform: uppercase; font-size: 10px; }
#task-editor .kb-material-scroll th:nth-child(1) { width: 16%; }
#task-editor .kb-material-scroll th:nth-child(2) { width: auto; }
#task-editor .kb-material-scroll th:nth-child(3), #task-editor .kb-material-scroll th:nth-child(4) { width: 13%; }
#task-editor .kb-material-scroll th:last-child { width: 72px; }
#task-editor .kb-material-row-actions { white-space: nowrap; }
#task-editor .kb-material-row-actions .nexus-action-icon, #task-editor .kb-material-actions .nexus-action-icon { width: 28px; min-width: 28px; height: 28px; min-height: 28px; padding: 0; font-size: 12px; }
#task-editor .kb-material-row-actions .nexus-action-icon + .nexus-action-icon { margin-left: 4px; }
#task-editor .kb-material-fields { display: grid; grid-template-columns: minmax(90px, 1fr) minmax(160px, 2fr) minmax(70px, .8fr) minmax(80px, .8fr) auto; gap: 6px; align-items: end; margin-top: 10px; }
#task-editor .kb-material-fields label { display: block; min-width: 0; font-size: 10px; color: #667580; text-transform: uppercase; }
#task-editor .kb-material-fields input:not([type="hidden"]) { box-sizing: border-box; display: block; width: 100%; min-width: 0; height: 28px; min-height: 28px; margin-top: 4px; padding: 2px 8px; border: 1px solid #d6e2e9; border-radius: 4px; background: #fff; font: inherit; font-size: 12px; }
#task-editor .kb-material-fields input[type="number"] { text-align: center; appearance: textfield; -moz-appearance: textfield; }
#task-editor .kb-material-fields input[type="number"]::-webkit-inner-spin-button,
#task-editor .kb-material-fields input[type="number"]::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
#task-editor .kb-material-fields input:focus { border-color: #1686a4; outline: 0; box-shadow: 0 0 0 2px rgba(22,134,164,.12); }
#task-editor .kb-material-actions { display: flex; gap: 4px; }
#task-editor .kb-material-content p { font-size: 12px; color: #667580; }
#task-editor .kb-material-delivery { margin-top: 14px; }
@media (max-width: 640px) { #task-editor .kb-material-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
