body { padding: 80px 15px 0; }
.small { font-size: 0.9em; }
.smaller { font-size: 0.8em; }
.alert p { margin: 0!important; }

/*_____TABLAS_____*/
table.sortable th { cursor: pointer; }
caption { display: none; }
td.action { white-space: nowrap; }
.table td.text--right { text-align: right; }
.table td.text--right .modal,
.table td.text--right .dropdown-menu { text-align: left; }
.hasurl td{background-color:#d4edda!important;}
.hasurl td:first-child{background-color:#c3e6cb!important;}
.hasurl:hover td{background-color:#c3e6cb!important;}

/* ===== SISTEMA DE TRUNCAMIENTO CON TOOLTIPS ===== */

/* Por defecto: TRUNCAR todas las celdas con contenido */
.table.sortable td {
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	max-width: 0; /* Necesario para que ellipsis funcione con table-layout: fixed */
}

/* Excepciones: columnas que NO deben truncarse */
.table.sortable td:first-child, /* Checkbox */
.table.sortable td.utm-sort-cell, /* Columna de orden */
.table.sortable td.action { /* Acciones */
	overflow: visible !important;
	text-overflow: clip !important;
	max-width: none !important;
	white-space: nowrap !important;
}

/* Estilos especiales para columnas con valores mayormente vacíos */
/* Tipo de anuncio y Formato: centrar "-" */
.table.sortable tbody tr td:nth-child(11), /* Tipo de anuncio (aprox) */
.table.sortable tbody tr td:nth-child(12) { /* Formato (aprox) */
	text-align: center;
	color: #999; /* Color sutil para "-" */
}

/* IMPORTANTE: Asegurar que el overflow no oculte los tooltips */
.table.sortable tbody tr {
	position: relative;
}

.table.sortable tbody {
	overflow: visible !important;
}

/* Resizer de columnas */
.column-resizer {
	position: absolute;
	top: 0;
	right: 0;
	width: 5px;
	height: 100%;
	cursor: col-resize;
	background: transparent;
	z-index: 1000;
	pointer-events: auto;
	transition: background-color 0.2s ease;
}

.column-resizer:hover {
	background-color: rgba(0, 136, 204, 0.3);
}

.column-resizer.active {
	background-color: rgba(0, 136, 204, 0.6);
}

/* NOTA: Los estilos de tooltips están en /css/utm-table-tooltip.css */

/* Tooltip JS con position fixed para que no se corte */
#utm-tooltip,
.utm-tooltip {
	position: fixed !important;
	z-index: 100000 !important;
	background: #2c3e50 !important;
	color: #ffffff !important;
	padding: 10px 14px !important;
	border-radius: 6px !important;
	font-size: 13px !important;
	font-weight: 400 !important;
	line-height: 1.5 !important;
	max-width: 300px !important;
	box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3) !important;
	pointer-events: none !important;
	opacity: 0 !important;
	transition: opacity 0.2s ease !important;
}

#utm-tooltip.show,
.utm-tooltip.show {
	opacity: 1 !important;
}

#utm-tooltip.header-tooltip,
.utm-tooltip.header-tooltip {
	background: #1a202c !important;
	font-weight: 500 !important;
}

#utm-tooltip.url-tooltip,
.utm-tooltip.url-tooltip {
	max-width: 500px !important;
	font-family: 'Courier New', monospace !important;
	font-size: 12px !important;
	word-break: break-all !important;
}

/* Asegurar que contenedores permitan tooltips */
.table-container {
	overflow: visible !important;
}

.table.sortable tbody {
	overflow: visible !important;
}

.table.sortable tbody tr {
	overflow: visible !important;
}

/* ===== HEADER MEJORADO DE TABLA ===== */

/* Thead mejorado con sticky y mejor diseño */
.table-header-enhanced {
	position: sticky !important;
	top: 0 !important;
	z-index: 100 !important;
	background: #ffffff !important;
	box-shadow: 0 2px 8px rgba(0,0,0,0.08) !important;
	border-bottom: 2px solid #e0e0e0 !important;
}

.table-header-enhanced th {
	padding: 8px 10px !important;
	font-weight: 600 !important;
	color: #2d3748 !important;
	font-size: 12px !important;
	text-align: left !important;
	vertical-align: middle !important;
	border-right: 1px solid #e8e8e8 !important;
	border-bottom: none !important;
	background: #ffffff !important;
	transition: background 0.15s ease !important;
	position: relative !important;
	height: 40px !important;
	line-height: 1.3 !important;
	white-space: normal !important;
	word-wrap: break-word !important;
	/* Evitar letras sueltas en última línea */
	text-wrap: balance !important;
	hyphens: auto !important;
	-webkit-hyphens: auto !important;
	-moz-hyphens: auto !important;
}

/* Headers ordenables con indicador visual */
.table-header-enhanced th.sortable-header {
	cursor: pointer !important;
	user-select: none !important;
}

.table-header-enhanced th.sortable-header:hover {
	background: #f8f9fa !important;
	color: #0088cc !important;
}

.table-header-enhanced th.sortable-header:active {
	background: #f0f0f0 !important;
}

/* Columnas especiales - OPTIMIZADAS PARA ESPACIO */
.table-header-enhanced th.col-checkbox {
	text-align: center !important;
	padding: 8px 4px !important;
	width: 30px !important;
}

.table-header-enhanced th.col-order {
	text-align: center !important;
	padding: 8px 4px !important;
	width: 60px !important;
	cursor: default !important;
}

.table-header-enhanced th.col-hash {
	width: 68px !important;
	min-width: 68px !important;
	max-width: 68px !important;
	font-family: 'Courier New', monospace !important;
	font-size: 11px !important;
	padding: 8px 6px !important;
}

.table-header-enhanced th.col-actions {
	text-align: center !important;
	padding: 8px 6px !important;
	width: 40px !important;
	color: #718096 !important;
	cursor: default !important;
}

/* ===== ANCHOS ESPECÍFICOS POR TIPO DE COLUMNA ===== */

/* Columnas de contenido largo - más espacio */
.table-header-enhanced th.col-campaign,
.table.sortable tbody td:nth-child(4) {
	width: 15% !important;
	min-width: 140px !important;
}

.table-header-enhanced th.col-url,
.table.sortable tbody td:nth-child(5) {
	width: 18% !important;
	min-width: 160px !important;
}

/* Columnas de contenido medio */
.table-header-enhanced th:nth-child(6),
.table.sortable tbody td:nth-child(6) {
	/* Agrupación */
	width: 12% !important;
	min-width: 120px !important;
}

.table.sortable tbody td:nth-child(7) {
	/* Origen */
	width: 10% !important;
	min-width: 90px !important;
}

/* Columnas de contenido corto */
.table.sortable tbody td:nth-child(8) {
	/* Medio */
	width: 8% !important;
	min-width: 80px !important;
}

.table-header-enhanced th:nth-child(9),
.table-header-enhanced th:nth-child(10),
.table-header-enhanced th:nth-child(11),
.table-header-enhanced th:nth-child(12),
.table.sortable tbody td:nth-child(9),
.table.sortable tbody td:nth-child(10),
.table.sortable tbody td:nth-child(11),
.table.sortable tbody td:nth-child(12) {
	/* Marca, Idioma, Red, Contenido, Formato, Tipo */
	width: 7% !important;
	min-width: 105px !important;
}

/* Último header sin borde derecho */
.table-header-enhanced th:last-child {
	border-right: none !important;
}

/* Hover en toda la fila de headers */
.table-header-enhanced tr:hover th {
	border-right-color: #bbb !important;
}

/* Indicador de columna ordenada (si se implementa sorting) */
.table-header-enhanced th.sorted-asc::after,
.table-header-enhanced th.sorted-desc::after {
	content: '' !important;
	display: inline-block !important;
	margin-left: 6px !important;
	width: 0 !important;
	height: 0 !important;
	border-left: 4px solid transparent !important;
	border-right: 4px solid transparent !important;
	opacity: 0.6 !important;
}

.table-header-enhanced th.sorted-asc::after {
	border-bottom: 5px solid #0088cc !important;
}

.table-header-enhanced th.sorted-desc::after {
	border-top: 5px solid #0088cc !important;
}

/* Tabla de campañas específica */
.table-campaigns th,
.table-campaigns td {
	line-height: 30px !important;
}

/* Mejoras responsive para tablas */
.table {
	border-collapse: collapse;
	width: 100%;
	overflow: visible;
}

/* table-layout fixed SIEMPRE para ellipsis */
.table.sortable {
	table-layout: fixed !important;
	width: 100% !important;
}

.table th {
	padding: 6px 12px;
	vertical-align: middle;
}

.table td {
	padding: 4px 12px;
	vertical-align: middle;
	line-height: 1.4;
}

.table thead th {
	font-weight: 600;
	border-bottom: 2px solid #ddd;
	background: linear-gradient(to bottom, #f8f8f8 0%, #ececec 100%);
	color: #333;
	text-shadow: 0 1px 0 rgba(255,255,255,0.5);
	position: relative;
}

.table thead th:last-child {
	border-right: none !important;
}

/* Mejorar visibilidad de separadores en hover */
.table thead tr:hover th {
	border-right-color: #c8c8c8;
}

/* Separadores de columnas visibles con mejor UI */
.table.sortable tbody td {
	border-right: 1px solid #e8e8e8 !important;
	border-bottom: 1px solid #f0f0f0 !important;
	padding: 8px 10px !important;
	vertical-align: middle !important;
	line-height: 1.5 !important;
	font-size: 12px !important;
	color: #2d3748 !important;

	/* CAMBIO: Permitir word-wrap en lugar de ellipsis */
	white-space: normal !important;
	word-wrap: break-word !important;
	word-break: break-word !important;
	overflow-wrap: break-word !important;
}

.table.sortable tbody td:last-child {
	border-right: none !important;
}

.table.sortable tbody tr {
	position: relative;
	transition: background-color 0.15s ease;
}

.table.sortable tbody tr:hover td {
	background-color: #f8f9fa !important;
	border-right-color: #d0d0d0 !important;
}

/* Separadores en headers también */
.table.sortable thead th {
	border-right: 2px solid #aaa !important;
}

.table.sortable thead th:last-child {
	border-right: none !important;
}

.table.sortable thead tr:hover th {
	border-right-color: #888 !important;
}

/* Asegurar que dropdowns se muestren correctamente */
.table .btn-group {
	position: relative;
}

.table .dropdown-menu {
	position: absolute;
	z-index: 10000;
	margin-top: 2px;
}

.table .dropdown-menu.pull-right {
	right: 0;
	left: auto;
}

/* Container helper cuando dropdown está abierto */
.table-container {
	position: relative;
}

.table-container.dropdown-open {
	overflow: visible !important;
}

.table thead th input[type="checkbox"] {
	margin: 0;
	vertical-align: middle;
	cursor: pointer;
}

/* Desktop: Sin scroll horizontal, todas las columnas visibles */
@media (min-width: 1024px) {
	.table-container {
		overflow: visible !important;
	}

	.table.sortable {
		width: 100%;
		table-layout: fixed;
	}

	/* Asegurar que las celdas trunquen texto correctamente */
	.table.sortable td {
		overflow: hidden;
		text-overflow: ellipsis;
	}
}

/* Responsive: ajustes en tablets y móviles */
@media (max-width: 1023px) {
	/* En tablets, permitir scroll horizontal solo si es necesario */
	.table-container {
		overflow-x: auto !important;
		-webkit-overflow-scrolling: touch;
	}

	.table.sortable {
		min-width: 800px; /* Mínimo razonable para tablets */
	}
}

@media (max-width: 767px) {
	body {
		padding: 70px 10px 0;
	}

	/* En móviles, scroll horizontal necesario */
	.table-container {
		overflow-x: auto !important;
		-webkit-overflow-scrolling: touch;
	}

	.table.sortable {
		min-width: 600px; /* Mínimo para móviles */
	}

	.table th {
		padding: 5px 6px;
		font-size: 0.85em;
	}

	.table td {
		padding: 3px 6px;
		font-size: 0.85em;
	}

	#bulk-actions-bar {
		padding: 10px 15px !important;
		font-size: 0.9em;
	}

	#bulk-actions-bar .bulk-count {
		display: block !important;
		margin-bottom: 8px !important;
		margin-right: 0 !important;
	}

	#bulk-actions-bar button {
		width: 100%;
	}
}

