* {
	margin: 0;
	padding: 0;
	box-sizing: border-box;
}

.calen td {
	font-size: 90%;
	padding: 1px 10px !important;
}

.calen th {
	font-size: 90%;
	padding: 1px 10px !important;
	background-color: #ddd;
}

.calenest td {
	font-size: 90%;
	padding: 1px 8px !important;
}

.calenest th {
	font-size: 90%;
	padding: 1px 8px !important;
	background-color: #ddd;
}


.calen_es td {
	font-size: 90%;
	padding: 1px 5px !important;
}

.calen_es th {
	font-size: 90%;
	padding: 1px 5px !important;
	background-color: #ddd;
}

.calen-sm td {
	font-size: 80%;
	padding: 1px 5px !important;
}

.calen-sm th {
	font-size: 80%;
	padding: 1px 5px !important;
	background-color: #ddd;
}


.table-auto-width {
	width: auto !important;
	table-layout: auto;
}

.incelda {
	width: 40px;
}


.inceldax2 {
	width: 60px;
}

.tneg {
	font-weight: bold;
}


/* --- BARRA DE NAVEGACION MODERNA --- */
.navbar {
	background: #1a252f !important;
	/* Un azul marino más profundo y elegante */
	box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
	padding: 0.6rem 1rem;
}

.navbar-brand {
	font-weight: 700;
	letter-spacing: 0.5px;
	display: flex;
	align-items: center;
}

.navbar-nav .nav-link {
	font-weight: 500;
	color: rgba(255, 255, 255, 0.85) !important;
	padding: 0.5rem 1rem !important;
	transition: all 0.2s;
	border-radius: 6px;
}

.navbar-nav .nav-link:hover {
	color: #fff !important;
	background: rgba(255, 255, 255, 0.1);
}

.navbar-nav .nav-link.active {
	background: #f39c12 !important;
	/* Usamos el color de acento para el activo */
	color: #fff !important;
	font-weight: 600;
}

.dropdown-menu {
	border: none;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
	border-radius: 10px;
	padding: 0.5rem;
	background: #ffffff;
}

.dropdown-item {
	border-radius: 6px;
	padding: 0.6rem 1rem;
	font-weight: 500;
	color: #34495e;
}

.dropdown-item:hover {
	background-color: #f8f9fa;
	color: #1a252f;
}

.dropdown-item-header {
	font-weight: 700;
	color: #1a252f;
	padding: 0.5rem 1rem;
	display: block;
	font-size: 0.95rem;
	/* Ajustado para que sea ligeramente más pequeño o igual a items principales */
}

.dropdown-item-child {
	padding-left: 2.2rem !important;
	font-size: 0.85rem;
	color: #7f8c8d;
}

.dropdown-item-child:hover {
	color: #1a252f;
}

.barraperfil {
	background-color: #f1f3f5 !important;
	border-bottom: 1px solid #dee2e6;
	padding: 0.4rem 1.5rem;
	font-size: 0.85rem;
	color: #495057;
}

#fecha-hora {
	font-weight: 500;
	color: #6c757d;
}


.fp {
	font-size: 90%;
}

.fpp {
	font-size: 80%;
}

.wa {
	width: auto;
}

.tbpad td,
th {
	padding: 3px 10px !important;
}

.img90 {
	max-width: 90%;
	max-height: 300px;
}

.no100 {
	width: auto;
}

.a50 {
	width: 50px;
}

.a80 {
	width: 80px;
}

.a120 {
	width: 120px;
}

.a180 {
	width: 180px;
}

.a240 {
	width: 240px;
}


.a500 {
	width: 500px;
}

.peq {
	font-size: 80%;
}




/* --- PESTAÑAS DE OBRA (NAV-TABS) --- */
.nav-tabs {
	border-bottom: 2px solid #0097ce !important;
	margin-top: 15px !important;
	margin-bottom: 5px !important;
	border-left: none;
	border-right: none;
	border-top: none;
}

.nav-tabs .nav-link {
	border: 1px solid #dee2e6 !important;
	border-bottom: none !important;
	background: #f8f9fa;
	color: #495057 !important;
	font-weight: 500;
	padding: 8px 16px !important;
	margin-right: 4px;
	border-radius: 6px 6px 0 0;
	transition: all 0.2s;
}

.nav-tabs .nav-link:hover {
	background: #e9ecef;
	border-color: #dee2e6;
}

.nav-tabs .nav-link.active {
	background: #0097ce !important;
	/* Mismo azul que el borde inferior */
	border: 2px solid #0097ce !important;
	color: #fff !important;
	/* Texto blanco para el contraste */
	font-weight: 700;
	box-shadow: none !important;
	z-index: 2;
}

