:root {
	/* ===== Colors ===== */
	--body-color: #f9fafc;
	--sidebar-color: #FFF;
	--primary-color: #a6a6a6;
	--primary-color-light: #F6F5FF;
	--toggle-color: #DDD;
	--text-color: #000000;
	--black-grey: #5D5D5D;
	--negro: #52616B;
	--azul: #009FE3;
	--naranja: #F39200;
	--verde: #009640;

	/* ====== Transition ====== */
	--tran-03: all 0.2s ease;
	--tran-03: all 0.3s ease;
	--tran-04: all 0.3s ease;
	--tran-05: all 0.3s ease;
}

/*   FAIL ADD USER  */
.modal-confirm {
	color: #636363;
	max-width: initial !important;
	font-size: 14px;
}

.modal-confirm .modal-content {
	padding: 20px;
	border-radius: 5px;
	border: none;
}

.modal-confirm .modal-header {
	border-bottom: none;
	position: relative;
}

.modal-confirm h4 {
	text-align: center;
	font-size: 26px;
	margin: 30px 0 -15px;
}

.modal-confirm .form-control,
.modal-confirm .btn {
	min-height: 40px;
	border-radius: 3px;
}

.modal-confirm .close {
	position: absolute;
	top: -5px;
	right: -5px;
}

.modal-confirm .modal-footer {
	border: none;
	text-align: center;
	border-radius: 5px;
	font-size: 13px;
}

.modal-confirm .icon-box {
	color: #fff;
	position: absolute;
	margin: 0 auto;
	left: 0;
	right: 0;
	top: -70px;
	width: 95px;
	height: 95px;
	border-radius: 50%;
	z-index: 9;
	padding: 15px;
	text-align: center;
	box-shadow: 0px 2px 2px rgba(0, 0, 0, 0.1);
}

.modal-confirm .icon-box i {
	font-size: 58px;
	position: relative;
	top: 3px;
}

.modal-confirm.modal-dialog {
	margin-top: 80px;
}

.modal-confirm .btn {
	display: flex;
	align-items: center;
	justify-content: center;
	color: #fff !important;
	border-radius: 4px;
	text-decoration: none;
	transition: all 0.4s;
	line-height: normal;
	border: none;
}

.trigger-btn {
	display: inline-block;
	margin: 100px auto;
}

.modal.show {
	display: block !important;
}

/* VIEW */
#Form-search input[type="text"] {
	width: 100%;
	max-width: 350px;
	height: 36px;
	background-color: white;
	padding: 5px 16px;
	border: 1px solid var(--negro);
	border-radius: 5px;
}

button#submit_button {
	background: transparent;
	padding: 0px;
	margin: 0px;
	border: 0px;
	width: 15%;
	height: 100%;
	cursor: pointer;
}

ol,
ul {
	padding-left: 0rem !important;
}

/* TABLE */

.main-content {
	padding-top: 50px;
	padding-bottom: 50px;
	padding-left: 4%;
	padding-right: 4%;
}

.table {
	border-spacing: 0 15px;
	border-collapse: separate;
	text-align: center;
}

.table thead tr th,
.table thead tr td,
.table tbody tr th,
.table tbody tr td {
	vertical-align: middle;
	border: none;
}

.table tbody tr td p {
	margin-top: 1rem !important;
}

.table thead tr th:nth-last-child(1),
.table thead tr td:nth-last-child(1),
.table tbody tr th:nth-last-child(1),
.table tbody tr td:nth-last-child(1) {
	text-align: center;
}

.table tbody tr td:nth-last-child(1) {
	width: 100%;
	max-width: 13.5% !important;
	min-width: 13.5% !important;
}

/*
.table tbody tr {
	box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
	border-radius: 5px;
}*/

.table tbody tr td {
	background: #fff;
	box-shadow: rgba(0, 0, 0, 0.1) 0px 1px 4px;
}

.table tbody tr td:nth-child(1) {
	border-radius: 5px 0 0 5px;
	background-color: transparent;
	box-shadow: none;
}

.table tbody tr td:nth-last-child(1) {
	border-radius: 0 5px 5px 0;
}

.active-circle {
	height: 10px;
	width: 10px;
	border-radius: 10px;
	margin-right: 5px;
	display: inline-block;
}