@media (max-width: 480px) {
	.table.sortable {
		min-width: 500px; /* Mínimo para pantallas muy pequeñas */
	}

	.table th {
		padding: 4px 4px;
		font-size: 0.8em;
	}

	.table td {
		padding: 3px 4px;
		font-size: 0.8em;
	}
}

/*_____HASH_____*/
p.url {
	background-color: #DADAFF;
	padding: 25px 10px 10px 10px;
	border-radius: 5px;
	color: #222;
	position: relative;
	top: 25px;
}

.td--hash {
	width: 100px;
	word-break: break-all;
}

p.url span {
	position: absolute;
	top: -11px;
	left: 15px;
	background-color: #7171AC;
	padding: 5px 10px;
	color: white;
	font-weight: bold;
	z-index: 10;
}

/*_____INFORME_____*/
#report ul { margin-top: 5px; }
#report li { margin-bottom: 5px; }

#report li span, .resaltado {
	background-color: #FFFAAD;
	padding: 2px 4px;
	border-radius: 5px;
	color: #444;
	box-shadow: 1px 1px 1px #B1B161;
}

.report_left {
	width: 500px;
	float: left;
}

.report_right {
	width: 500px;
	float: right;
}

.comparacion li {
	position: relative;
	min-height: 15px;
	padding-left: 10px;
	margin-bottom: 5px;
}