/* Soporte para pestañas con scroll horizontal */
.scrollable-tabs {
	flex-wrap: nowrap !important;
	overflow-x: auto !important;
	overflow-y: hidden !important;
	-webkit-overflow-scrolling: touch;
	scrollbar-width: thin;
}

.scrollable-tabs::-webkit-scrollbar {
	display: none;
	/* Chrome/Safari */
}

.mi-border-start {
	border-left: 1px rgb(124, 123, 123) solid;
}


.nodecor {
	text-decoration: none;
	color: white;
}

.nodecornegro {
	text-decoration: none;
	color: black;
}


.oscuro {
	background-color: black;
}

.oscuro td {
	color: white !important;
	padding-top: 3px !important;
	padding-bottom: 3px !important;
}

.trojo {
	color: red !important;
}

.lineh {
	line-height: 10px;
}


.mi-border-start {
	border-left: 1px rgb(124, 123, 123) solid;
}

.mi-border-end {
	border-right: 1px rgb(124, 123, 123) solid;
}

.mi-border-end-2 {
	border-right: 2px rgb(0, 0, 0) solid;
}

.toggle-btn {
	width: 20px;
	padding: 0px;
	border-width: 1px;
}


.fondonar {
	background-color: #fff3cd !important;
}

.exceso {
	background-color: #fce4e4 !important;
	/* Rosado suave para excesos */
}

.fondover {
	background-color: #b7f1b7d7 !important;
}

.fondoazu {
	background-color: #a5ccf8 !important;
}



.aviso-guardado {
	position: fixed;
	bottom: 15px;
	right: 15px;
	z-index: 9999;
	border-radius: 8px;
}

input.modificado {
	background-color: #fff3cd !important;
	/* amarillo suave */
	border-color: #ffc107 !important;
}

input.bloqueado {
	border: 2px solid blue !important;
	background-color: #fff3cd !important;
}




.oscuro {
	background-color: black;
}

.oscuro td {
	color: white !important;
	padding-top: 6px !important;
	padding-bottom: 6px !important;
}

.semioscuro {
	background-color: rgb(100, 100, 100);
}

.semioscuro td {
	color: white !important;
	padding-top: 3px !important;
	padding-bottom: 3px !important;
}

.pocooscuro {
	background-color: rgb(150, 150, 150);
}

.pocooscuro td {
	color: white !important;
	padding-top: 3px !important;
	padding-bottom: 3px !important;
}



.mi-border-start {
	border-left: 1px rgb(124, 123, 123) solid;
}

.mi-border-start-blanco {
	border-left: 1px white solid;
}


.mi-border-end {
	border-right: 1px rgb(124, 123, 123) solid;
}

.mi-border-end-blanco {
	border-right: 1px white solid;
}

.mi-border-abajo td {
	border-bottom: 1px rgb(124, 123, 123) solid;
}

.midivcentrado {
	margin: 0 auto;
}

.sindeco {
	text-decoration: none;
	color: black;
	cursor: pointer
}




.fondo-verde {
	background-color: #e7fbe7 !important;
}

.fondo-amarillo {
	background-color: #faf1c0 !important;
}

.fondo-rosado {
	background-color: #fde7e7 !important;
}

.fondo-rojo {
	background-color: #f5c6cb !important;
}




.tooltip-error {
	background-color: #f8d7da;
	color: #721c24;
	padding: 5px 10px;
	border-radius: 5px;
	box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
	z-index: 9999;
	font-size: 0.9em;
	white-space: nowrap;
}



.tachado-rojo {
	color: red !important;
	text-decoration: line-through;
}




/* Al editar (foco visual opcional) */
.editable:focus {
	outline: 2px solid rgba(13, 110, 253, .35);
	/* azul suave */
	background-color: #eef5ff;
	/* muy leve */
}

/* Celda que ha CAMBIADO respecto al valor original (antes de guardar) */
.editable.modificado {
	background-color: #fff3cd !important;
	/* amarillo suave */
	box-shadow: inset 0 0 0 2px rgba(255, 193, 7, .55);
	transition: background-color .2s ease, box-shadow .2s ease;
}


.celda-cambio {
	background-color: #f0f9ff;
	/* azul muy suave para indicar editable */
	cursor: text;
}

.celda-cambio.modificado {
	background-color: #fff3cd !important;
	/* amarillo al modificar */
}






/* ==== CHECKBOX DE VISIBILIDAD DE PLANOS ==== */
.checkbox-visi {
	width: 1.1em;
	height: 1.1em;
	cursor: pointer;
	accent-color: #28a745;
	/* verde Bootstrap para checked */
	vertical-align: middle;
	margin-right: 3px;
	margin-left: 1px;
}

