
input[type="checkbox"]:checked, 
input[type="checkbox"]:not(:checked) 
{
	position: absolute;
	left: -9999px;
}

input[type="checkbox"]:checked + label, 
input[type="checkbox"]:not(:checked) + label{
	display: inline-block;
	position: relative;
	cursor: pointer;
}
input[type="checkbox"]:checked + label:before, 
input[type="checkbox"]:not(:checked) + label:before{
	content: "";
	position: absolute;
	left: 0px;
	top: 1px;
	@include transform(translateY(-50%));
	width: 1.5rem;
	height: 1.5rem;
	border-radius: 0.2rem;
	border: 0.1rem solid #c5c7cd;
	background-color: #ffffff;
}
input[type="checkbox"]:checked + label:before{
	border: 0.1rem solid #2eba69;
}

input[type="checkbox"]:checked + label:before, 
input[type="checkbox"]:not(:checked) + label:before {
	border-radius: 2px;
}

input[type="checkbox"]:checked + label:before{
	background-color: #2eba69;
}

input[type="checkbox"]:checked + label:after, 
input[type="checkbox"]:not(:checked) + label:after{
	content: "";
	position: absolute;
	@include transition(all 0.2s ease);
}

input[type="checkbox"]:checked + label:after, 
input[type="checkbox"]:not(:checked) + label:after {
	left: 3px;
	top: calc(50% + 4px);
	width: 10px;
	height: 5px;
	border-radius: 1px;
	border-left: .2rem solid #fff;
	border-bottom: .2rem solid #fff;
	@include transform( translateY(-135%) rotate(-45deg));
}

input[type="radio"]:checked + label:after{
	left: 4px;
	top: 4px;
	width: 10px;
	height: 10px;
	border-radius: 100%;
	background-color: #fff;
}
input[type="checkbox"]:not(:checked) + label:after {
	opacity: 0;
}

input[type="checkbox"]:checked + label:after {
	opacity: 1;
}