.graf {
	display: block;
	height: 15px;
	position: absolute;
	top: 0;
	left: 0;
	z-index: -1;
	border-radius: 5px;
	box-shadow: 1px 1px 1px #718DB1;
	background-color: #b3c7ef;
	background-image: -webkit-gradient(linear, 0 100%, 100% 0, color-stop(.25, rgba(255, 255, 255, .4)), color-stop(.25, transparent), color-stop(.5, transparent), color-stop(.5, rgba(255, 255, 255, .4)), color-stop(.75, rgba(255, 255, 255, .4)), color-stop(.75, transparent), to(transparent));
	background-image: -webkit-linear-gradient(135deg, rgba(255, 255, 255, .4) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .4) 50%, rgba(255, 255, 255, .4) 75%, transparent 75%, transparent);
	background-image: -moz-linear-gradient(135deg, rgba(255, 255, 255, .4) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .4) 50%, rgba(255, 255, 255, .4) 75%, transparent 75%, transparent);
	background-image: -ms-linear-gradient(135deg, rgba(255, 255, 255, .4) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .4) 50%, rgba(255, 255, 255, .4) 75%, transparent 75%, transparent);
	background-image: -o-linear-gradient(135deg, rgba(255, 255, 255, .4) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .4) 50%, rgba(255, 255, 255, .4) 75%, transparent 75%, transparent);
	background-image: linear-gradient(135deg, rgba(255, 255, 255, .4) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .4) 50%, rgba(255, 255, 255, .4) 75%, transparent 75%, transparent);
}

.text {
	cursor: help;
	border-bottom: 1px dotted black;
}

.resaltado_light { background-color: #ffffb3; }
.resaltado_mini { font-weight: bold; }
h4 .resaltado {
	background-color: #BCEB97;
	box-shadow: 1px 1px 1px #89AC6E;
}

/*_____INFORME INTERACTIVO_____*/
.total{font-weight:bold;}

/*_____EMPRESAS_____*/
ul.botones {
	padding: 0;
	margin: 10px auto;
}

ul.botones li {
	float: left;
	list-style: none;
	margin-right: 15px;
	margin-bottom: 15px;
	position: relative;
}

.edit {
	position: absolute;
	right: 5px;
	top: 0;
}

.edit a {
	display: inline;
	width: auto;
	background-color: transparent;
	line-height: 20px;
	font-size: 0.9em;
	font-weight: normal;
	color: #444;
	white-space: nowrap;
	-webkit-transition: all .15s ease;
	-moz-transition: all .15s ease;
	-ms-transition: all .15s ease;
	-o-transition: all .15s ease;
	transition: all .15s ease;
}

.edit a span { display: none; }
.edit a:hover {
	position: relative;
	bottom: 5px;
	left: 30px;
	z-index: 5;
}
.edit a:hover span { display: inline; }

#hashactions{margin:0 0 0 15px;}
.nobadge{
	list-style: none;
	margin: 0;
}
.history li{padding:5px 0;}
.history li p{margin:0;}

/* #notification button{width:220px;} */

/*_____AÑADIDOS_____*/
.progress {
	-webkit-animation: move 1s linear;
	-moz-animation: move 1s linear;
	-o-animation: move 1s linear;
}

@-webkit-keyframes move {
	0% { width: 0px; }
	100% { width: 100%; }
}

@-moz-keyframes move {
	0% { width: 0px; }
	100% { width: 100%; }
}

@-o-keyframes move {
	0% { width: 0px; }
	100% { width: 100%; }
}

/*_____TOAST NOTIFICATIONS_____*/
/* Toast Container */
#toast-container {
	position: fixed !important;
	top: 20px !important;
	right: 20px !important;
	z-index: 999999 !important;
	pointer-events: none !important;
}