.checkbox-visi:focus {
	box-shadow: none;
	outline: none;
}

/* Atenuar miniatura si está desmarcada */
.plano-oculto img {
	filter: grayscale(100%) brightness(0.85);
	opacity: 0.6;
}




/* ==== Galería de Planos ==== */

/* Imagen del plano */
.img-plano {
	max-width: 100%;
	height: auto;
	display: block;
}

/* Contenedor que asegura que los pies queden alineados */
.plano-wrapper {
	width: 100%;
	min-height: 260px;
	/* ajusta según tus proporciones */
	display: flex;
	justify-content: flex-start;
	align-items: flex-end;
	/* empuja las imágenes hacia abajo */
}

/* Pie de plano */
.plano-footer {
	display: flex;
	align-items: center;
	justify-content: flex-start;
	gap: 6px;
	min-height: 36px;
	width: 100%;
	font-size: 0.95rem;
}


tr.oc-header>* {
	--bs-table-bg-type: white;
	background-color: white !important;
}


.oc-thead th {
	background-color: #000 !important;
	color: #fff !important;
	border-top: 1px solid #000;
	border-bottom: 1px solid #000;
	padding-top: 5px !important;
	padding-bottom: 5px !important;
}

.oc-header-cell {
	border-top: 1px solid #000;
	background-color: #fff;
	/* aunque el striped la toque, el borde se verá */
}

.tabla-oc {
	border-right: 1px solid #000;
	border-left: 1px solid #000;
	border-collapse: separate;
	/* clave */
	border-spacing: 0;
}


.tabla-oc td {
	vertical-align: middle;
}

/* --- ESTILOS CRONOGRAMA (crono.php) --- */
.col-crono {
	min-width: 400px;
}

.timeline-container {
	position: relative;
	width: 100%;
	height: 18px;
	background-color: #f0f0f0;
	border-radius: 3px;
	overflow: hidden;
}

.timeline-bar {
	position: absolute;
	height: 100%;
	background-color: #0097ce;
	border-radius: 2px;
	min-width: 2px;
}

.timeline-bar-cap {
	background-color: #1a252f;
}

.text-fecha {
	font-size: 0.85rem;
	color: #444;
}

/* Cabecera tabla cronograma */
.calenest thead th {
	background-color: #ddd !important;
	color: #000 !important;
	border-bottom: 2px solid #bbb;
}

.calenest thead th.col-crono {
	padding: 0 !important;
	vertical-align: top;
}

.today-marker {
	position: absolute;
	top: 0;
	bottom: 0;
	width: 2px;
	background-color: rgba(255, 69, 0, 0.7);
	/* Naranja fuerte semi-transparente */
	box-shadow: 0 0 5px rgba(255, 69, 0, 0.5);
	z-index: 100;
	pointer-events: none;
}

/* Reducción específica para la tabla del cronograma */
.tabla-crono {
	font-size: 0.85rem;
}

.tabla-crono td {
	padding: 0.3rem 0.5rem !important;
}

.tabla-crono .text-fecha {
	font-size: 0.75rem;
}

.tabla-crono .small {
	font-size: 0.75rem;
}

.timeline-grid-line {
	position: absolute;
	top: 0;
	bottom: 0;
	border-left: 1px solid rgba(0, 0, 0, 0.05);
	pointer-events: none;
	z-index: 1;
}

.timeline-container {
	position: relative;
	z-index: 2;
	/* Para que las barras queden sobre las líneas de grid si se solapan */
}

/* --- TOASTS GLOBALES --- */
#toast-container {
	position: fixed;
	top: 70px;
	left: 50%;
	transform: translateX(-50%);
	z-index: 10000;
	pointer-events: none;
	display: flex;
	flex-direction: column;
	align-items: center;
}

.toast-custom {
	pointer-events: auto;

	background-color: rgba(197, 252, 206, 0.9) !important;
	backdrop-filter: none !important;
	-webkit-backdrop-filter: none !important;
	border: 1px solid rgba(46, 125, 50, 0.3) !important;
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08) !important;
	border-radius: 6px !important;
	min-width: 550px;
	max-width: 95vw;
	transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
	white-space: nowrap;
	overflow: hidden;
}

.toast-custom .toast-body {
	color: #2e7d32 !important;
	font-weight: 500;
}

.toast-custom.show {
	animation: fadeInDownToast 0.4s ease forwards;
}

@keyframes fadeInDownToast {
	from {
		transform: translateY(-20px);
		opacity: 0;
	}

	to {
		transform: translateY(0);
		opacity: 1;
	}
}