@media screen and (max-width: 600px) {
	table {
		border: 0;
	}

	table thead {
		display: none;
	}

	table tr {
		border-bottom: 2px solid #ddd;
		display: block;
		margin-bottom: 10px;
	}

	table td {
		border-bottom: 1px dotted #ccc;
		display: block;
		font-size: 13px;
		text-align: right;
	}

	table td:last-child {
		border-bottom: 0;
	}

	table td:before {
		content: attr(data-label);
		float: left;
		font-weight: bold;
		text-transform: uppercase;
	}

	.table tbody tr td:nth-last-child(1) {
		max-width: 100% !important;
	}
}

/*********/

.profile-button {
	background-color: var(--negro);
	color: white;
	width: 20%;
	margin: -20px;
	margin-top: 10px;
}

.profile-button:hover {
	background-color: var(--negro);
	opacity: 0.8;
}

.button-gestion.admin-button {
	width: 50%;
	display: flex;
	justify-content: center;
	padding: 0px 5px 0px 0px;
}

.input-buscador {
	display: flex;
}

.btn {
	color: white;
	margin: 8px 0;
	border: none;
	cursor: pointer;
	width: 100%;
	opacity: 0.9;
}

.aceptbtn,
.cancelbtn,
.deletebtn {
	float: left;
	width: 50%;
}

.cancelbtn {
	background-color: #ccc !important;
	color: black !important;
}

.aceptbtn {
	background-color: var(--verde) !important;
	color: white !important;
}

.deletebtn {
	background-color: #df4a58 !important;
}

.deletebtn a {
	display: block;
	width: 100%;
	height: 100%;
	color: #fff !important;
}

.container {
	padding: 0% !important;
	text-align: center;
}

/* The Modal */
.modal {
	display: none;
	position: fixed;
	z-index: 1;
	left: 0;
	top: 0;
	width: 100%;
	height: 100%;
	overflow: auto;
	background-color: #414141cc;
	/* padding-top: 50px; */
}

.modal .modal-content {
	max-width: 40%;
	margin: 5% auto 5% auto;
	padding: 10px;
	border: 1px solid #888;
	background-color: #fefefe;
}

.open-modal-view .modal-content {
	width: 100% !important;
	max-width: 100% !important;
	margin: 5% auto 5% auto !important;
	padding: 10px !important;
	border: 1px solid #888 !important;
	background-color: #fefefe !important;
}

.open-modal-view {
	display: block;
}

.open-modal-view:before {
	content: "";
	position: fixed;
	z-index: 2;
	left: 0;
	top: 0;
	width: 100%;
	height: 100%;
	overflow: auto;
	background-color: #414141cc;
}

hr {
	border: 1px solid #f1f1f1;
	margin-bottom: 25px;
}

/* The Modal Close Button (x) */
.modal .close {
	position: absolute;
	right: 30%;
	font-size: 40px;
	font-weight: bold;
	color: #f1f1f1;
}

/* Modales tipo "Descargas": la tarjeta es .wrapper--w680 (900px fijos),
   no .modal-content (40%), asi que el right:30% de la regla base no aplica.
   Se alinea la X con el borde derecho real de la tarjeta manteniendo
   su posicion vertical original (en flujo, justo encima de la tarjeta). */
.modal > .close:has(+ .page-wrapper) {
	position: relative;
	top: 8px;
	right: auto;
	left: auto;
	display: block;
	max-width: 900px;
	margin: 0 auto;
	padding-right: 12px;
	text-align: right;
	line-height: 1;
}

.modal .close:hover,
.modal .close:focus {
	color: #f44336;
	cursor: pointer;
}

.clearfix::after {
	content: "";
	clear: both;
	display: table;
}

.new_normativa {
	background-color: var(--azul);
	color: white;
	padding: 5px;
	border-radius: 10px;
}

.alert.alert-info {
	margin: 0 !important;
}

.nameremove {
	color: #f5564a;
	font-size: smaller;
}

.nameacept {
	color: var(--verde);
	font-size: smaller;
}

.modal a {
	color: rgb(0, 174, 255);
	text-decoration: none !important;
}

.dropdown-menu.show {
	cursor: pointer;
	position: absolute;
	transform: translate3d(-6px, 19px, 0px);
	top: 10px;
	left: -40px;
	will-change: transform;
}

p.addUser,
p.addlaw {
	text-align: end;
}

p.addUser a,
p.addlaw a {
	color: var(--negro);
	text-decoration: none;
	font-weight: 900;
}

input.addUserEmail {
	width: 100% !important;
	padding: 5px;
	margin: 25px 0;
	border-radius: 10px;
	border: 1px solid #757575;
}