%bef-ar{
	&:before, &:after {
		content: '';
		position: absolute;
		z-index: 0;
		border: 7px solid transparent;
		top: 50%;
		@include transform(translateY(-50%));
	}				
	&:before{
		right: 3px;
		border-left-color: #00b2d2;
	}
	&:after {
		right: 6px;
		border-left-color: #FFF;
	}			
	&:hover{
		&:before {
			border-left-color: #fff;
		}
		&:after {
			border-left-color: #54818f;
		}
	}
}
.center{
	background-color: #f3f7f9;
	min-width: 63%;
	width: calc(100% - 310px - 375px);
	position: relative;
	z-index: 3;
	transition: .5s ease;
	@media (max-width: 1616px){
		max-width: 100%;
		min-width: auto;
		width: calc(100% - 260px - 320px);
	}
	@media  (max-width: 1480px){
		width: calc(100% - 260px - 230px);
	}
	@media (max-width: 1240px){
		width: calc(100% - 205px - 230px);
	}
	@include br1{
		width: 100%;
	}
	@include br2{
		width: 100%;
	}
	&.hide{
		width: calc(100% - 85px - 375px);
		@media (max-width: 1680px){
			width: calc(100% - 90px - 320px);
		}
		@media (max-width: 1480px){
			width: calc(100% - 65px - 230px);
		}
		@include br1{
			width: 100%;
		}
	}
	&.big{
		width: calc(100% - 315px);
		padding-right: 50px;
		@media (max-width: 1616px){
			width: calc(100% - 260px);
			padding-right: 60px;
		}
		@media (max-width: 1240px){
			width: calc(100% - 205px);
		}
		@include br1{
			width: 100%;
			padding-right: 0;
		}
		&.hide{
			width: calc(100% - 90px);
			@media (max-width: 1480px){
				width: calc(100% - 65px);
			}
			@include br1{
				width: 100%;
			}
		}
	}
	.headline{
		color: #000000;
		font: 1.5rem $HB;
		text-transform: uppercase;
		margin: 1.5rem .3rem 3rem;
	}
	&-header{
		background: #fff;
		padding: 1.6rem 2.5rem;
		@include br1{
			padding: 1.6rem 1rem;
		}
		.head-menu{
			width: 60%;	
			@include justify-content(flex-start);
			@media screen and (max-width: 1480px){
				width: 35%;
			}
			@include br3{
				width: 100%;
			}
		}
		.head{
			margin-right: 2.5rem;
			font: 1.5rem $HB;
			text-transform: uppercase;
			position: relative;
			padding: 1rem 0 1rem  4.5rem;
			&:last-child{
				margin-right: 0;
			}
			a{
				color: #00b2d2;
			}
			&.active, &:hover{
				a{
					color: #000;
				}
				.appnum{
					color: #fff;
					background-color: #fd0000;
				}
			}
			&:hover{
				.appnum{
					color: #fd0000;
					background-color: #fff;
				}
			}
			@include br1{
				padding-left: 4.2rem;
			}
			@include br3{
				margin: 1rem auto;
				&:last-child{
					margin: 1rem auto;
				}
			}
			&:before{
				content: '';
				position: absolute;
				width: 3.7rem;
				height: 2.8rem;
				left: 0;
				top: 50%;
				transform: translateY(-50%);
				
			}
			@each $name in 'daily' 'parties' 'approvals' 'reports-menu'{
				&.#{$name} {
					&:before{
						background: url($img_dir + '#{$name}.svg') no-repeat center;
						background-size: contain;
					}
				}
			}
			@each $name in 'daily' 'parties' 'approvals' 'reports-menu'{
				&.#{$name} {
					&:hover, &.active{
						&:before{
							background: url($img_dir + '#{$name}-active.svg') no-repeat center;
							background-size: contain;
						}
					}
				}
			}
			.appnum{
				color: #ffffff;
				font: 1.3rem $HB;
				width: 2.1rem;
				height: 2.1rem;
				background-color: #fd0000;
				border: 1px solid #fd0000;
				border-radius: 50%;
				@extend %center-flex;
				margin-left: 5px;
				&:hover{
					color: #fd0000;
					background-color: #fff;
				}
			}
		}
		.buttons{
			width: 40%;	
			@media screen and (max-width: 1480px){
				width: 65%;
			}
			@include br3{
				width: 100%;
				margin-top: 2rem;
			}
			.search, .filter{
				height: 3.9rem;
				border-radius: 0.5rem;
				border: 0.1rem solid #d1d3d8;
				background-color: #ffffff;
				@extend %center-flex;
			}		
			form{
				max-width: calc(100% - 150px - 1rem);
				width: 430px;
				@media screen and (max-width: 440px){
					width: 100%;
					max-width: 100%;
					margin-bottom: 1rem;
				}
				.search{
					width: 100%;
					padding: .8rem 1.3rem;
					input{
						height: 100%;
						&[type="submit"]{
							width: 2.3rem;
							height: 2.3rem;
							background: url($img_dir + 'search.svg') no-repeat center;
							background-size: 100%;
							border: none;
						}
						&[type="search"]{
							width: calc(100% - 2.3rem);
							border: none;
							outline: none;
							-webkit-appearance: none;
							font-size: 1.4rem;
							&::-ms-clear {
								display: none;
								width : 0; 
								height: 0;
							}
							&::-ms-reveal {
								display: none;
								width : 0; 
								height: 0;
							}
							&::-webkit-search-cancel-button {
								display: none;
							}
						}
					}
				}
			}
			.filter{
				color: #000000;
				font: 1.2rem $HB;
				text-transform: uppercase;
				width: 150px;
				@media screen and (max-width: 440px){
					margin: 0 auto;
				}
				span{
					position: relative;
					padding-left: 3.5rem;
					&:before{
						content: '';
						position: absolute;
						width: 2.7rem;
						height: 2rem;
						left: 0;
						top: 50%;
						transform: translateY(-50%);
						background: url($img_dir + 'filter.svg') no-repeat center;
						background-size: 100% auto;
					}
				}
				&:hover{
					background-color: #00b2d2;
					text-decoration: none;
					border-color:  #00b2d2;

					span{
						color: #fff;
						&:before{
							background: url($img_dir + 'filter-white.svg') no-repeat center;
							background-size: 100% auto;
						}
					}
				}
			}
		}
	}
	&-main{
		font-size: 1.4rem;
		padding: 1.5rem .8rem;
		@media screen and (max-width: 1480px){
			padding: 1rem;
		}
		.table-wrap{
			display: block;
			width: 100%;
			overflow-x: auto;
			table{
				width: 100%;
				border-spacing: 0;	
				color: #000000;
				background-color: #fff;
				min-width: 944px;
				@include br3{
					min-width: 850px;
				}
				tr{
					&:nth-child(2n){
						background-color: #f7fafb;
					}
					th{
						vertical-align: middle;
						&:nth-child(1){
							text-align: center;
							position: relative;
						}
					}
					td{
						vertical-align: middle;	
						&:nth-child(3){
							font-size: 1.3rem;
							color: #fff;
							padding: .8rem 1.5rem;
							width: 130px;
							text-align: center;
						}
						&:nth-child(1){
							text-align: center;
							position: relative;
						}
					}
				}
				thead{
					text-align: left;
					color: #fff;
					tr:first-child{
						background-color: #00b2d2;
					}	
				}
				td{
					padding: .8rem 1.3rem;
				}
				th{
					padding: 1.5rem 1rem;
				}
				img{
					margin: 2px .3rem;
				}
			}
			&.approvals{
				table{
					tr{
						td{
							&:nth-child(3){
								color: #000;
								text-align: left;
								width: auto;
							}
							&:nth-child(4){
								span{
									color: #00b2d2;
									font-family: $HB;
									margin: 0 0 0 1rem;
								}
							}
							&:nth-child(6){
								@include flex;
								span{
									@extend %center-flex;
									width: 3rem;
									height: 3rem;
									border-radius: 50%;
									margin: 0 .5rem;
									position: relative;
									&.approve{
										background-color: #00d259;
										&:after {
											content: "";
											position: absolute;
											left: 50%;
											top: calc(50% - 1px);
											width: 14px;
											height: 7px;
											border-radius: 1px;
											border-left: .3rem solid #fff;
											border-bottom: .3rem solid #fff;
											@include transform( translate(-50%, -50%) rotate(-45deg));
										}
									}
									&.deny{
										background-color: #eb1313;
										&:after {
											content: "+";
											position: absolute;
											color: #fff;
											left: 47.5%;
											top: 46%;
											font: 2.2rem/1 $HB;
											@include transform( translate(-50%, -50%) rotate(-45deg));
										}
									}
								}
							}
						}
					}
				}
			}
		}
	}
	.pagination-wrap{
		padding: 1rem 2rem 2rem;
		min-width: 100%;
		color: #000;
		@media (max-width: 1240px){
			padding: 1rem 1rem 2rem;
		}
		@include br1{
			margin-top: 2rem;
		}
		@include br2{
			height:auto;
		}
		nav{
			width: 100%;
			height: 100%;
			ul{
				position: relative;
				height: 100%;
				@include br3{
					padding-bottom: 5rem;
				}
				li{
					font-size: 1.4rem;
					@include flex;
					@include align-items(center);
					margin: 0 .6rem;
					&.active{
						.page-link{
							background-color: #54818f;
							color: $main-color2;
						}
					}
					@media screen and (max-width: 1240px){
						&:nth-child(3){
							margin-left: 14rem;
						}
					}
					@include br1{
						margin: 0 .3rem;
					}
					@include br3{
						&:nth-child(3){
							margin-left: .3rem;
						}
					}
					.page-link{
						width: 2.8rem;
						height: 2.8rem;
						padding: 0;
						font-family: $HB;
						@include border-radius;
						@include flex;
						@include justify-content(center);
						@include align-items(center);
						color: #00b2d2;
						border: none;
						outline: none;
						border: 0.1rem solid #d1e5e9;
						@include br3{
							bottom: 0;
						}
						&:hover{
							background-color: #54818f;
							color: $main-color2;
						}
						&:focus{
							box-shadow: none;
						}
					}
					&:last-child{
						position: absolute;
						bottom: 0;
						margin: 0;
						right: 0;
						a, span{
							font: 1.2rem $HB;
							text-transform: uppercase;
							color: $main-color1;
							background: #fff;
							width: 9.9rem;
							height: 2.9rem;
							border: 0.1rem solid #d1e5e9;
							@include border-radius(3px);
							width: auto;
							padding: 0 2.5rem 0 1.5rem;
							position: relative;
							@extend %bef-ar;
						}
						&.disabled{
							span{
								color: rgba(0,0,0,.5);
								&:before{
									border-left-color: #bad1d9;
								}
							}
						}
					}
					&:first-child{
						left: 0;
						position: absolute;
						a, span{
							&:before{
								left: 3px;
								border-right-color: #00b2d2;
							}
							&:after {
								left: 6px;
								border-right-color: #FFF;
							}
							&:hover{
								&:before {
									border-right-color: #fff;
								}
								&:after {
									border-right-color: #54818f;
								}
							}
						}
						&.disabled{
							a, span{
								&:before{
									border-right-color: #bad1d9;
								}
							}
						}
					}
					&:nth-child(2){
						left: 9rem;
						position: absolute;
					}

					.select-wrapper {
						position: relative;
						width: 7.9rem;
						height: 3.9rem;
						border-radius: 0.5rem;
						border: 0.1rem solid #d1d3d8;
						background-color: #ffffff;
						@include border-radius(3px);
						&>select {
							height: 100%;
							background: transparent;
							border: 0;
							appearance: none;
							z-index: 1;
							font-size: 1.4rem;
							-webkit-appearance: none;
							-moz-appearance: none;
							position: relative;
							cursor: pointer;
							&::-ms-expand{
								display: none;
							}
							option{
								font-size: 1.4rem;
							}	
							&:focus{
								box-shadow: none;
							}
						}			
						&:before, &:after {
							content: '';
							position: absolute;
							z-index: 0;
							border: 8px solid transparent;
							border-bottom: 0;
							right: 8px;
						}
						&:before{
							top: 16px;
							border-top-color: #00b2d2;
							@include br2{
								top: 12px;
							}
						}
						&:after {
							top: 13px;
							border-top-color: #FFF;
							@include br2{
								top: 9px;
							}
						}		
					}
					@include br3{
						&:nth-child(1), &:nth-child(2){
							width: 50%;
							position: relative;
							left: 0;
							margin: 0 0 2rem;
						}
					}
				}
			}
		}
	}
	.generate{
		padding: 4rem 1rem;
		a{
			width: 12.9rem;
			height: 2.9rem;
			border-radius: 0.3rem;
			border: 0.1rem solid #d1e5e9;
			background-color: #ffffff;
			color: #000000;
			font: 1.2rem $HB;
			text-transform: uppercase;
			position: relative;
			margin: 1rem 0 1rem auto;
			@extend %center-flex;
			&:hover{
				background-color: #54818f;
				color: #fff;
			}
			@extend %bef-ar;
		}
	}
}