/* Toast Base */
#toast-container .toast {
	background: white !important;
	padding: 16px 20px !important;
	border-radius: 12px !important;
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15) !important;
	display: table !important;
	width: auto !important;
	min-width: 300px !important;
	max-width: 400px !important;
	pointer-events: all !important;
	position: relative !important;
	overflow: hidden !important;
	margin-bottom: 12px !important;
	-webkit-animation: slideIn 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55) !important;
	animation: slideIn 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55) !important;
}

#toast-container .toast.removing {
	-webkit-animation: slideOut 0.3s ease-in forwards !important;
	animation: slideOut 0.3s ease-in forwards !important;
}

/* Toast Icon */
#toast-container .toast-icon {
	width: 24px !important;
	height: 24px !important;
	border-radius: 50% !important;
	display: inline-flex !important;
	align-items: center !important;
	justify-content: center !important;
	text-align: center !important;
	line-height: 24px !important;
	font-size: 14px !important;
	font-weight: bold !important;
	vertical-align: middle !important;
	margin-right: 12px !important;
	flex-shrink: 0 !important;
}

/* SVG dentro del icono */
#toast-container .toast-icon svg {
	width: 16px !important;
	height: 16px !important;
	display: block !important;
}

/* Toast Content */
#toast-container .toast-content {
	color: #333 !important;
	font-size: 15px !important;
	font-weight: 500 !important;
	display: inline-block !important;
	vertical-align: middle !important;
	max-width: 280px !important;
}

/* Toast Close Button */
#toast-container .toast-close {
	background: none !important;
	border: none !important;
	color: #999 !important;
	font-size: 20px !important;
	cursor: pointer !important;
	padding: 0 !important;
	width: 24px !important;
	height: 24px !important;
	display: inline-block !important;
	text-align: center !important;
	line-height: 24px !important;
	border-radius: 4px !important;
	vertical-align: middle !important;
	margin-left: 8px !important;
	-webkit-transition: background 0.2s, color 0.2s !important;
	transition: background 0.2s, color 0.2s !important;
}

#toast-container .toast-close:hover {
	background: #f3f4f6 !important;
	color: #333 !important;
}

/* Toast Types */
#toast-container .toast.success .toast-icon {
	background: #d1fae5 !important;
	color: #10b981 !important;
}

#toast-container .toast.error .toast-icon {
	background: #fee2e2 !important;
	color: #ef4444 !important;
}

#toast-container .toast.warning .toast-icon {
	background: #fef3c7 !important;
	color: #f59e0b !important;
}

#toast-container .toast.info .toast-icon {
	background: #dbeafe !important;
	color: #3b82f6 !important;
}

/* Animations */
@-webkit-keyframes slideIn {
	from {
		-webkit-transform: translateX(400px);
		transform: translateX(400px);
		opacity: 0;
	}
	to {
		-webkit-transform: translateX(0);
		transform: translateX(0);
		opacity: 1;
	}
}

@keyframes slideIn {
	from {
		-webkit-transform: translateX(400px);
		transform: translateX(400px);
		opacity: 0;
	}
	to {
		-webkit-transform: translateX(0);
		transform: translateX(0);
		opacity: 1;
	}
}

@-webkit-keyframes slideOut {
	from {
		-webkit-transform: translateX(0);
		transform: translateX(0);
		opacity: 1;
	}
	to {
		-webkit-transform: translateX(400px);
		transform: translateX(400px);
		opacity: 0;
	}
}

@keyframes slideOut {
	from {
		-webkit-transform: translateX(0);
		transform: translateX(0);
		opacity: 1;
	}
	to {
		-webkit-transform: translateX(400px);
		transform: translateX(400px);
		opacity: 0;
	}
}

/* Responsive */
@media (max-width: 480px) {
	#toast-container {
		left: 20px !important;
		right: 20px !important;
	}

	#toast-container .toast {
		min-width: auto !important;
		max-width: none !important;
	}
}

/*_____BULK EDIT CODES_____*/
#bulk-actions-bar {
	display: none;
	position: fixed;
	bottom: 20px;
	left: 50%;
	transform: translateX(-50%);
	background: #333;
	color: #fff;
	padding: 15px 30px;
	border-radius: 5px;
	box-shadow: 0 4px 12px rgba(0,0,0,0.3);
	z-index: 1000;
}

#bulk-actions-bar .bulk-count {
	margin-right: 20px;
	font-weight: bold;
}

#bulkEditModal {
	width: 85% !important;
	max-width: 1400px !important;
	margin-left: -42.5% !important;
	left: 50% !important;
}