.container.w-100 {
	max-width: 100% !important;
}

/* Change styles for cancel button and delete button on extra small screens */
@media screen and (max-width: 300px) {

	.cancelbtn,
	.deletebtn {
		width: 100%;
	}
}


/*********************/
/*       LAW         */
/*********************/

a {
	color: var(--azul) !important;
	text-decoration: none !important;
}

body {
	font-weight: 400;
	font-size: 14px;
	overflow-x: hidden !important;
}

.p-t-130 {
	padding-top: 50px;
	padding-bottom: 50px;
}

.bg-gra-02 {
	background-color: transparent;
}

.wrapper--w680 {
	max-width: 900px;
}

.wrapper {
	margin: 0 auto;
}

.card-4 {
	background: transparent;
	-webkit-border-radius: 10px;
	-moz-border-radius: 10px;
	border-radius: 10px;
	-webkit-box-shadow: 0 8px 20px 0 rgb(0 0 0 / 15%);
	-moz-box-shadow: 0 8px 20px 0 rgba(0, 0, 0, .15);
	box-shadow: 0 8px 20px 0 rgb(0 0 0 / 15%);
}

.card-body {
	background-color: white;
	border-radius: 10px;
}

.card-body .input--style-4 {
	width: 100%;
	height: 50px;
}

.card-body .input--style-4,
.input--style-4 {
	line-height: 50px;
	background: #fafafa;
	-webkit-border-radius: 5px;
	-moz-border-radius: 5px;
	border-radius: 5px !important;
	padding: 0 20px;
	font-size: 16px;
	border-color: #7f7f7f !important;
	color: #666;
	-webkit-transition: all .4s ease;
	-o-transition: all .4s ease;
	-moz-transition: all .4s ease;
	transition: all .4s ease;
	border-width: 1px;
	border-style: solid;
}

button#submit_button_actuacion {
	border: none !important;
	color: white;
	margin: 15px 10px;
	padding: 5px;
	font-size: 12px;
	font-weight: bold;
	background-color: var(--negro);
	text-align: center;
	cursor: pointer;
	border-radius: 10px;
	width: 90px;
}

button#submit_button_actuacion a {
	color: white !important;
	text-decoration: none !important;
}

form.normativa {
	display: flex;
	align-items: center;
}

select[name="name_area"] {
	height: 30px;
}


.label {
	font-size: 16px;
	text-align: left;
	color: #555;
	text-transform: capitalize;
	display: block;
	margin-bottom: 15px;
	margin-top: 15px;
	width: 100%;
}

.card-body .col-2 {
	flex: 0 0 auto;
	width: 49%;
}

.modal .close.normativa {
	right: 25%;
}

.btn.btn--blue {
	margin-top: 60px;
	color: white !important;
	background-color: var(--negro) !important;
}

textarea.input--style-4 {
	height: 150px !important;
	line-height: initial !important;
	padding-top: 20px !important;
}

.content-pagination {
	text-align: end;
	padding-right: 15px;
}

/*
.pagination {
	display: inline-block;
}*/

.pagination .currentpage a {
	background-color: var(--azul);
	color: white !important;
}

.pagination {
	justify-content: flex-end;
	padding-right: 15px;
}

.pagination a {
	color: var(--negro);
	float: left;
	padding: 8px 16px;
	border-radius: 7px;
	text-decoration: none;
	background-color: white;
	margin: 1px;
}

li.dots {
	color: var(--negro);
	float: left;
	padding: 8px 16px;
	border-radius: 7px;
	text-decoration: none;
	background-color: white;
	margin: 1px;
}

a.active {
	background-color: var(--bs-link-color);
	color: white;
	border-radius: 5px;
}

i.fa-solid.fa-download {
	font-size: 30px;
}

.all_user {
	margin: 15px 10px;
	padding: 5px;
	color: white;
	text-decoration: none;
	font-weight: 900;
	background-color: var(--negro);
	text-align: center;
	cursor: pointer;
	border-radius: 10px;
}

.all_user a {
	color: white !important;
	text-decoration: none !important;
}

#csv_send {
	display: flex;
	justify-content: flex-end;
}

.labels {
	padding-top: 10px;
}

.table tbody tr td:nth-child(14) {
	width: 65px !important;
	max-width: 65px !important;
}

.table tbody tr td:nth-child(12),
.table tbody tr td:nth-child(13) {
	word-break: break-word;
}

.url_a {
	text-decoration: none;
}