.oil{
	p{
		margin: 0 2px;
		font-weight: bold;
		width: 3.2rem;
		height: 2.2rem;
		color: #fff;
		cursor: pointer;
		@extend %center-flex;
		&.red{
			background-color: #e60000;					
		}
		&.green{
			background-color: #21cc5d;
		}
	}
}

.comp{
	position: relative;
	border-radius: 5px;
	min-height: 31px;
	@extend %center-flex;
	margin-bottom: 0;
	font-family: $HB;
	width: 95px;
	&.comp-high{
		background-color: #e60000;
	}
	&.comp-average{
		background-color: #00b2d2;
	}
	&.comp-low{
		background-color: #21cc5d;
	}
	&.comp-white{
		background-color: #fff;
		color: #000;
		border: 1px solid #898989;
	}
	&.comp-dark-grey{
		background-color: #898989;
	}

	p{margin: 0;
		&.priority{
			width: 100%;
			height: 100%;
			position: relative;
			z-index: 2;
			select{
				width: 100%;
				height: 100%;
				color: rgba(255,255,255, 0);
				background: transparent;
				cursor: pointer;
				-moz-appearance: none;
				-webkit-appearance: none;
				appearance: none;
				padding: 0 5px;
				&::-ms-expand {  /* для IE */ 
					display: none;
				}
				option{	
					-moz-appearance: none;
					-webkit-appearance: none;
					appearance: none;
					color: #000;
					font-weight: bold;
					// &:nth-child(1){
					// 	background: #e60000;
					// }
					// &:nth-child(2){
					// 	background: #00b2d2;
					// }
					// &:nth-child(3){
					// 	background: #21cc5d;
					// }
					// &:nth-child(4){
					// 	background: #fff;
					// 	color: #000;
					// }
					// &:nth-child(5){
					// 	background: #898989;
					// }
				}
			}
		}
		&.comp-name{
			position: absolute;
			z-index: 1;
			top: 50%;
			left: 50%;
			transform: translate(-50%, -50%);
			padding: 0;
			margin: 0;
		}
	}
}