/* ---------------------------------------------------------------------
   Botones REDONDOS con icono grande para los controladores Laravel nativos:
   ayuda, refrescar, borrar, expandir y cerrar.
   Se aplican solos (sin tocar cada vista) por el icono que contienen, o con
   la clase .ncs-btn-round. El texto del boton se oculta; el icono queda grande.
   Cerrar: fondo amarillo, icono negro.
 --------------------------------------------------------------------- */
:root {
	--ncs-round:      36px;   /* diametro de los botones redondos de barra/cabecera */
	--ncs-round-icon: 18px;   /* tamano del icono */
}

/* ---- Ayuda (ncs_help): circulo blanco con sombra, icono azul grande ---- */
.ncs-help {
	display: inline-flex !important;
	align-items: center;
	justify-content: center;
	border-radius: 50% !important;
	border: 0 !important;
	padding: 0 !important;
	cursor: pointer;
	width: var(--ncs-round) !important;
	height: var(--ncs-round) !important;
	background: #fff !important;
	color: #007bff !important;
	box-shadow: 0 1px 4px rgba(0,0,0,.35) !important;
	font-size: 26px !important;
	vertical-align: middle;
}
.ncs-help:hover { background: #e7f1ff !important; color: #0056b3 !important; }
.ncs-help i { font-size: 26px !important; line-height: 1; }

/* ---- Refrescar / borrar / expandir / cerrar: forma redonda ---- */
.ncs-btn-round,
#btnExpand,
.btn:has(> .fa-sync), .btn:has(> .fa-sync-alt), .btn:has(> .fa-redo), .btn:has(> .fa-redo-alt),
.btn:has(> .fa-trash), .btn:has(> .fa-trash-alt), .btn:has(> .fa-eraser),
.btn:has(> .fa-expand), .btn:has(> .fa-expand-arrows-alt), .btn:has(> .fa-compress), .btn:has(> .fa-arrows-alt),
.btn:has(> .fa-times) {
	display: inline-flex !important;
	align-items: center;
	justify-content: center;
	width: var(--ncs-round) !important;
	min-width: var(--ncs-round);
	height: var(--ncs-round) !important;
	padding: 0 !important;
	border-radius: 50% !important;
	font-size: 0 !important;          /* oculta el texto, deja solo el icono */
	line-height: 1;
	box-shadow: 0 1px 4px rgba(0,0,0,.3);
	vertical-align: middle;
}
.ncs-btn-round i, .ncs-btn-round span,
#btnExpand i, #btnExpand span,
.btn:has(> .fa-sync) > [class*="fa-"], .btn:has(> .fa-sync-alt) > [class*="fa-"], .btn:has(> .fa-redo) > [class*="fa-"], .btn:has(> .fa-redo-alt) > [class*="fa-"],
.btn:has(> .fa-trash) > [class*="fa-"], .btn:has(> .fa-trash-alt) > [class*="fa-"], .btn:has(> .fa-eraser) > [class*="fa-"],
.btn:has(> .fa-expand) > [class*="fa-"], .btn:has(> .fa-expand-arrows-alt) > [class*="fa-"], .btn:has(> .fa-compress) > [class*="fa-"], .btn:has(> .fa-arrows-alt) > [class*="fa-"],
.btn:has(> .fa-times) > [class*="fa-"] {
	font-size: var(--ncs-round-icon) !important;
	margin: 0 !important;
	line-height: 1;
}
.fixed-table-toolbar .btn-group > .btn { margin-left: 4px; }

/* dentro de las celdas de tabla el boton es mas chico (altura de tabla, 75%) */
.bootstrap-table .fixed-table-body td .btn:has(> i),
table.table td .btn:has(> .fa-trash), table.table td .btn:has(> .fa-trash-alt) {
	width: var(--ncs-tbl-h, 30px) !important;
	min-width: var(--ncs-tbl-h, 30px);
	height: var(--ncs-tbl-h, 30px) !important;
	padding: 0 !important;
}
.bootstrap-table .fixed-table-body td .btn:has(> i) > [class*="fa-"] { font-size: 14px !important; margin: 0 !important; }

/* ---- Cerrar: redondo, fondo amarillo, icono negro ---- */
.ncs-btn-close,
.btn:has(> .fa-times),
button.close {
	background: #ffc107 !important;
	border: 0 !important;
	color: #000 !important;
	opacity: 1 !important;
	text-shadow: none !important;
}
.ncs-btn-close:hover,
.btn:has(> .fa-times):hover,
button.close:hover { background: #e0a800 !important; color: #000 !important; }
.btn:has(> .fa-times) > [class*="fa-"], .ncs-btn-close i { color: #000 !important; }

/* la X de los .close de Bootstrap (texto &times;) pasa a icono FA negro */
button.close {
	display: inline-flex !important;
	align-items: center;
	justify-content: center;
	width: 30px !important;
	height: 30px !important;
	padding: 0 !important;
	border-radius: 50% !important;
	font-size: 0 !important;
	box-shadow: 0 1px 3px rgba(0,0,0,.3);
}
button.close::before {
	content: "\f00d";
	font-family: "Font Awesome 5 Free", "FontAwesome";
	font-weight: 900;
	font-size: 16px;
	line-height: 1;
	color: #000;
}

/* ---------------------------------------------------------------------
   Botones de BARRA (borrar estado, refrescar, expandir): como el de ayuda de
   referencia (ncs_help): circulo blanco con sombra, icono azul grande, sin texto.
   Cubre .oem-tab (ot_erp_menu), .ncs-btn-cmd (barras de acciones) y .ovr-rect.
 --------------------------------------------------------------------- */
.ncs-btn-round,
.ovr-rect, .ovr-expandir,
.oem-tab:has(> .fa-eraser), .oem-tab:has(> .fa-external-link-alt), .oem-tab:has(> .fa-sync-alt), .oem-tab:has(> .fa-sync),
.ncs-btn-cmd:has(> .fa-eraser), .ncs-btn-cmd:has(> .fa-sync-alt), .ncs-btn-cmd:has(> .fa-sync), .ncs-btn-cmd:has(> .fa-external-link-alt) {
	display: inline-flex !important;
	align-items: center;
	justify-content: center;
	box-sizing: border-box;
	width: var(--ncs-round) !important;
	min-width: var(--ncs-round);
	height: var(--ncs-round) !important;
	padding: 0 !important;
	border: 0 !important;
	border-radius: 50% !important;
	background: #fff !important;
	color: #007bff !important;
	font-size: 0 !important;          /* sin texto, solo icono */
	line-height: 1;
	box-shadow: 0 1px 4px rgba(0,0,0,.35) !important;
	transform: none;
	vertical-align: middle;
}
.ncs-btn-round:hover,
.ovr-rect:hover, .ovr-expandir:hover,
.oem-tab:has(> .fa-eraser):hover, .oem-tab:has(> .fa-external-link-alt):hover, .oem-tab:has(> .fa-sync-alt):hover,
.ncs-btn-cmd:has(> .fa-eraser):hover, .ncs-btn-cmd:has(> .fa-sync-alt):hover, .ncs-btn-cmd:has(> .fa-external-link-alt):hover {
	background: #e7f1ff !important;
	color: #0056b3 !important;
}
.ncs-btn-round i, .ncs-btn-round span,
.ovr-rect i, .ovr-rect span, .ovr-expandir i,
.oem-tab:has(> .fa-eraser) > [class*="fa-"], .oem-tab:has(> .fa-external-link-alt) > [class*="fa-"], .oem-tab:has(> .fa-sync-alt) > [class*="fa-"], .oem-tab:has(> .fa-sync) > [class*="fa-"],
.ncs-btn-cmd:has(> .fa-eraser) > [class*="fa-"], .ncs-btn-cmd:has(> .fa-sync-alt) > [class*="fa-"], .ncs-btn-cmd:has(> .fa-sync) > [class*="fa-"], .ncs-btn-cmd:has(> .fa-external-link-alt) > [class*="fa-"] {
	font-size: 20px !important;
	margin: 0 !important;
	color: inherit !important;
	line-height: 1;
}

/* expandir de las barras legacy (.nav-tabs #btnExpand): mismo circulo blanco / icono azul */
#btnExpand, .nav-tabs #btnExpand {
	background: #fff !important;
	color: #007bff !important;
	border: 0 !important;
	width: var(--ncs-round) !important;
	height: var(--ncs-round) !important;
	box-shadow: 0 1px 4px rgba(0,0,0,.35) !important;
}
#btnExpand i { font-size: 20px !important; color: inherit !important; }

/* cerrar redondo: amarillo, icono negro (gana a .ncs-btn-round blanco) */
.ncs-btn-round.ncs-btn-close { background: #ffc107 !important; color: #000 !important; }
.ncs-btn-round.ncs-btn-close:hover { background: #e0a800 !important; color: #000 !important; }
.ncs-btn-round.ncs-btn-close i { color: #000 !important; }

/* ---------------------------------------------------------------------
   Por id, en todas las pantallas /ncs_*: *-expandir y *-refrescar (blanco, icono azul),
   *-cerrar-tab (amarillo, icono negro). Sin texto.
 --------------------------------------------------------------------- */
[id$="-expandir"], [id$="-refrescar"], [id$="-cerrar-tab"] {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	box-sizing: border-box;
	width: var(--ncs-round) !important;
	min-width: var(--ncs-round);
	height: var(--ncs-round) !important;
	padding: 0 !important;
	border: 0 !important;
	border-radius: 50% !important;
	font-size: 0 !important;
	line-height: 1;
	box-shadow: 0 1px 4px rgba(0,0,0,.35) !important;
	transform: none;
}
[id$="-expandir"][style*="display:none"], [id$="-expandir"][style*="display: none"],
[id$="-cerrar-tab"][style*="display:none"], [id$="-cerrar-tab"][style*="display: none"] { display: none !important; }
[id$="-expandir"], [id$="-refrescar"] { background: #fff !important; color: #007bff !important; }
[id$="-cerrar-tab"] { background: #ffc107 !important; color: #000 !important; }
[id$="-cerrar-tab"]:hover { background: #e0a800 !important; }
[id$="-expandir"] i, [id$="-expandir"] span, [id$="-refrescar"] i, [id$="-cerrar-tab"] i { font-size: 20px !important; margin: 0 !important; color: inherit !important; line-height: 1; }

/* ---------------------------------------------------------------------
   TAMANO UNICO (gana a hojas de cada pantalla): circulo 36px, icono 20px
   (ayuda: icono 26px). El icono puede ser <i> o <span class="fas ...">.
 --------------------------------------------------------------------- */
html body :is(.ncs-help, .ncs-btn-round, #btnExpand, .ovr-rect, [id$="-expandir"], [id$="-refrescar"], [id$="-cerrar-tab"],
	.oem-tab:has(> .fa-eraser), .oem-tab:has(> .fa-external-link-alt), .oem-tab:has(> .fa-sync-alt),
	.ncs-btn-cmd:has(> .fa-eraser), .ncs-btn-cmd:has(> .fa-sync-alt), .ncs-btn-cmd:has(> .fa-sync), .ncs-btn-cmd:has(> .fa-external-link-alt)) {
	width: 36px !important;
	min-width: 36px !important;
	height: 36px !important;
	max-height: 36px !important;
	padding: 0 !important;
	border-radius: 50% !important;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	font-size: 0 !important;
}
html body :is(.ncs-btn-round, #btnExpand, .ovr-rect, [id$="-expandir"], [id$="-refrescar"], [id$="-cerrar-tab"],
	.oem-tab:has(> .fa-eraser), .oem-tab:has(> .fa-external-link-alt), .oem-tab:has(> .fa-sync-alt),
	.ncs-btn-cmd:has(> .fa-eraser), .ncs-btn-cmd:has(> .fa-sync-alt), .ncs-btn-cmd:has(> .fa-sync), .ncs-btn-cmd:has(> .fa-external-link-alt)) > :is(i, span, .fas, .fa) {
	font-size: 20px !important;
	line-height: 1 !important;
	margin: 0 !important;
}
html body .ncs-help i, html body .ncs-help .fas { font-size: 26px !important; line-height: 1 !important; margin: 0 !important; }
html body .ncs-help { font-size: 0 !important; }
html body .ncs-barra-ayuda, html body .ncs-barra-ayuda .ncs-help { margin: 0; }

/* ---------------------------------------------------------------------
   Botones DENTRO DE CELDAS DE TABLA (columna de acciones: editar, borrar, etc.):
   aspecto de boton normal (rectangular, con texto), no redondo. Las reglas redondas de arriba
   (.btn:has(> .fa-trash...), table.table td .btn:has(...), .bootstrap-table td .btn:has(> i))
   los convertian en circulo y ocultaban el texto. :not(#ncs) sube la especificidad para ganarles.
 --------------------------------------------------------------------- */
table td .btn.btn-xs:not(#ncs),
table.table td .btn.btn-xs:not(#ncs),
.bootstrap-table .fixed-table-body td .btn.btn-xs:not(#ncs) {
	display: inline-block !important;
	width: auto !important;
	min-width: 0 !important;
	height: auto !important;
	padding: 1px 5px !important;
	border-radius: 3px !important;
	font-size: 12px !important;
	line-height: 1.5 !important;
	box-shadow: none !important;
	vertical-align: middle;
	white-space: nowrap;
}
table td .btn.btn-xs:not(#ncs) > [class*="fa-"],
table.table td .btn.btn-xs:not(#ncs) > [class*="fa-"],
.bootstrap-table .fixed-table-body td .btn.btn-xs:not(#ncs) > [class*="fa-"] {
	font-size: inherit !important;
	margin: 0 !important;
	line-height: inherit !important;
	color: inherit;
}
/* borrar sin btn-xs: mismo aspecto normal */
table td .btn:has(> .fa-trash):not(.btn-xs):not(#ncs),
table td .btn:has(> .fa-trash-alt):not(.btn-xs):not(#ncs) {
	display: inline-block !important;
	width: auto !important;
	min-width: 0 !important;
	height: auto !important;
	padding: 5px 10px !important;
	border-radius: 3px !important;
	font-size: 14px !important;
	line-height: 1.42857143 !important;
	box-shadow: none !important;
}
table td .btn:has(> .fa-trash):not(.btn-xs):not(#ncs) > [class*="fa-"],
table td .btn:has(> .fa-trash-alt):not(.btn-xs):not(#ncs) > [class*="fa-"] {
	font-size: inherit !important;
	margin: 0 !important;
}

/* ---- Pie de modal: botones normales (Cerrar/Cancelar con texto), no redondos ---- */
.modal-footer .btn:not(.ncs-btn-round):not(#ncs) {
	display: inline-block !important;
	width: auto !important; min-width: 0 !important; height: auto !important;
	padding: 6px 12px !important; border-radius: 4px !important;
	font-size: 14px !important; line-height: 1.42857143 !important;
	box-shadow: none !important; vertical-align: middle;
}
.modal-footer .btn:not(.ncs-btn-round):not(#ncs) > [class*="fa-"] {
	font-size: inherit !important; margin: 0 2px 0 0 !important; line-height: inherit !important; color: inherit !important;
}
.modal-footer .btn.btn-default:not(.ncs-btn-round):not(#ncs) { background: #fff !important; border: 1px solid #ccc !important; color: #333 !important; }
.modal-footer .btn.btn-default:not(.ncs-btn-round):not(#ncs):hover { background: #e6e6e6 !important; }