#bulkEditModal.in {
	top: 50% !important;
	transform: translateY(-50%) !important;
	margin-top: 0 !important;
}

#bulkEditModal .modal-body {
	max-height: 70vh;
	overflow-y: auto;
}

#bulkEditModal .preview-global {
	background-color: #d9edf7;
	cursor: pointer;
}

#bulkEditModal .preview-override {
	background-color: #fcf8e3;
	font-weight: bold;
	cursor: pointer;
}

#bulkEditModal .preview-value:hover {
	background-color: #c7e5f1;
}

#bulkEditModal .editing {
	padding: 0;
}

#bulkEditModal .override-select {
	width: 100%;
	padding: 5px;
	border: 2px solid #0088cc;
}

#bulkEditModal .combobox-wrapper {
	position: relative;
	width: 100%;
}

#bulkEditModal .combobox-trigger {
	display: flex !important;
	align-items: center;
	justify-content: space-between;
	width: 100%;
	padding: 8px 12px;
	background-color: white;
	border: 1px solid #ccc;
	border-radius: 4px;
	cursor: pointer;
	font-size: 14px;
	color: #333;
	transition: all 0.2s;
	margin: 0;
}

#bulkEditModal .combobox-trigger:hover {
	background-color: #f8f8f8;
	border-color: #999;
}

#bulkEditModal .combobox-chevron {
	opacity: 0.5;
	transition: transform 0.2s;
	flex-shrink: 0;
}

#bulkEditModal .combobox-toggle:checked ~ .combobox-trigger .combobox-chevron {
	transform: rotate(180deg);
}

#bulkEditModal .combobox-content {
	position: absolute;
	top: calc(100% + 4px);
	left: 0;
	width: 100%;
	background-color: white;
	border: 1px solid #ccc;
	border-radius: 4px;
	box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
	opacity: 0;
	visibility: hidden;
	transform: translateY(-10px);
	transition: all 0.2s;
	z-index: 100;
	max-height: 300px;
	overflow: hidden;
}

#bulkEditModal .combobox-toggle:checked ~ .combobox-content {
	opacity: 1;
	visibility: visible;
	transform: translateY(0);
}

#bulkEditModal .combobox-search {
	width: 100%;
	padding: 8px 12px;
	border: none;
	border-bottom: 1px solid #e0e0e0;
	font-size: 14px;
	outline: none;
	box-sizing: border-box;
}

#bulkEditModal .combobox-list {
	list-style: none !important;
	max-height: 200px;
	overflow-y: auto;
	margin: 0 !important;
	padding: 0 !important;
}

#bulkEditModal .combobox-list li {
	margin: 0 !important;
	padding: 0 !important;
}

#bulkEditModal .combobox-list input[type="radio"] {
	display: none !important;
}

#bulkEditModal .combobox-item {
	display: block !important;
	padding: 8px 12px;
	cursor: pointer;
	font-size: 14px;
	color: #333;
	transition: background-color 0.15s;
	position: relative;
	margin: 0;
}

#bulkEditModal .combobox-item:hover {
	background-color: #f5f5f5;
}

#bulkEditModal .combobox-item::after {
	content: '✓';
	position: absolute;
	right: 12px;
	top: 50%;
	transform: translateY(-50%);
	opacity: 0;
	transition: opacity 0.2s;
	color: #333;
	font-weight: bold;
}

#bulkEditModal .combobox-list input[type="radio"]:checked + .combobox-item::after {
	opacity: 1;
}

#bulkEditModal .combobox-trigger-text {
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	flex: 1;
}

#bulkEditModal .combobox-empty {
	padding: 16px 12px;
	text-align: center;
	font-size: 14px;
	color: #999;
}

#bulkEditModal .combobox-list::-webkit-scrollbar {
	width: 8px;
}

#bulkEditModal .combobox-list::-webkit-scrollbar-track {
	background: #f5f5f5;
}

#bulkEditModal .combobox-list::-webkit-scrollbar-thumb {
	background: #ccc;
	border-radius: 4px;
}

#bulkEditModal .combobox-list::-webkit-scrollbar-thumb:hover {
	background: #999;
}

/*_____MODALES_____*/
/* Mejorar manejo de textos largos en modales */
.modal-body {
	word-wrap: break-word !important;
	overflow-wrap: break-word !important;
	word-break: break-word !important;
}

.modal-body p,
.modal-body .alert,
.modal-body div,
.modal-body span {
	word-wrap: break-word !important;
	overflow-wrap: break-word !important;
	max-width: 100% !important;
	white-space: normal !important;
}

.modal-body p {
	margin-bottom: 10px;
}

.modal-body .campaign-name {
	display: block;
	max-width: 100%;
	padding: 8px 12px;
	margin: 10px 0;
	background-color: #f5f5f5;
	border-left: 3px solid #0088cc;
	border-radius: 3px;
	font-weight: bold;
	word-wrap: break-word;
	overflow-wrap: break-word;
	white-space: normal;
}

.modal-body .text-info.campaign-name {
	color: #0088cc !important;
	background-color: #e6f4ff;
}

.modal-body .alert {
	padding: 8px 10px !important;
	margin: 10px 0 !important;
	word-wrap: break-word !important;
	overflow-wrap: break-word !important;
}

/* Asegurar que los modales no se salgan de pantalla */
.modal {
	overflow-y: auto;
}

.modal-body {
	max-height: 400px;
	overflow-y: auto;
}

/*_____CAMPAIGN HEADER_____*/
.campaign-header {
	width: 100% !important;
	margin: 2rem 0 !important;
	overflow: hidden !important;
	zoom: 1 !important;
	padding: 8px;
}