a.url_a p {
	width: 147px;
}

/***********************/
/*       USER         */
/***********************/

.acept-item,
.decline-item {
	cursor: pointer;
	text-decoration: none !important;
	font-size: 15px;
}



img.img-user {
	padding: 5px;
	background-color: var(--azul);
	height: 100px;
	width: 100px;
	border-radius: 100px;
}

input.input--style-4:read-only,
input.form-control:read-only {
	background-color: #d4d4d4 !important;
}


.Color-0 {
	background-color: red !important;
	color: #d4d4d4;
}

.Color-50 {
	background-color: var(--naranja) !important;
	color: #d4d4d4;
}

.Color-100 {
	background-color: var(--verde) !important;
	color: #d4d4d4;
}

h4.promedio {
	text-align: end;
}

a.a-law {
	color: black !important;
	text-decoration: none !important;
}


.a-law h3 {
	color: var(--naranja);
	font-size: 18px;
	font-weight: bold;
}

.valoracion {
	background-color: var(--naranja);
	color: white;
	padding: 2px 7px;
	border-radius: 100%;
}

.valoracion_restante {
	width: 25px;
	height: 25px;
	background-color: #9f9f9f;
	color: white;
	margin: 10px;
	display: flex;
	justify-content: center;
	align-items: center;
	border-radius: 5px;
}

.restantes_normas {
	display: flex;
	justify-content: center;
	align-items: center;
}

.circle {
	height: 25px;
	width: 25px;
	border-radius: 100px;
	background-color: red;
	border: 2px solid white;
}

.c-100 {
	background-color: var(--verde) !important;
}

.c-50 {
	background-color: var(--naranja) !important;
}

/****************/
/*    FILES    */
/**************/
.archivo {
	padding-top: 15px;
	padding-bottom: 15px;
}

ul.files {
	list-style: none !important;
}

li.file {
	padding-bottom: 5px;
	display: flex;
	justify-content: space-between;
}

.delete_item a {
	color: var(--negro) !important;
}

.load_image {
	margin: 40px 0 20px 0px !important;
	text-align: center;
	background: var(--negro);
	border-radius: 5px !important;
}

.load_image svg {
	height: 40px !important;
}


input[type="file"] {
	position: relative;
}

input[type="file"]::file-selector-button {
	width: 136px;
	color: transparent;
}

/* Faked label styles and icon */
input[type="file"]::before {
	position: absolute;
	pointer-events: none;
	top: 10px;
	left: 16px;
	height: 20px;
	width: 20px;
	content: "";
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%230964B0'%3E%3Cpath d='M18 15v3H6v-3H4v3c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2v-3h-2zM7 9l1.41 1.41L11 7.83V16h2V7.83l2.59 2.58L17 9l-5-5-5 5z'/%3E%3C/svg%3E");
}

input[type="file"]::after {
	position: absolute;
	pointer-events: none;
	top: 11px;
	left: 40px;
	color: #0964b0;
	content: "Subir Archivo";
}

/* file upload button */
input[type="file"]::file-selector-button {
	border-radius: 4px;
	padding: 0 16px;
	height: 40px;
	cursor: pointer;
	background-color: white;
	border: 1px solid rgba(0, 0, 0, 0.16);
	box-shadow: 0px 1px 0px rgba(0, 0, 0, 0.05);
	margin-right: 16px;
	transition: background-color 200ms;
}

/* file upload button hover state */
input[type="file"]::file-selector-button:hover {
	background-color: #f3f4f6;
}

/* file upload button active state */
input[type="file"]::file-selector-button:active {
	background-color: #e5e7eb;
}


@media only screen and (max-width: 1024px) {

	.card-body .input--style-4,
	.input--style-4 {
		width: 100% !important;
	}

	.titulo-normativas div>h1 {
		padding: 0px 0px 0px 4%;
	}

}

@media only screen and (min-width: 1025px) {
	.home .text {
		padding: 90px 4% !important;
	}

	.main-content {
		padding-left: 0px !important;
		padding-right: 0px !important;
	}

}

/***************************/
/*    RESPONSIVE MOVIL    */
/*************************/

@media screen and (max-width: 600px) {

	#csv_send {
		flex-direction: row;
		flex-wrap: nowrap !important;
		justify-content: space-between !important;
		padding: 0 !important;
	}

	#csv_send .url_a {
		align-self: flex-start;
	}

	#csv_send #Form-search {
		width: 280px !important;
		height: auto !important;
		display: flex;
		flex-direction: row !important;
	}
}
/* ====== RESPONSIVE TOOLBAR + FILTRO (GESTIÓN DE NORMATIVAS) — añadido ====== */
.titulo-normativas,
.titulo-normativas * { box-sizing: border-box; }

