/**
 * Menú y utilidades de formularios (complemento cse-ui.css)
 */

.cse-dropdown-mas {
	padding: 6px 6px 4px 1px;
	background-color: var(--cse-brand, #186800);
	border: none;
}

.cse-dropdown-mas > li {
	background-color: var(--cse-brand, #186800);
}

.cse-dropdown-mas > li > hr {
	border-color: rgba(255, 255, 255, 0.25);
	margin: 4px 8px;
}

.cse-dropdown-mas .onhover {
	color: #fff !important;
	font-size: 15px;
	margin-left: 0;
}

.onhover:hover {
	color: #fff !important;
	background-color: var(--cse-brand-dark, #125000) !important;
}

.cse-nav-icon {
	padding-right: 3px;
}

/* Herramientas Admon (SQL multicapa, etc.) — compatible Bootstrap 3 */
.formularios-herramientas-embed {
	max-width: 100%;
	overflow-x: clip;
	padding-bottom: 1.5rem;
}

.formularios-herramientas-embed .d-none {
	display: none !important;
}

.formularios-herramientas-embed .text-bg-success {
	background-color: #dff0d8;
	color: #3c763d;
}

.formularios-herramientas-embed .text-bg-danger {
	background-color: #f2dede;
	color: #a94442;
}

.formularios-herramientas-embed .text-bg-warning {
	background-color: #fcf8e3;
	color: #8a6d3b;
}

.formularios-herramientas-embed .text-bg-light {
	background-color: #f5f5f5;
	color: #333;
}

.formularios-herramientas-embed .rounded-pill {
	border-radius: 10rem;
}

.formularios-herramientas-embed .herramientas-multiselect {
	width: 100%;
	min-height: 12rem;
}

.formularios-herramientas-embed .herramientas-sql-textarea {
	width: 100%;
	min-height: 15rem;
	font-family: Menlo, Monaco, Consolas, monospace;
	font-size: 13px;
}

.formularios-herramientas-embed .sql-resumen-ejecutivo {
	border-color: #ddd !important;
}

.formularios-herramientas-embed .sql-metrica {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	padding: 0.75rem 0.5rem;
	border-radius: 4px;
	border: 1px solid #ddd;
	background: #f9f9f9;
	min-height: 4.5rem;
}

.formularios-herramientas-embed .sql-metrica-valor {
	font-size: 1.35rem;
	font-weight: 700;
	line-height: 1.2;
}

.formularios-herramientas-embed .sql-metrica-etiq {
	font-size: 11px;
	text-transform: uppercase;
	color: #777;
	margin-top: 0.25rem;
}

.formularios-herramientas-embed .sql-metrica-ok .sql-metrica-valor {
	color: #3c763d;
}

.formularios-herramientas-embed .sql-metrica-err .sql-metrica-valor {
	color: #a94442;
}

.formularios-herramientas-embed .sql-detalle-tabla {
	font-size: 13px;
}

.formularios-herramientas-embed .admon-herramientas-log .font-monospace {
	font-size: 12px;
}

/* Estadísticas de uso — informe mensual (agregar=16) */
.estadisticas-uso-embed .imc-estadisticas-lead {
	max-width: 46rem;
	margin-bottom: 1.25rem;
}

.estadisticas-uso-embed .imc-estadisticas-consulta-panel .panel-body {
	padding-bottom: 0.75rem;
}

.estadisticas-uso-embed .imc-estadisticas-filtros .form-label {
	font-weight: 600;
	font-size: 13px;
	margin-bottom: 0.25rem;
}

.estadisticas-uso-embed .imc-estadisticas-submit-wrap {
	margin-bottom: 0;
}

@media (min-width: 768px) {
	.estadisticas-uso-embed .imc-estadisticas-submit-wrap {
		padding-top: 1.65rem;
	}
}

.estadisticas-uso-embed .imc-estadisticas-descargas .btn-group-flex {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
}

.estadisticas-uso-embed .imc-estadisticas-empty {
	max-width: 40rem;
}

.estadisticas-uso-embed .imc-estadisticas-resultados {
	display: flex;
	flex-direction: column;
	gap: 1rem;
}

.estadisticas-uso-embed .imc-estadisticas-contexto .panel-body {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.75rem 1.25rem;
}

.estadisticas-uso-embed .imc-contexto-chip {
	font-size: 14px;
	font-weight: 600;
}

.estadisticas-uso-embed .imc-estadisticas-seccion.panel.herramientas-card {
	margin-bottom: 0;
	border: 1px solid #e5e5e5;
	box-shadow: none;
}

.estadisticas-uso-embed .imc-estadisticas-seccion > .panel-heading {
	background: #f7f7f7;
	border-bottom: 1px solid #e5e5e5;
	padding: 0.65rem 1rem;
	font-size: 14px;
}

.estadisticas-uso-embed .imc-estadisticas-seccion > .panel-body {
	padding: 1rem;
}

.estadisticas-uso-embed .imc-metrica {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	text-align: center;
	padding: 1rem 0.75rem;
	border-radius: 6px;
	border: 1px solid #e0e0e0;
	background: #fafafa;
	min-height: 5.5rem;
	height: 100%;
}

.estadisticas-uso-embed .imc-metrica-compacta {
	min-height: 4.75rem;
	padding: 0.75rem 0.5rem;
}

.estadisticas-uso-embed .imc-metrica-destacada .imc-metrica-valor {
	font-size: 2.35rem;
	font-weight: 800;
	font-variant-numeric: tabular-nums;
	letter-spacing: -0.02em;
	line-height: 1.1;
	color: #1a1a1a;
}

.estadisticas-uso-embed .imc-metrica-compacta.imc-metrica-destacada .imc-metrica-valor {
	font-size: 1.65rem;
}

.estadisticas-uso-embed .imc-metrica-semaforo {
	position: relative;
	padding-top: 1.35rem;
	padding-left: 1rem;
	padding-right: 1rem;
	border-width: 2px;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.estadisticas-uso-embed .imc-semaforo-luz {
	position: absolute;
	top: 0.65rem;
	left: 50%;
	transform: translateX(-50%);
	width: 14px;
	height: 14px;
	border-radius: 50%;
	box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.85), 0 0 10px currentColor;
}

.estadisticas-uso-embed .imc-metrica-semaforo--rojo {
	border-color: #e74c3c;
	background: linear-gradient(180deg, #fff5f5 0%, #ffe8e8 100%);
}

.estadisticas-uso-embed .imc-metrica-semaforo--rojo .imc-semaforo-luz {
	background: #e74c3c;
	color: rgba(231, 76, 60, 0.55);
}

.estadisticas-uso-embed .imc-metrica-semaforo--rojo .imc-metrica-valor {
	color: #c0392b;
}

.estadisticas-uso-embed .imc-metrica-semaforo--amarillo {
	border-color: #f0ad4e;
	background: linear-gradient(180deg, #fffdf5 0%, #fff6da 100%);
}

.estadisticas-uso-embed .imc-metrica-semaforo--amarillo .imc-semaforo-luz {
	background: #f0ad4e;
	color: rgba(240, 173, 78, 0.55);
}

.estadisticas-uso-embed .imc-metrica-semaforo--amarillo .imc-metrica-valor {
	color: #9a6700;
}

.estadisticas-uso-embed .imc-metrica-semaforo--verde {
	border-color: #5cb85c;
	background: linear-gradient(180deg, #f6fff6 0%, #e5f7e5 100%);
}

.estadisticas-uso-embed .imc-metrica-semaforo--verde .imc-semaforo-luz {
	background: #5cb85c;
	color: rgba(92, 184, 92, 0.55);
}

.estadisticas-uso-embed .imc-metrica-semaforo--verde .imc-metrica-valor {
	color: #2d6a2d;
}

.estadisticas-uso-embed .imc-metrica-semaforo--clic {
	cursor: pointer;
	transition: box-shadow 0.15s ease, transform 0.15s ease;
}

.estadisticas-uso-embed .imc-metrica-semaforo--clic:hover,
.estadisticas-uso-embed .imc-metrica-semaforo--clic:focus {
	box-shadow: 0 0 0 2px rgba(51, 122, 183, 0.45);
	transform: translateY(-1px);
	outline: none;
}

.estadisticas-uso-embed .imc-semaforo-ver-lista {
	display: block;
	font-weight: 400;
	opacity: 0.85;
	margin-top: 0.15rem;
}

.estadisticas-uso-embed .imc-graficas-fila-principal {
	margin-bottom: 0.25rem;
}

@media (min-width: 992px) {
	.estadisticas-uso-embed .imc-graficas-fila-principal > [class*="col-lg-6"] {
		display: flex;
		flex-direction: column;
	}

	.estadisticas-uso-embed .imc-graficas-fila-principal .imc-chart-panel {
		flex: 1 1 auto;
		min-height: 420px;
	}
}

.estadisticas-uso-embed .imc-metrica-inline {
	display: inline-flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 0.5rem 0.75rem;
	padding: 0.5rem 1rem;
	min-height: 0;
}

.estadisticas-uso-embed .imc-metrica-inline .imc-metrica-valor {
	font-size: 1.75rem;
}

.estadisticas-uso-embed .imc-metrica-etiq {
	font-size: 12px;
	color: #666;
	margin-top: 0.35rem;
	line-height: 1.3;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.02em;
}

.estadisticas-uso-embed .imc-metrica--danger {
	border-color: #f2dede;
	background: #fdf5f5;
}

.estadisticas-uso-embed .imc-metrica--danger .imc-metrica-valor {
	color: #a94442;
}

.estadisticas-uso-embed .imc-metrica--warning {
	border-color: #faf2cc;
	background: #fffdf5;
}

.estadisticas-uso-embed .imc-metrica--warning .imc-metrica-valor {
	color: #8a6d3b;
}

.estadisticas-uso-embed .imc-metrica--success {
	border-color: #d6e9c6;
	background: #f5faf2;
}

.estadisticas-uso-embed .imc-metrica--success .imc-metrica-valor {
	color: #3c763d;
}

.estadisticas-uso-embed .imc-metrica--info {
	border-color: #cce5ff;
	background: #f5f9ff;
}

.estadisticas-uso-embed .imc-metrica--info .imc-metrica-valor {
	color: #245682;
}

.estadisticas-uso-embed .imc-chart-panel {
	border: 1px solid #eee;
	border-radius: 6px;
	padding: 0.75rem 0.75rem 0.25rem;
	background: #fff;
	height: 100%;
}

.estadisticas-uso-embed .imc-saldo-plan {
	border: 1px solid #e5e5e5;
	border-radius: 6px;
	padding: 1rem;
	background: #fafafa;
	height: 100%;
}

.estadisticas-uso-embed .imc-saldo-plan-titulo {
	margin: 0 0 0.75rem;
	font-size: 15px;
	font-weight: 700;
}

.estadisticas-uso-embed .imc-saldo-plan-item {
	text-align: center;
	padding: 0.5rem 0.25rem;
	border-radius: 4px;
	background: #fff;
	border: 1px solid #eee;
	min-height: 4.25rem;
	display: flex;
	flex-direction: column;
	justify-content: center;
}

.estadisticas-uso-embed .imc-saldo-plan-etiq {
	display: block;
	font-size: 10px;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	color: #777;
	font-weight: 600;
	margin-bottom: 0.25rem;
}

.estadisticas-uso-embed .imc-saldo-plan-valor {
	font-size: 1.35rem;
	font-weight: 800;
	font-variant-numeric: tabular-nums;
	color: #222;
	line-height: 1.15;
}

.estadisticas-uso-embed .imc-saldo-plan-item--consumo .imc-saldo-plan-valor {
	color: #b06f00;
}

.estadisticas-uso-embed .imc-saldo-plan-item--restante .imc-saldo-plan-valor {
	color: #2d6a2d;
}

.estadisticas-uso-embed .imc-saldo-plan-barra-track {
	height: 26px;
	margin-top: 0.85rem;
	margin-bottom: 0.35rem;
	display: flex;
	width: 100%;
	border-radius: 4px;
	overflow: hidden;
	border: 1px solid #ddd;
	background: #eee;
}

.estadisticas-uso-embed .imc-saldo-plan-barra-seg {
	display: flex;
	align-items: center;
	justify-content: center;
	min-width: 0;
	font-size: 11px;
	font-weight: 700;
	color: #fff;
	text-shadow: 0 1px 0 rgba(0, 0, 0, 0.2);
	line-height: 1;
}

.estadisticas-uso-embed .imc-saldo-plan-barra-seg--consumo {
	background: #f0ad4e;
}

.estadisticas-uso-embed .imc-saldo-plan-barra-seg--restante {
	background: #5cb85c;
}

.estadisticas-uso-embed .imc-leyenda-consumo::before,
.estadisticas-uso-embed .imc-leyenda-restante::before {
	content: '';
	display: inline-block;
	width: 10px;
	height: 10px;
	border-radius: 2px;
	margin-right: 0.35rem;
	vertical-align: middle;
}

.estadisticas-uso-embed .imc-leyenda-consumo::before {
	background: #f0ad4e;
}

.estadisticas-uso-embed .imc-leyenda-restante::before {
	background: #5cb85c;
}

.estadisticas-uso-embed .imc-desglose-uso-wrap {
	border-top: 1px solid #eee;
	padding-top: 0.75rem;
}

.estadisticas-uso-embed .imc-desglose-badge {
	display: inline-block;
	font-size: 11px;
	padding: 0.2em 0.5em;
}

.estadisticas-uso-embed .imc-usada-alerta {
	display: inline-block;
	min-width: 2.75rem;
	text-align: center;
	font-size: 11px;
	font-weight: 700;
	line-height: 1.2;
	border-radius: 4px;
}

/* Gestión de clientes (agregar=20) */
.gestion-clientes-embed .imc-gestion-lead {
	max-width: 42rem;
	margin-bottom: 1.25rem;
}

.gestion-clientes-embed .imc-gestion-consulta-panel .panel-body {
	padding-bottom: 0.5rem;
}

.gestion-clientes-embed .imc-gestion-submit-wrap {
	margin-bottom: 0;
}

@media (min-width: 768px) {
	.gestion-clientes-embed .imc-gestion-submit-wrap {
		padding-top: 1.65rem;
	}
}

.gestion-clientes-embed .imc-gestion-cred-box {
	padding: 0.75rem 1rem;
	border: 1px solid #e5e5e5;
	border-radius: 4px;
	background: #fafafa;
	margin-bottom: 1rem;
	min-height: 4.5rem;
}

.gestion-clientes-embed .imc-gestion-cred-label {
	display: block;
	font-size: 11px;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	color: #777;
	margin-bottom: 0.35rem;
}

.gestion-clientes-embed .imc-gestion-cred-valor {
	margin: 0;
	font-size: 1.05rem;
	font-weight: 600;
	word-break: break-all;
}

.gestion-clientes-embed .imc-gestion-superuser {
	margin-top: 0.15rem;
}

.gestion-clientes-embed .imc-gestion-clave-mask {
	font-size: 1.05rem;
	font-weight: 600;
	color: var(--cse-brand-dark, #125000);
	background: #fff;
	font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

.gestion-clientes-embed .imc-gestion-clave-eye {
	border-color: #ccc;
}

.gestion-clientes-embed .imc-gestion-dato {
	margin-bottom: 1rem;
}

.gestion-clientes-embed .imc-gestion-dato-label {
	display: block;
	font-size: 11px;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	color: #777;
	margin-bottom: 0.25rem;
}

.gestion-clientes-embed .imc-gestion-dato-valor {
	margin: 0;
	font-weight: 500;
	color: #333;
	word-break: break-word;
}

.gestion-clientes-embed .imc-gestion-toggle-list {
	margin: 0;
}

.gestion-clientes-embed .imc-gestion-toggle-item {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 0.75rem;
	padding: 0.85rem 0;
	border-bottom: 1px solid #eee;
}

.gestion-clientes-embed .imc-gestion-toggle-item:last-child {
	border-bottom: none;
}

.gestion-clientes-embed .imc-gestion-toggle-label {
	font-weight: 600;
	color: #333;
	flex: 1 1 12rem;
}

.gestion-clientes-embed .imc-gestion-form-switch {
	flex-shrink: 0;
	padding-left: 2.5em;
	min-height: 1.5rem;
}

.gestion-clientes-embed .imc-gestion-form-switch .form-check-input {
	width: 2.5em;
	height: 1.25em;
	margin-left: -2.5em;
	cursor: pointer;
}

.gestion-clientes-embed .imc-gestion-toggle-item--api {
	align-items: flex-start;
}

.gestion-clientes-embed .imc-gestion-api-estado {
	margin-top: 0.25rem;
}

.gestion-clientes-embed .imc-gestion-field {
	margin-bottom: 1rem;
}

.gestion-clientes-embed .imc-gestion-field label {
	font-weight: 600;
}

.gestion-clientes-embed .panel.herramientas-card {
	margin-bottom: 1.25rem;
}

.gestion-clientes-embed .card.herramientas-card,
.gestion-clientes-embed .panel.herramientas-card {
	border: 1px solid #ddd;
	border-radius: 4px;
	box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.gestion-clientes-embed .herramientas-card .panel-heading {
	background: #f5f5f5;
	border-bottom: 1px solid #ddd;
}

.gestion-clientes-embed .card.herramientas-card {
	background: #fff;
	padding: 0;
}

.gestion-clientes-embed .card.herramientas-card > .card-body {
	padding: 1rem 1.25rem;
}

/* Summernote Lite — aislar de Bootstrap 5 (dropdowns / overflow) */
.formularios-herramientas-embed .cse-notificaciones-editor-wrap {
	position: relative;
	z-index: 30;
	margin-bottom: 1.25rem;
	overflow: visible;
}

.formularios-herramientas-embed .cse-notificaciones-listado-panel {
	position: relative;
	z-index: 1;
	clear: both;
	margin-top: 1.5rem;
}

.formularios-herramientas-embed .cse-notificaciones-editor-wrap .panel-body,
.formularios-herramientas-embed .cse-notificaciones-editor-wrap .form-group {
	overflow: visible;
}

.formularios-herramientas-embed .note-editor.note-frame {
	display: block;
	border: 1px solid var(--cse-border, #ced4da);
	border-radius: var(--cse-radius-sm, 0.375rem);
	width: 100%;
	overflow: visible !important;
	background: #fff;
}

.formularios-herramientas-embed .note-editor .note-toolbar {
	position: relative;
	z-index: 5;
	display: block;
	width: 100%;
	background: #f8f9fa;
	border-bottom: 1px solid var(--cse-border, #dee2e6);
}

.formularios-herramientas-embed .note-editor .note-editing-area {
	position: relative;
	z-index: 1;
	overflow: hidden;
}

.formularios-herramientas-embed .note-editor .note-editable {
	overflow-y: auto !important;
	background: #fff;
}

.formularios-herramientas-embed .note-editor .note-statusbar {
	border-top: 1px solid var(--cse-border, #dee2e6);
}

.formularios-herramientas-embed .note-editor .note-btn-group {
	position: relative;
}

.formularios-herramientas-embed .note-editor .note-dropdown-menu,
.formularios-herramientas-embed .note-editor .dropdown-menu {
	position: absolute !important;
	top: 100% !important;
	left: 0 !important;
	right: auto !important;
	bottom: auto !important;
	float: none !important;
	display: none;
	min-width: 8rem;
	max-width: 16rem;
	max-height: 16rem;
	height: auto !important;
	width: auto !important;
	margin: 0;
	padding: 0.25rem 0;
	overflow-x: hidden;
	overflow-y: auto;
	z-index: 2050;
	box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

.formularios-herramientas-embed .note-editor .note-btn-group.open > .note-dropdown-menu,
.formularios-herramientas-embed .note-editor .note-btn-group.open > .dropdown-menu {
	display: block !important;
}

.formularios-herramientas-embed .note-editor .note-popover,
.formularios-herramientas-embed .note-popover {
	z-index: 2060;
}

.formularios-herramientas-embed .note-editor .note-color .note-dropdown-menu {
	min-width: 11rem;
	max-width: none;
}

.formularios-herramientas-embed .note-editor .note-btn {
	box-sizing: border-box;
}

.formularios-herramientas-embed .note-editor .dropdown-toggle::after {
	display: none !important;
}

.formularios-herramientas-embed .note-editor .note-modal {
	z-index: 2100;
}

.formularios-herramientas-embed .cse-notificaciones-listado + .dataTables_wrapper,
.formularios-herramientas-embed #tablaNotificacionesListado_wrapper {
	margin-top: 0.75rem;
	width: 100%;
}

.formularios-herramientas-embed #tablaNotificacionesListado_wrapper .dataTables_info,
.formularios-herramientas-embed #tablaNotificacionesListado_wrapper .dataTables_paginate {
	margin-top: 0.5rem;
}

.formularios-herramientas-embed .cse-notif-pager-fallback .btn {
	min-width: 2.25rem;
}