.campaign-header:after {
	content: "" !important;
	display: table !important;
	clear: both !important;
}

.search-column {
	float: left !important;
	width: 80% !important;
	padding-right: 15px !important;
	-webkit-box-sizing: border-box !important;
	-moz-box-sizing: border-box !important;
	box-sizing: border-box !important;
}

.action-column {
	float: right !important;
	width: 20% !important;
	text-align: right !important;
	-webkit-box-sizing: border-box !important;
	-moz-box-sizing: border-box !important;
	box-sizing: border-box !important;
}

.action-column .btn {
	padding: 12px 20px !important;
	font-size: 15px !important;
	line-height: 1.2 !important;
	width: 12rem;
	white-space: nowrap !important;
}

/* CSS custom del botón "Nueva campaña" eliminado - usando Bootstrap base */

/*_____CAMPAIGN SEARCH_____*/
.search-box-container {
	position: relative !important;
	width: 100% !important;
	-webkit-box-sizing: border-box !important;
	-moz-box-sizing: border-box !important;
	box-sizing: border-box !important;
}

.search-input {
	width: 100% !important;
	height: 46px !important;
	margin: 0 0 0 0 !important;
	padding: 0 40px 0 40px !important;
	border: 1px solid #ddd !important;
	border-radius: 4px !important;
	font-size: 15px !important;
	color: #333 !important;
	background: #fff !important;
	-webkit-transition: all 0.2s ease !important;
	transition: all 0.2s ease !important;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08) !important;
	-webkit-box-sizing: border-box !important;
	-moz-box-sizing: border-box !important;
	box-sizing: border-box !important;
}

.search-input:focus {
	border-color: #0088cc !important;
	outline: none !important;
	box-shadow: 0 0 0 3px rgba(0, 136, 204, 0.1), 0 1px 3px rgba(0, 0, 0, 0.08) !important;
}

.search-input::placeholder {
	color: #999 !important;
	font-size: 15px !important;
}

.search-input.loading {
	background-image: url('data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjAiIGhlaWdodD0iMjAiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbD0ibm9uZSIgZmlsbC1ydWxlPSJldmVub2RkIj48Y2lyY2xlIGN4PSIxMCIgY3k9IjEwIiByPSI4IiBzdHJva2U9IiNjY2MiIHN0cm9rZS13aWR0aD0iMiIvPjxwYXRoIGQ9Ik0xOCAxMGE4IDggMCAwIDEtOCA4IiBzdHJva2U9IiMwMDg4Y2MiIHN0cm9rZS13aWR0aD0iMiIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIj48YW5pbWF0ZVRyYW5zZm9ybSBhdHRyaWJ1dGVOYW1lPSJ0cmFuc2Zvcm0iIHR5cGU9InJvdGF0ZSIgZnJvbT0iMCAxMCAxMCIgdG89IjM2MCAxMCAxMCIgZHVyPSIxcyIgcmVwZWF0Q291bnQ9ImluZGVmaW5pdGUiLz48L3BhdGg+PC9nPjwvc3ZnPg==') !important;
	background-repeat: no-repeat !important;
	background-position: right 12px center !important;
	background-size: 18px 18px !important;
	padding-right: 40px !important;
}

.search-icon-left {
	position: absolute !important;
	left: 14px !important;
	top: 60% !important;
	-webkit-transform: translateY(-50%) !important;
	transform: translateY(-50%) !important;
	color: #999 !important;
	pointer-events: none !important;
	font-size: 16px !important;
	margin-top: -5px !important;
}

.clear-search-btn {
	position: absolute !important;
	right: 12px !important;
	top: 50% !important;
	-webkit-transform: translateY(-50%) !important;
	transform: translateY(-50%) !important;
	background: #f0f0f0 !important;
	color: #666 !important;
	border: none !important;
	border-radius: 50% !important;
	width: 20px !important;
	height: 20px !important;
	font-size: 16px !important;
	line-height: 20px !important;
	cursor: pointer !important;
	padding: 0 !important;
	text-align: center !important;
	-webkit-transition: all 0.2s ease !important;
	transition: all 0.2s ease !important;
}

.clear-search-btn:hover {
	background: #e0e0e0 !important;
	color: #333 !important;
	transform: translateY(-50%) scale(1.1) !important;
}

.search-input.loading + .clear-search-btn {
	display: none !important;
}

.pagination-info {
	font-size: 14px !important;
	margin: 16px 0 !important;
}

/*_____CAMPAIGN ACTIONS DROPDOWN_____*/
.btn-group .dropdown-menu {
	min-width: 160px !important;
}

.btn-group .dropdown-menu > li > a {
	padding: 8px 16px !important;
	font-size: 13px !important;
	line-height: 1.4 !important;
	display: block !important;
	clear: both !important;
	font-weight: normal !important;
	white-space: nowrap !important;
}

.btn-group .dropdown-menu > li > a i {
	margin-right: 8px !important;
	opacity: 0.7 !important;
}

.btn-group .dropdown-menu > li > a:hover {
	background-color: #f5f5f5 !important;
	text-decoration: none !important;
}

.btn-group .dropdown-menu > li > a.text-error:hover {
	background-color: #f2dede !important;
	color: #b94a48 !important;
}

.btn-group .dropdown-toggle {
	padding: 4px 8px !important;
	font-size: 13px !important;
}

.btn-group .dropdown-toggle .caret {
	margin-left: 4px !important;
}

.dropdown-menu-right {
	right: 0 !important;
	left: auto !important;
}

