* {
  -webkit-box-sizing: border-box;
  -moz-box-sizing: border-box;
  box-sizing: border-box;
}

p {
  margin: 3px 0px 1px 0px;
}

select, input[type=text], input[type=password], textarea {
  border-radius: 3px;
}

.a_phone, .a_email{color:#1820ef;cursor:pointer;}
.a_phone.main, .a_email.main{font-weight:bold;}
.a_phone:hover, .a_email:hover{text-decoration:underline;}

select, textarea {
  padding: 3px;
}

input[type=text],input[type=password] {
  border: 1px solid #e0e0e0;
  padding: 5px;
}

.hidden{display:none;}

.button {
  text-decoration: none;
  color: #FFFFFF;
  background: linear-gradient(to bottom, #3CAEE7, #0088CC) transparent;
  border-radius: 4px;
  cursor: pointer;
  display: inline-block;
  font-size: 0.94em;
  /*line-height: 2.16;
  padding: 0px 1.07em;*/
  padding: 7px 10px;
  text-align: center;
  white-space: nowrap;
  border:none;
}

.button.size-sm{padding:3px 7px;font-size:15px;}

.nowrap{white-space: nowrap;}

.button.orange{background: linear-gradient(to bottom, #e7e23c, #d0771b) transparent;}
.button.red, .task_history_options .button.completed[data-value="0"], 
#task_history_table .completed.button[data-value="0"]{background: linear-gradient(to bottom, #f97676, #e44646) transparent;}

.button:hover {
  opacity: 0.9;
}

input.date, input.datetime {
  cursor: pointer;
}

.page_docs table.header {
  display: inline-block;
}

.parameters {
  margin-bottom: 5px;
}

.parameters .header {
  display: inline-block;
}

#docs_refresh {
  margin-left: 10px;
}

.page_docs .header input[type=text] {
  width: 120px;
  cursor: pointer;
}

#hotels_data {
  border-spacing: 0px;
  border-collapse: collapse;
}

#hotels_data thead tr td {
  background: #006699;
  color: #FFFFFF;
  text-align: center;
}

#hotels_data {
  /*border: 1px solid #000000;*/
}

#hotels_data thead tr td.day_week {
  background: red; 
}

#hotels_data > tbody > tr {
  height: 100px;
}

/*#hotels_data > tbody > tr > td {
  background-color: #F6F6F6;
}*/

#hotels_data tr td {
  border: 1px solid #000000;
  padding: 5px;
  width: 200px;
  vertical-align: top;
}

#hotels_data .data_row {
  padding: 3px;
}

#hotels_data .data_row + .data_row {
  margin-top: 10px;
  padding-top: 15px; 
  border-top: 1px solid #ededed;
}

#hotels_data .data_row .rd_date, #hotels_data .data_row .rd_phone {
  white-space: nowrap;
}

#hotels_data > tbody > tr > td.bg_free_hotel {
  background: #AFFBBA;
  cursor: pointer;
}

#hotels_data > tbody > tr > td.bg_left_hotel {
  background: #ad83e9;
}

#hotels_data > tbody > tr > td.bg_live_hotel {
  background: yellow;
}

#hotels_data > tbody > tr > td.hotel_name {
  background-color: #F6F6F6;
}


/* Модальная форма */
#modal_form, .modal_form {
	background: #fff;
	position: fixed; /* чтoбы oкнo былo в видимoй зoне в любoм месте */
  top: 25%;
  left: 45%; /* пoлoвинa экрaнa слевa */
	display: none; /* в oбычнoм сoстoянии oкнa не дoлжнo быть */
	z-index: 9; /* oкнo дoлжнo быть нaибoлее бoльшем слoе */
  box-shadow: 0 0 10px rgba(0,0,0,0.5);
  border-radius: 5px;
  max-width: 100%;
}

#modal_form .modal_info, .modal_form .modal_info {
  padding: 10px 10px;
  overflow-y: auto;
}

#modal_form .modal_info{width:100%;}