.titulo-normativas {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 16px 24px;
}
.titulo-normativas > div { flex: 1 1 auto; min-width: 0; }

.titulo-normativas #Form-search {
	width: auto;
	max-width: 100%;
	min-width: 0;
	flex: 1 1 auto;
	flex-wrap: wrap;
	gap: 12px;
	justify-content: flex-end;
	padding: 0 !important;
}
.titulo-normativas #Form-search .buttons_title {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	min-width: 0;
}
.titulo-normativas .all_user {
	margin: 0;
	padding: 9px 18px;
	white-space: nowrap;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 42px;
	flex: 0 1 auto;
	width: auto !important;
}
.titulo-normativas #Form-search .buscador-normativas {
	flex: 1 1 220px;
	min-width: 0;
	max-width: 360px;
}
.titulo-normativas #Form-search .buscador-normativas #User,
.titulo-normativas #Form-search input[type="text"] {
	flex: 1 1 auto;
	min-width: 0;
	width: 100%;
	max-width: none;
}

/* Tablet y móvil: el formulario de búsqueda baja bajo el título */
@media (max-width: 991px) {
	.titulo-normativas { flex-direction: column; align-items: stretch; }
	.titulo-normativas #Form-search { width: 100%; max-width: 100%; justify-content: flex-start; }
	.titulo-normativas #Form-search .buttons_title { width: 100%; }
	.titulo-normativas .all_user { flex: 1 1 160px; }
	.titulo-normativas #Form-search .buscador-normativas { flex: 1 1 100%; max-width: none; }
}

/* Respetar márgenes laterales de la barra en móvil/tablet (igual que el contenido = 4%) */
@media (max-width: 1024px) {
	.titulo-normativas {
		padding-left: 4%;
		padding-right: 4%;
	}
}

/* Campo a ancho completo dentro del formulario de normativa (Motivo) */
.card-body .col-2.col-full {
	width: 100%;
}

/* Etiqueta (pill) de Situación: Vigente = verde, Derogada = rojo */
.situacion-badge {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 5px 12px;
	border-radius: 999px;
	font-weight: 700;
	font-size: 13px;
	line-height: 1;
	white-space: nowrap;
}
.situacion-badge.situacion-vigente {
	color: #2e7d32;
	background: #e7f6ea;
	border: 1px solid #b6e0bd;
}
.situacion-badge.situacion-derogada {
	color: #c62828;
	background: #fdeaea;
	border: 1px solid #f3c0c0;
}

/* ===== Mejoras legibilidad tabla de normativas ===== */
.table tbody tr td {
	vertical-align: top;
}
/* Hover azul (#f3f8ff) eliminado a petición: las tablas no se resaltan al pasar el ratón. */
/* La 1ª celda (ESTADO) es parte de la fila: mismo fondo y sombra que el resto
   (antes era transparente y sin sombra, por eso se veía "suelta" en el hover) */
.table.views tbody tr td:nth-child(1) {
	background: #fff;
	box-shadow: rgba(0, 0, 0, 0.1) 0px 1px 4px;
}
.table.views tbody tr:hover td:nth-child(1) {
	background: #f3f8ff !important;
}
/* Anchos por columna (robusto entre vistas, via data-label) */
/* Padding de celda más ajustado + fuente algo menor (gana ancho, entra todo) */
.table.views {
	font-size: 13px;
}
.table.views thead tr th {
	font-size: 12px;
}
.table.views thead tr th,
.table.views tbody tr td {
	padding-left: 6px;
	padding-right: 6px;
}
/* ===== Anchos por columna con table-layout: fixed =====
   La tabla ocupa EXACTAMENTE el 100% del contenedor (nunca hay scroll
   horizontal); el ancho se reparte por % y el contenido se ajusta dentro. */