/*_____BULK ACTIONS_____*/
#bulk-actions-bar {
	background: #f8f9fa !important;
	border: 1px solid #dee2e6 !important;
	border-radius: 6px !important;
	padding: 12px 16px !important;
	margin-bottom: 16px !important;
	align-items: center !important;
	gap: 12px !important;
	box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05) !important;
	-webkit-box-sizing: border-box !important;
	-moz-box-sizing: border-box !important;
	box-sizing: border-box !important;
}

/* Cuando está visible, usar flex layout */
#bulk-actions-bar.visible {
	display: flex !important;
}

.bulk-count {
	font-weight: 600 !important;
	color: #495057 !important;
	margin-right: auto !important;
	font-size: 14px !important;
}

.campaign-checkbox,
#select-all-campaigns {
	cursor: pointer !important;
	width: 16px !important;
	height: 16px !important;
	margin: 0 !important;
	vertical-align: middle !important;
}

/* Estilos para hover en las filas con checkbox */
tbody tr:hover .campaign-checkbox {
	opacity: 1 !important;
}

/* ====================================================================
   FILTROS AVANZADOS
   ==================================================================== */

/* Panel de filtros */
#advanced-filters-panel {
	animation: fadeIn 0.3s ease-in-out;
}

@keyframes fadeIn {
	from { opacity: 0; transform: translateY(-10px); }
	to { opacity: 1; transform: translateY(0); }
}

/* Selects múltiples de filtros */
.dimension-filter {
	font-size: 13px;
	padding: 6px;
	border: 1px solid #d1d5db;
	border-radius: 4px;
	transition: border-color 0.2s ease;
}

.dimension-filter:focus {
	border-color: #0088cc;
	outline: none;
	box-shadow: 0 0 0 3px rgba(0, 136, 204, 0.1);
}

.dimension-filter option {
	padding: 6px 8px;
	cursor: pointer;
}

.dimension-filter option:hover {
	background-color: #f0f0f0;
}

/* Toggle AND/OR */
.filter-logic-toggle {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	padding: 2px 8px;
	background: #f8f9fa;
	border: 1px solid #dee2e6;
	border-radius: 12px;
	font-weight: 600;
	transition: all 0.2s ease;
}

.filter-logic-toggle:hover {
	background: #e9ecef;
	border-color: #adb5bd;
}

.filter-logic-toggle .logic-label {
	font-family: monospace;
	font-size: 11px;
	letter-spacing: 0.5px;
}

/* Chips de filtros activos */
#active-filters-container {
	animation: slideInDown 0.3s ease;
}

@keyframes slideInDown {
	from { opacity: 0; transform: translateY(-10px); }
	to { opacity: 1; transform: translateY(0); }
}

.filter-chip {
	display: inline-flex;
	align-items: center;
	transition: all 0.2s ease;
	box-shadow: 0 1px 3px rgba(0,0,0,0.12);
}

.filter-chip:hover {
	transform: translateY(-2px);
	box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.filter-chip .remove-filter {
	display: inline-block;
	width: 16px;
	height: 16px;
	line-height: 14px;
	text-align: center;
	border-radius: 50%;
	transition: background-color 0.2s ease;
}

.filter-chip .remove-filter:hover {
	background-color: rgba(0,0,0,0.15);
	text-decoration: none;
}

/* Botón de filtros avanzados */
#toggle-filters-btn {
	transition: all 0.2s ease;
}

#toggle-filters-btn:hover {
	transform: translateY(-2px);
	box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

/* Loading state para selects */
.dimension-filter:disabled {
	opacity: 0.6;
	cursor: not-allowed;
}

/* ====================================================================
   FIN FILTROS AVANZADOS
   ==================================================================== */

@media (max-width: 768px) {
	.search-column {
		float: none !important;
		width: 100% !important;
		margin-right: 0 !important;
		margin-bottom: 12px !important;
	}

	.action-column {
		float: none !important;
		width: 100% !important;
		text-align: left !important;
	}

	/* Layout header responsive */
	.campaign-header[style*="display: flex"] {
		flex-direction: column !important;
		gap: 12px !important;
	}

	.campaign-header > div {
		flex: 1 1 100% !important;
		max-width: 100% !important;
		width: 100% !important;
	}

	.campaign-header .btn-primary {
		width: 100% !important;
	}

	.campaign-header #toggle-filters-btn {
		width: 100% !important;
		text-align: center !important;
	}

	/* Filtros en móvil */
	#advanced-filters-panel .row-fluid {
		margin: 0 !important;
	}

	#advanced-filters-panel .span6 {
		width: 100% !important;
		margin-left: 0 !important;
	}

	.filter-chip {
		margin-bottom: 4px;
	}
}

/* Filter Combobox Styles */
.filter-combobox-wrapper {
	position: relative;
	width: 100%;
	box-sizing: border-box;
}

.filter-combobox-wrapper .filter-combobox-content {
	position: absolute;
	z-index: 10000 !important;
}

.filter-combobox-list::-webkit-scrollbar {
	width: 8px;
}

.filter-combobox-list::-webkit-scrollbar-track {
	background: #f1f1f1;
	border-radius: 4px;
}

.filter-combobox-list::-webkit-scrollbar-thumb {
	background: #888;
	border-radius: 4px;
}

.filter-combobox-list::-webkit-scrollbar-thumb:hover {
	background: #555;
}

/*_____LOADING OVERLAY COMPONENT_____*/
.table-loading-overlay {
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background: rgba(255, 255, 255, 0.92);
	display: none;
	align-items: center;
	justify-content: center;
	z-index: 9999;
	backdrop-filter: blur(2px);
	-webkit-backdrop-filter: blur(2px);
}