#overlay_modal {
	z-index: 8; /* пoдлoжкa дoлжнa быть выше слoев элементoв сaйтa, нo ниже слoя мoдaльнoгo oкнa */
	position: fixed; /* всегдa перекрывaет весь сaйт */
	background-color: #FFFFFF; /* чернaя */
	opacity: 0.7; /* нo немнoгo прoзрaчнa */
	width: 100%; 
	height: 100%; /* рaзмерoм вo весь экрaн */
	top: 0; 
	left: 0; /* сверху и слевa 0, oбязaтельные свoйствa! */
	/*cursor: pointer;*/
	display: none; /* в oбычнoм сoстoянии её нет) */
}

#modal_form .modal_header, .modal_form .modal_header {
  font-size: 14px;
  font-weight: bold;
  font-family: Helevtica,Verdana,san-serif !important;
  margin-top: 0px;
  text-align: left;
  background: #f6f4f6;
  padding: 5px 10px;
  border-radius: 5px 5px 0px 0px;
  cursor: move;
  display: block;
}

#modal_form .btn_close, .modal_form .btn_close {
  font-family: Verdana;
  font-size: 20px; 
  font-weight: bold; 
  float: right;
  cursor: pointer;
  margin-right: 5px;
}

#form_data input[type=text] {
  width: 140px;
}

#form_data textarea {
  width: 100%;
  border-radius: 3px;
}

#form_data .buttons, #data_sale_status_packet .buttons{
  margin-top: 5px;
  text-align: right;
}

a.delete.button {
  background: linear-gradient(to bottom, #f16bbb, rgb(185, 8, 8)) transparent;
}

#data_form, #finance_form {
  width: 300px;
}

#data_form select, #data_form input[type=text], #data_form textarea, 
#finance_form select, #finance_form input[type=text], #finance_form textarea, 
.i_form select, .i_form input{
  width: 100%;
}

#data_save, #finance_save, #user_save, #sale_status_save {
  display: block;
  margin: 10px 0px 0px auto;
  width: 30%;
}

#create_schet_save {
  display: block;
  margin-top: 10px;
}

#content_data {
  margin-top: 10px;
}

table#main_data_table {
  margin-top: 76px;
}

.page_finance table.nmlstable {
  margin-top: 0px;
} 
    
table.nmlstable, #header_table, .payment_invoice, .work_history {
  border-spacing: 0px;
  border-collapse: collapse;
  width: 100%;
}

table.nmlstable.fixed_column tr > td:first-child{
  position: sticky;
  left: 0;
  background-color: #FFFFFF;
  z-index: 1;
}

#header_table {
  /*margin-top: 10px;*/
}

table.nmlstable tr td, 
#header_table tr td {
  padding: 7px;
  border: 1px solid #DDDDDD;
}

table.nmlstable tbody tr td {
  word-break: break-word;
  position: relative;
}

table.nmlstable tbody tr td.debet {
  white-space: nowrap;
}

table.nmlstable tbody tr td span.agc {
  position: absolute;
  left: 7px; bottom: 1px;
  font-size: 11px; 
  color: blue;
}

table.nmlstable tbody tr td textarea + span.agc{position:static;display: inline-block;cursor: auto;}

table.nmlstable tbody tr td.agc {
  color: blue;
}

/*table.nmlstable thead {
  position: fixed;
  top: 40px;
  left: 0px; right: 0px;
  width: 100%;
  padding: 8px; 
}*/

table#main_data_table > thead {
  visibility: hidden;
}

.page_finance table.nmlstable > thead, #task_history_table thead{
  visibility: visible;                  
}

/*#task_history_table tr td:last-child{min-width:400px;}*/

table.nmlstable > thead > tr > td,
#header_table thead tr td, .payment_invoice > thead > tr > td, .work_history > thead > tr > td {
  text-align: center;
  font-weight: bold;
  background-color: #EFEFEF;
}

table.nmlstable tfoot tr td {
  font-weight: bold;
  white-space: nowrap;
}

table.nmlstable:not(#sale_status_table) > tbody > tr, .status_remove {
  cursor: pointer;
}

table.nmlstable > tbody > tr:not(.client_pay):hover td {
  background: #e6f1ff;
}

table.nmlstable tbody tr td.left, table.nmlstable tfoot tr td.left {
  text-align: left;
}