.table.views {
	table-layout: fixed;
	width: 100%;
}
.table.views th[data-label="ESTADO"],                     .table.views td[data-label="ESTADO"]                     { width: 6%; }
.table.views th[data-label="CAMPO DE ACTUACIÓN"],         .table.views td[data-label="CAMPO DE ACTUACIÓN"]         { width: 7%; }
.table.views th[data-label="NORMATIVAS"],                 .table.views td[data-label="NORMATIVAS"]                 { width: 9%; }
.table.views th[data-label="LEGISLACIÓN"],                .table.views td[data-label="LEGISLACIÓN"]                { width: 9%; }
.table.views th[data-label="FECHA PUBLICACIÓN"],          .table.views td[data-label="FECHA PUBLICACIÓN"]          { width: 6%; }
.table.views th[data-label="FECHA DE ENTRADA EN VIGOR"],  .table.views td[data-label="FECHA DE ENTRADA EN VIGOR"]  { width: 6%; }
.table.views th[data-label="SITUACIÓN"],                  .table.views td[data-label="SITUACIÓN"]                  { width: 6%; }
.table.views th[data-label="ÚLTIMA ACTUALIZACIÓN"],       .table.views td[data-label="ÚLTIMA ACTUALIZACIÓN"]       { width: 6%; }
.table.views th[data-label="SECTORIAL"],                  .table.views td[data-label="SECTORIAL"]                  { width: 5%; }
.table.views th[data-label="MOTIVO"],                     .table.views td[data-label="MOTIVO"]                     { width: 11%; text-align: left; }
.table.views th[data-label="SECTOR HOTELERO"],            .table.views td[data-label="SECTOR HOTELERO"]            { width: 5%; }
.table.views th[data-label="ENLACE"],                     .table.views td[data-label="ENLACE"]                     { width: 7%; }
.table.views th[data-label="DESCARGAS RESUMEN"],          .table.views td[data-label="DESCARGAS RESUMEN"]          { width: 4%; }
.table.views th[data-label="PORCENTAJE DE CUMPLIMIENTO"], .table.views td[data-label="PORCENTAJE DE CUMPLIMIENTO"] { width: 13%; }

/* Contenido ajustado dentro de su columna */
.table.views td[data-label="MOTIVO"] p { text-align: left; }
.table.views td[data-label="ENLACE"] a {
	display: inline-block;
	max-width: 100%;
	overflow-wrap: anywhere;
	word-break: normal;
	white-space: normal;
}
/* El desplegable "-- Selecciona Porcentaje" se ve entero dentro de su columna */
.table.views td[data-label="PORCENTAJE DE CUMPLIMIENTO"] select,
.table.views td[data-label="PORCENTAJE DE CUMPLIMIENTO"] .form-control {
	width: 100%;
	min-width: 0;
	max-width: 100%;
	font-size: 12px;
	padding-left: 6px;
	padding-right: 6px;
}
/* Las fechas no se parten */
.table.views td[data-label="FECHA PUBLICACIÓN"],
.table.views td[data-label="FECHA DE ENTRADA EN VIGOR"],
.table.views td[data-label="ÚLTIMA ACTUALIZACIÓN"] {
	white-space: nowrap;
}

/* ===== Barra buscador de la vista de usuario (#csv_send) ===== */
#csv_send {
	align-items: center;
	gap: 12px;
}
#csv_send #Form-search {
	flex: 0 1 360px;
	min-width: 0;
	max-width: 100%;
	flex-direction: row;
	align-items: center;
	flex-wrap: nowrap;
	gap: 6px;
	padding: 0 !important;
}
#csv_send #Form-search #User {
	flex: 1 1 auto;
	width: auto;
	min-width: 0;
	max-width: none;
}
#csv_send #Form-search #submit_button {
	width: auto !important;
	height: auto !important;
	flex: 0 0 auto;
}
@media (max-width: 575px) {
	#csv_send #Form-search { flex: 1 1 100%; }
}

/* ===== Cabecera vista usuario (todas/categoría): tarjeta resumen ===== */
.text .d-flex.flex-sm-nowrap > .col-lg-3 {
	flex: 0 0 auto;
	width: auto;
	max-width: 300px;
}
.text .d-flex.flex-sm-nowrap > .col-lg-3 .cards {
	min-width: 230px;
	margin: 0 auto;
}
@media (max-width: 991px) {
	.text .d-flex.flex-sm-nowrap {
		flex-wrap: wrap !important;
	}
}
.restantes_normas {
	flex-wrap: wrap;
	gap: 4px 8px;
}

/* La tabla de normativas hace scroll horizontal si no cabe (en vez de cortarse) */
.main-content > .container.w-100 {
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
}

/* ===== Móvil/tablet: la tabla de normativas se muestra como FICHAS =====
   En ordenador (≥992px) se mantiene la tabla, que se adapta al ancho
   (Motivo flexible y Enlace recortado con "…"). */