.table-loading-overlay.active {
	display: flex;
}

.table-loading-content {
	text-align: center;
	padding: 30px;
	background: #fff;
	border-radius: 8px;
	box-shadow: 0 4px 16px rgba(0,0,0,0.12);
	max-width: 300px;
}

.table-loading-spinner {
	width: 48px;
	height: 48px;
	margin: 0 auto 16px;
	border: 4px solid #e5e7eb;
	border-top-color: #0088cc;
	border-radius: 50%;
	animation: spin 0.8s linear infinite;
	-webkit-animation: spin 0.8s linear infinite;
}

@keyframes spin {
	to { transform: rotate(360deg); }
}

@-webkit-keyframes spin {
	to { -webkit-transform: rotate(360deg); }
}

.table-loading-text {
	color: #495057;
	font-size: 15px;
	font-weight: 500;
	margin-bottom: 8px;
}

.table-loading-subtext {
	color: #6c757d;
	font-size: 13px;
}

/* Contenedor relativo para posicionar el overlay */
.table-wrapper-relative {
	position: relative;
	min-height: 400px;
}

/* Deshabilitar interacciones durante carga */
.table-loading-overlay.active ~ * {
	pointer-events: none;
	user-select: none;
	-webkit-user-select: none;
	-moz-user-select: none;
	-ms-user-select: none;
}

/*_____TOGGLE FILTERS BUTTON_____*/
/* Asegurar que el botón de toggle filtros SOLO muestre icono, nunca texto */
#toggle-filters-btn {
	overflow: hidden !important;
	text-indent: -9999px !important;
	white-space: nowrap !important;
}

/* Reposicionar el icono para que sea visible */
#toggle-filters-btn i {
	text-indent: 0 !important;
	position: absolute !important;
	left: 50% !important;
	top: 50% !important;
	transform: translate(-50%, -50%) !important;
	-webkit-transform: translate(-50%, -50%) !important;
	margin: 0 !important;
}
/* ===== BULK EXPORT MODAL - COMBOBOX STYLES ===== */
#bulkExportModal .combobox-wrapper {
	position: relative;
	width: 100%;
}

#bulkExportModal .combobox-trigger {
	display: flex !important;
	align-items: center;
	justify-content: space-between;
	width: 100%;
	padding: 8px 12px;
	background-color: white;
	border: 1px solid #ccc;
	border-radius: 4px;
	cursor: pointer;
	font-size: 14px;
	color: #333;
	transition: all 0.2s;
	margin: 0;
}

#bulkExportModal .combobox-trigger:hover {
	background-color: #f8f8f8;
	border-color: #999;
}

#bulkExportModal .combobox-chevron {
	opacity: 0.5;
	transition: transform 0.2s;
	flex-shrink: 0;
}

#bulkExportModal .combobox-toggle:checked ~ .combobox-trigger .combobox-chevron {
	transform: rotate(180deg);
}

#bulkExportModal .combobox-content {
	position: absolute;
	top: calc(100% + 4px);
	left: 0;
	width: 100%;
	background-color: white;
	border: 1px solid #ccc;
	border-radius: 4px;
	box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
	opacity: 0;
	visibility: hidden;
	transform: translateY(-10px);
	transition: all 0.2s;
	z-index: 9999;
	max-height: 300px;
	overflow: hidden;
}

#bulkExportModal .combobox-toggle:checked ~ .combobox-content {
	opacity: 1;
	visibility: visible;
	transform: translateY(0);
}

#bulkExportModal .combobox-search {
	width: 100%;
	padding: 8px 12px;
	border: none;
	border-bottom: 1px solid #e0e0e0;
	font-size: 14px;
	outline: none;
	box-sizing: border-box;
}

#bulkExportModal .combobox-list {
	list-style: none !important;
	max-height: 200px;
	overflow-y: auto;
	margin: 0 !important;
	padding: 0 !important;
}

#bulkExportModal .combobox-list li {
	margin: 0 !important;
	padding: 0 !important;
}

#bulkExportModal .combobox-list input[type="radio"] {
	display: none !important;
}

#bulkExportModal .combobox-item {
	display: block !important;
	padding: 8px 12px;
	cursor: pointer;
	font-size: 14px;
	color: #333;
	transition: background-color 0.15s;
	position: relative;
	margin: 0;
}

#bulkExportModal .combobox-item:hover {
	background-color: #f5f5f5;
}

#bulkExportModal .combobox-item::after {
	content: '✓';
	position: absolute;
	right: 12px;
	top: 50%;
	transform: translateY(-50%);
	opacity: 0;
	transition: opacity 0.2s;
	color: #333;
	font-weight: bold;
}

#bulkExportModal .combobox-list input[type="radio"]:checked + .combobox-item::after {
	opacity: 1;
}

#bulkExportModal .combobox-trigger-text {
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	flex: 1;
}

#bulkExportModal .combobox-empty {
	padding: 16px 12px;
	text-align: center;
	font-size: 14px;
	color: #999;
}

#bulkExportModal .combobox-list::-webkit-scrollbar {
	width: 8px;
}

#bulkExportModal .combobox-list::-webkit-scrollbar-track {
	background: #f5f5f5;
}

#bulkExportModal .combobox-list::-webkit-scrollbar-thumb {
	background: #ccc;
	border-radius: 4px;
}

#bulkExportModal .combobox-list::-webkit-scrollbar-thumb:hover {
	background: #999;
}