table.nmlstable tbody tr td.right, table.nmlstable tfoot tr td.right {
  text-align: right;
}

table.nmlstable tbody tr td.center, table.nmlstable tfoot tr td.center {
  text-align: center;
}

.nmlstable tbody tr td input:not([type=checkbox]), .nmlstable tbody tr td select, .nmlstable tbody tr td textarea,
.nmlstable tbody tr td .i_spicker{
  width: 100%;
} 

.nmlstable tbody tr td .i_spicker .title{left:5px;top:5px;text-align:left;}

table.nml_sort thead tr td,
#header_table thead tr td {
  cursor: pointer;
}

#user_columns {
  position: absolute;
  top: 10px; right: 10px;
  width: 20px; height: 20px;
  cursor: pointer;
}

#user_columns_form {
  width: 200px;
}

#header_data {
  position: fixed;
  top: 0px; left: 0px; right: 0px;
  width: 100%;
  padding: 8px 8px 0px 8px;
  background: #FFFFFF;
  z-index: 9;
}

#info_login {
  position: absolute;
  right: 50px;
  top: 1px;
}

#filters {
  position: absolute;
  right: 50px;
  top: 20px;
}

#user_columns_save {
  margin-top: 5px;
  width: 100%;
}

.pay_info {
  text-align: center;
  bottom: 2px; left: 49%;
  transform: rotate(-90deg);
  cursor: pointer;
  font-size: 18px;
}

tr.client_pay > td {
  position: relative;
}

tr.client_pay > td .inputs { 
  position: absolute;
  top: 7px; left: 600px;
}

tr.client_pay > td .inputs a + a{
  margin-left: 5px; 
}

.payment_invoice, .work_history {
  width: 1250px;
}

table.payment_invoice tr td, table.work_history tr td {
  padding: 3px 7px;
  font-size: 15px;
}

.work_history tr td:nth-child(1) {
  width: 150px;
}

.work_history tr td:nth-child(2) {
  /*width: 150px;*/
}

.work_history tr td:nth-child(3) {
  width: 230px;
  text-align: center;
}

.payment_invoice tr td:nth-child(1), .payment_invoice tr td:nth-child(2),
.payment_invoice tr td:nth-child(3), .payment_invoice tr td:nth-child(4) {
  width: 100px;
}

.payment_invoice tr td:nth-child(5) {
  width: 120px;
}

.payment_invoice tr td:nth-child(6) {
  width: 200px;
}

.payment_invoice tr td:nth-child(7) {
  width: 70px;
  text-align: center;
}

.tabs {
	padding: 0px 0px 0px 10px;
	height: 30px;
	line-height: 16px;
	border-bottom: 0px solid #DDDDDD;
	margin-bottom: 15px;
}

.tabs a {
	border-top: 1px solid #DDDDDD;
	border-left: 1px solid #DDDDDD;
	border-right: 1px solid #DDDDDD; 
	background: #FFFFFF url('../images/tab.png') repeat-x;
	padding: 7px 15px 6px 15px;
	float: left;
	font-family: Arial, Helvetica, sans-serif;
	font-size: 13px;
	font-weight: bold;
	text-align: center;
	text-decoration: none;
	color: #000000;
	margin-right: 2px;
	display: none;
}

.tabs a.selected {
	padding-bottom: 7px;
	background: #FFFFFF;
}

#context_menu {
  background-color: white;
  border-radius: 3px;
  box-shadow: 0 2px 5px 0 rgba(0, 0, 0, 0.26), 0 2px 10px 0 rgba(0, 0, 0, 0.16);
  padding: 9px 0px;
  
  max-width: 340px;
  overflow: hidden;
  position: absolute;
  z-index: 10000;
}

#context_menu ul {
  list-style: none;
  padding: 0; margin: 0;
}

#context_menu ul li {
  vertical-align: baseline;
  outline: none;
  margin: 0;
  padding: 0;
  border: 0;
}
    
#context_menu ul li:hover {  
  background-color: #f4f5f5;
}

#context_menu ul li div {
  padding-right: 24px;
  padding-left: 24px;
  cursor: pointer;
  padding-top: 8px; /*13px;*/
  font-size: 14.5px;
  height: 30px; /*40px;*/
  line-height: 14.5px;
  box-sizing: border-box;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#context_menu ul li img {
  margin-right: 5px;
}