@media (max-width: 991px) {
	table.table-responsive { border: 0; border-spacing: 0; }
	table.table-responsive thead { display: none; }

	table.table-responsive tbody tr {
		display: block;
		background: #fff;
		border-radius: 10px;
		box-shadow: 0 1px 8px rgba(0, 0, 0, .10);
		margin: 0 0 18px 0;
		padding: 4px 16px;
	}
	table.table-responsive tbody tr td {
		display: flex;
		justify-content: space-between;
		align-items: flex-start;
		gap: 18px;
		text-align: right;
		padding: 11px 0;
		border: 0;
		border-bottom: 1px solid #eef0f2;
		background: transparent !important;
		box-shadow: none !important;
		width: auto !important;
		min-width: 0 !important;
		max-width: none !important;
		white-space: normal !important;
		border-radius: 0 !important;
	}
	table.table-responsive tbody tr td:last-child { border-bottom: 0; }
	/* Anula el ancho fijo del modo tabla en la última columna (Enlace) */
	table.table-responsive tbody tr td:nth-last-child(1) {
		width: auto !important;
		min-width: 0 !important;
		max-width: none !important;
	}
	table.table-responsive tbody tr td::before {
		content: attr(data-label);
		flex: 0 0 42%;
		text-align: left;
		font-weight: 700;
		font-size: 12px;
		line-height: 1.3;
		text-transform: uppercase;
		color: var(--negro);
	}
	table.table-responsive tbody tr td p { margin: 0 !important; }
	/* Motivo y Enlace: a ancho completo, etiqueta arriba y contenido debajo */
	table.table-responsive tbody tr td[data-label="MOTIVO"],
	table.table-responsive tbody tr td[data-label="ENLACE"] {
		flex-direction: column;
		align-items: stretch;
		text-align: left;
		gap: 4px;
	}
	table.table-responsive tbody tr td[data-label="MOTIVO"] p,
	table.table-responsive tbody tr td[data-label="ENLACE"] p {
		text-align: left;
		width: 100%;
	}
	/* La URL del enlace usa todo el ancho y solo parte si es imprescindible
	   (anula el recorte con "…" del modo tabla) */
	table.table-responsive tbody tr td[data-label="ENLACE"] a {
		display: block;
		overflow-wrap: anywhere;
		word-break: normal;
		white-space: normal;
		overflow: visible;
		text-overflow: clip;
		max-width: none;
	}
}

/* Celda combinada de ESTADO: punto de cumplimiento + etiqueta "Nueva Normativa" */
.estado-cell {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 6px;
}
.estado-cell .circle { margin: 0; }


/* === Movido desde el <style> incrustado de view/normativas/index.php para que
       las paginas de /view/user/ usen el mismo diseno de tabla de descargas. === */
/* ==========================================================================
   TABLA DE DESCARGAS (modal) · clase .tabla-descargas  (INDEPENDIENTE)
   Mismo estilo de pastillas, con reglas propias.
   ========================================================================== */