#context_menu ul li a{text-decoration:none;color:#000000;}

.data_pay.active {
  font-weight: bold;
}

#main_data_table tr[data-pay_id="5"] > td{background-color: red;}
#main_data_table tr[data-pay_id="5"] > td .color_red{color:white;} 

/* фиксирование по новому */
.page_main[data-sticky="1"] #main_data_table{margin:0;}
.page_main[data-sticky="1"] #main_data_table > thead{visibility:visible;}
.page_main[data-sticky="1"] #header_data{position:static;padding:0;}
.page_main[data-sticky="1"] #rows_count{padding:18px 0 0 0;}

.page_main #total_rows{display:inline-block;}

#main_data_table tr[data-pay_id="2"] > td {
  background-color: #ffb8b8;
}

.page_finance table.filter td {
  vertical-align: bottom;
}

.page_finance table.filter input.date {
  width: 115px;
}

.fin_balance {
  float: right;
}

.fin_balance {
  display: table;
}

.fin_balance > div {
  display: table-row;
}

.fin_balance span {
  display: table-cell;
  padding: 1px 5px;
}

.fin_balance > div span:first-child {
  font-weight: bold;
}

#finance_table > tbody > tr > td:nth-child(1) {
  white-space: nowrap;
  text-align: center;
}

#finance_table td.date_doc{width: 90px;}
#finance_table td.client_id, #task_history_table td.client_id{width: 80px;}

/*#finance_table td{vertical-align: middle;}*/

.data_line[data-deleted="1"] td[data-field="company"],
.data_line[data-deleted="1"] td[data-field="company"] span{
  text-decoration: line-through;
}

#context_filter, #context_filter_main{padding-top: 20px;}
#context_filter .content, #context_filter_main .content{max-height: 300px;overflow-x: hidden; overflow-y: auto;display:flex;flex-direction:column;}
#context_filter a, #context_filter_main a{/*width: 100%;min-width: 200px;margin-top: 10px;*/}
#context_filter label, #context_filter_main label{cursor: pointer; display: block;}
#context_filter label:hover, #context_filter_main label:hover{background: #e6f1ff;}
#context_filter select, #context_filter_main select{width:100%;}
#context_filter .buttons, #context_filter_main .buttons{display: flex;justify-content: space-between;margin-top:10px;align-items: center;}
#context_filter .buttons > div, #context_filter_main .buttons > div{display: flex;flex-direction: column;margin-right:15px;}
#context_filter ::-webkit-scrollbar, #context_filter_main ::-webkit-scrollbar{width: 12px;}
 
#context_filter ::-webkit-scrollbar-track, #context_filter_main ::-webkit-scrollbar-track {
  -webkit-box-shadow: inset 0 0 6px rgba(0,0,0,0.3); 
  border-radius: 10px;
}
 
#context_filter ::-webkit-scrollbar-thumb, #context_filter_main ::-webkit-scrollbar-thumb {
  border-radius: 10px;
  -webkit-box-shadow: inset 0 0 6px rgba(0,0,0,0.5); 
}

.hide{display:none;}

.export_excel{display: inline-block;vertical-align: bottom;}
.export_excel img{height: 25px;}

.data_line td .links{position: absolute;position: absolute;bottom: 0px;display: flex;justify-content: space-evenly;left: 0px;width: 100%;background-color: transparent;z-index:1;}
.actions > * {vertical-align:middle;}  
.actions > input[type="checkbox"]{cursor:pointer;}

.page_task_history .inputs, .page_work_history .inputs, .parameters{display:flex;}
.page_task_history .inputs input[name="find_text"], .page_task_history .inputs select, .page_task_history .inputs .i_spicker{margin-left:5px;}
.page_task_history .i_spicker{width:200px;}

.i_spicker[data-name="service_moneys[]"],.i_spicker[data-name="tarifs[]"]{width:120px;}