.tabla-descargas {
    border-collapse: separate !important;
    border-spacing: 0 8px !important;
    width: 100%;
    margin: 0 !important;
    text-align: left !important;
    box-shadow: none !important;
}
.tabla-descargas > thead > tr > th {
    background: #52616B !important; color: #ffffff !important; font-family: inherit !important;
    font-weight: 600 !important; text-transform: uppercase; letter-spacing: .4px;
    font-size: 11px !important; text-align: left !important; padding: 13px 10px !important;
    border: none !important; vertical-align: middle !important;
}
.tabla-descargas > thead > tr > th:first-child { border-radius: 8px 0 0 8px !important; }
.tabla-descargas > thead > tr > th:last-child  { border-radius: 0 8px 8px 0 !important; }
.tabla-descargas > tbody > tr > td {
    background: #ffffff !important; box-shadow: none !important; border: none !important;
    border-top: 1px solid #e2e6ea !important; border-bottom: 1px solid #e2e6ea !important;
    border-radius: 0 !important; text-align: left !important; vertical-align: middle !important;
    padding: 13px 10px !important; font-size: 12.5px !important; color: #2b2f34 !important;
    font-family: inherit !important; word-break: break-word;
}
.tabla-descargas > tbody > tr > td:first-child {
    border-left: 1px solid #e2e6ea !important; border-radius: 8px 0 0 8px !important;
}
.tabla-descargas > tbody > tr > td:last-child {
    border-right: 1px solid #e2e6ea !important; border-radius: 0 8px 8px 0 !important;
}
.tabla-descargas > tbody > tr:nth-child(even) > td { background: #eceff3 !important; }
.tabla-descargas > tbody > tr:hover > td,
.tabla-descargas > tbody > tr:hover > td:first-child,
.tabla-descargas > tbody > tr:hover > td:last-child { background: #ffffff !important; }
.tabla-descargas > tbody > tr:nth-child(even):hover > td,
.tabla-descargas > tbody > tr:nth-child(even):hover > td:first-child,
.tabla-descargas > tbody > tr:nth-child(even):hover > td:last-child { background: #eceff3 !important; }
.tabla-descargas > thead > tr > th:nth-last-child(1),
.tabla-descargas > tbody > tr > td:nth-last-child(1) {
    width: 120px !important; min-width: 120px !important; max-width: 120px !important;
    text-align: center !important; white-space: nowrap !important;
}
.tabla-descargas > tbody > tr > td a[download] i.fa-download { color: #52616B; font-size: 18px; transition: color .15s ease; }
.tabla-descargas > tbody > tr > td a[download]:hover i.fa-download { color: #E48300; }

/* Tabla de descargas en móvil: cada archivo como tarjeta (sin zebra ni hover) */
@media screen and (max-width: 600px) {
    .tabla-descargas,
    .tabla-descargas > tbody { display: block !important; width: 100% !important; border-spacing: 0 !important; background: transparent !important; }
    .tabla-descargas > thead { display: none !important; }
    .tabla-descargas > tbody > tr {
        display: flex !important; align-items: center !important; gap: 12px !important; flex-wrap: nowrap !important;
        background: #ffffff !important; border: 1px solid #e2e6ea !important; border-radius: 12px !important;
        box-shadow: 0 2px 8px rgba(30, 34, 40, .06) !important; padding: 12px 14px !important; margin-bottom: 10px !important;
    }
    .tabla-descargas > tbody > tr:nth-child(even) { background: #eceff3 !important; }
    .tabla-descargas > tbody > tr > td,
    .tabla-descargas > tbody > tr:nth-child(even) > td {
        display: block !important; background: transparent !important; border: none !important; border-radius: 0 !important;
        box-shadow: none !important; padding: 0 !important; margin: 0 !important; text-align: left !important;
        width: auto !important; min-width: 0 !important; max-width: none !important; font-weight: 400 !important;
    }
    .tabla-descargas > tbody > tr > td::before { content: none !important; }
    .tabla-descargas > tbody > tr:hover > td,
    .tabla-descargas > tbody > tr:nth-child(even):hover > td { background: transparent !important; }
    .tabla-descargas > tbody > tr > td:nth-child(1) { flex: 0 0 auto; }
    .tabla-descargas > tbody > tr > td:nth-child(1) input { width: 18px; height: 18px; margin: 0; }
    .tabla-descargas > tbody > tr > td:nth-child(2) { flex: 1 1 auto; font-size: 13px !important; line-height: 1.4; word-break: break-word; color: #2b2f34 !important; }
    .tabla-descargas > tbody > tr > td:nth-last-child(1) { flex: 0 0 auto; width: auto !important; }
    .tabla-descargas > tbody > tr > td:nth-last-child(1) a[download] {
        display: inline-flex; align-items: center; justify-content: center;
        width: 40px; height: 40px; border-radius: 10px; background: #f1f3f5;
    }
    .tabla-descargas > tbody > tr > td:nth-last-child(1) a[download] i.fa-download { font-size: 18px !important; color: #52616B; }
}

/* ==========================================================================
   Icono de la columna DESCARGAS en las paginas de /view/user/.
   Esas tablas no llevan la clase .tabla-navy del rediseno de admin, asi que
   el icono caia en i.fa-solid.fa-download { font-size: 30px } y se veia azul
   y grande. Se replican aqui los valores que admin aplica en su <style>
   incrustado, para que el icono sea el mismo en las dos vistas.
   ========================================================================== */
td[data-label^="DESCARGAS"] .buton_click {
	display: inline-flex !important;
	align-items: center;
	justify-content: center;
	width: 38px;
	height: 38px;
}

td[data-label^="DESCARGAS"] .buton_click i.fa-download {
	font-size: 17px !important;
	color: #52616B !important;
	transition: color .15s ease;
}

td[data-label^="DESCARGAS"] .buton_click:hover i.fa-download {
	color: #E48300 !important;
}