td.active_filter{background-color:#d2e3fc !important;color: blue;} 

#main_pages{margin-right:50px;display:inline-block;}

input.date{width: 115px;}
.parameters * + *{margin-left: 5px;}

.task_history_options{display:none;}
input[name="task"]:checked ~ .task_history_options{display:block;}
.task_history_options select, .task_history_options input{margin-top:5px;}
.task_history_options .completed{margin-top:5px;display:block;}

/*.page_task_history #task_history_table tr td:nth-child(4){width:80px;}
.page_task_history #task_history_table tr td:nth-child(5){min-width:400px;}
.page_task_history #task_history_table tr td:nth-child(6){width:70px;}
.page_task_history #task_history_table tr td:nth-child(8){width:90px;min-width:auto;}
.page_task_history #task_history_table tr td:nth-child(9){width:70px;min-width:auto;}*/

.withdrawal_money_remove{display: inline-block;vertical-align: middle;margin-left: 20px;}
.page_finance .payment_invoice tr td:last-child{display:none;}

.work_history.rows_hide tr[data-hidden="1"]{display:none;}

.task_history_count{position:absolute;top:1px; left:1px; color: red;font-size:18px;}
#rows_count span{margin-left:5px;}
.xmdate_time{cursor:pointer;width:120px !important;}

.modal_reminder .comment, .modal_reminder .client_name{max-width: 350px;overflow: hidden;white-space: nowrap;text-overflow: ellipsis;}

tr.data_view:hover td{background: none !important;}
tr.data_view table td.client_id, tr.data_view table td.client_name{display:none;}
tr.data_view table td.date_create{width: 80px;}

#finance_remove{float:left;margin-top:10px;}
table.sticky > thead > tr > td{position:sticky;top:-1px;z-index:2;}

td.client_name{width:300px;}

td._action{width:20px;}
td._date{width:100px;text-align:center;white-space: nowrap;}
td._datewrap{width:100px;text-align:center;}
td._int{width:100px;white-space: nowrap;} 
td._curr{width:100px;text-align:right;white-space: nowrap;}

.align-self-end{align-self: flex-end;}

.append_comment{position:absolute;top:1px;right:1px;width:17px;cursor:pointer;}
table.work_history td{position:relative;}

#menu_actions{display:inline-block;margin:0;padding:0;}
#menu_actions li{position:relative;opacity:1;}
#menu_actions ul{margin:0;padding:0;}
#menu_actions > li > ul{display:none;}
#menu_actions > li:hover > ul{display:block;position:absolute;right:0px;top: 100%;z-index:10;}
#menu_actions > li > ul > li{display:block;margin-top:3px;}

#menu_actions li a{width:100%;}

#work_history_packet input:not([type="checkbox"]), #work_history_packet textarea, #work_history_packet select{display:block;margin-bottom:5px;width:100%;}
#work_history_packet .button{display:block;width:100%;}

.files_add a{position:absolute;right:30px;top:0px;text-decoration:none;}
.files_add a:hover, .files_list a:hover{text-decoration:underline;}
.files_list{margin-top:5px;}
.files_list a{margin-left:3px;text-decoration:none;}
.files_list a + a{margin-left:7px;}

.file_download a{color:#000000 !important;text-decoration:none;}

#users_table .append_client{width:17px;cursor:pointer;opacity:0.5;}
#users_table .append_client:hover{opacity:1;}

.client_phone, .client_email{padding:3px;border:1px solid #ededed;background-color:#FFFFFF;box-shadow: 0 0 2px rgba(0,0,0,0.5);border-radius:3px;margin-top:7px;}
.client_phone textarea{margin-top:5px;resize: none;}
.client_phone div, .client_email div{display: flex;justify-content: space-between;align-items: center;}
.save_client_name{display:block;width:100%;margin-top:5px;}
.client_phones, .client_emails{position:relative;}
.append_client_phone, .append_client_email{position:absolute;top:-12px;right:-6px;width:17px;cursor:pointer;}

.space-between{display: flex;justify-content: space-between;align-items: center;}
.w-100{width:100% !important;}

.color_red{color:red;}

#statuses_table .actions{width:100px;}
.context_users li.active{font-weight:bold;}

#content-reports .tabs{margin-top:10px;padding-left:0;}
.page_reports .content table{width:100%;margin-top:10px;}
#report1-2{margin-top:20px;}

#users_table tbody tr[data-status="0"] td:not(:last-child){opacity:0.2;}
.w-min{width:1px;}

#people_table tr td:first-child, #people_table tr td:last-child{width:20px;}
#people_table tr td:nth-child(3){width:250px;}
#people_table tr td:nth-child(4), #people_table tr td:nth-child(5){width:200px;}

.color-red{color:red;}
.bcolor-red{background-color:red!important;}

.context_close{margin-top:10px;}
.context_sale_statuse li{position:relative;}
.context_sale_statuse li.active::before{content:'\2714';position:absolute;left:7px;top:3px;}

.text-center{text-align:center;}

.page_main #rows_count{padding:5px 0;}
#sale_status_filter{display:inline-flex;margin-left:10px;}
#sale_status_filter .ssf_item{padding:3px 5px;border-radius:3px;margin-right:10px;cursor:pointer;box-shadow: 0 0 3px rgba(0,0,0,0.5);}
#sale_status_filter .ssf_item:hover{opacity:0.7;}
#sale_status_filter .ssf_item .i_close{margin-right:3px!important;display:none;}
#sale_status_filter .ssf_item.active{background-color:#e6f1ff;}

.i_close{z-index:1;width: 20px;height: 20px;opacity: 0.3;position:relative;cursor: pointer;display: inline-block;margin:0!important;}
.i_close.size-sm{width:12px;height:12px;}
.i_close:hover{opacity:1;}
.i_close:before, .i_close:after{position:absolute;left:9px;content:' ';height:23px;width:2px;background-color:#333;}
.i_close.size-sm:before,.i_close.size-sm:after{height:12px;width:1px;left:5px;} 
.i_close:before{transform: rotate(45deg);}
.i_close:after{transform: rotate(-45deg);}

#i_loader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: url(/images/wave-loader-min.svg);
  background-repeat: no-repeat;
  background-size: 7%;
  background-position: center;
  background-color: #000000;
  opacity: 0.2;
  display:none;
  z-index:100;
}

#comment_form{width:350px;}
#comment_form textarea{width:100%;resize:none;}

#nmls_table{width:auto;}
#nmls_table tbody tr td{word-break:unset;}

.page_nmls button[type="submit"]{vertical-align: top;}

select.i_select{visibility:hidden;}

.i_spicker{
  position: relative;
  width: 150px;
  height: 30px;
  border: 1px solid #a9a9a9;
  border-radius: 3px;
  overflow: hidden;
  cursor:pointer;
  display: inline-block;
}

.i_spicker:before{
  content: "\25BE";
  position: absolute;
  right: 10px;
  font-size: 30px;
  top: -7px;
}

.i_spicker:hover{overflow:visible;}
  
.i_spicker ul{  
  list-style: none;
  padding:0;margin:0;
  position:absolute;
  min-width:100%;left:0;top:100%;
  background-color: #FFFFFF;
  border: 1px solid rgba(0, 0, 0, .15);
  border-radius: 0 0 0.2308rem 0.2308rem;
  z-index:100;
  max-height:300px;overflow-y:auto;
}

.i_spicker .title{position:absolute;left:15px;top:4px;display:inline-block;}

.i_spicker ul li{
  padding: 3px 5px;
  cursor:pointer;
  position:relative;
  text-align: left;
  white-space: nowrap;
}

.i_spicker ul li:hover{
  background-color: #f8f9fa;
}

.i_spicker ul li.active:after{
  content:"\2714";
  position:absolute;right:3px;
}

.xmdate{cursor:pointer;width:100px;}
#report3 .xmdate{width:100px;margin-left:5px;}

#report3 table tbody td{text-align:right;cursor:auto;}
#report3 table tbody td[data-tasks]{cursor:pointer;}
#report3 table tbody td:first-child{text-align:left;}

table tr.empty td{padding:5px;border:none;}
table tr.total td{font-weight:bold;}

[data-tasks]:hover{color:blue;}

#image_form{width:300px;height:300px;}
#image_form img{max-width:100%;max-height:100%;}

.beginning_debt{
  background-color: red;
  color: #FFF;
}