* {
	box-sizing: border-box;
	margin: 0;
	padding: 0;
}

@media screen and (min-width: 768px) {

	/* Scroll bar */
	::-webkit-scrollbar {
		width: 10px;
		height: 10px;
		border-radius: 50px;
		margin: 0 5px;
	}
	
	/* ::-webkit-scrollbar-button {  background-color: #666; } */
	::-webkit-scrollbar-track {
		background-color: #999;
	}
	
	::-webkit-scrollbar-track-piece {
		background-color: #333541;
	}
	
	::-webkit-scrollbar-thumb {
		height: 50px;
		background: #666eee;
		border-radius: 3px;
		transition: .5s;
	}
	
	::-webkit-scrollbar-thumb:hover {
		background-color: #a8adfa;
	}
	
	::-webkit-scrollbar-corner {
		background-color: #333541;
	}
}

/* ::-webkit-resizer { background-color: #fff;} */

body {
	display: flex;
	flex-direction: column;
	font-family: Arial, "Helvetica Neue", Helvetica, sans-serif;
	color: #fff;
	background: #111317;
	font-size: 15px;
}

.hidden {
	display: none;
}

ul {
	list-style: none;
}

.box {
	position: relative;
	max-width: 1200px;
	width: 100%;
	margin: 0 auto;
}

.center {
	text-align: center;
}

.table {
	width: 100%;
	border-collapse: collapse;
	background: #1b1d21;
}

.table th,
.table td {
	padding: 0 10px;
	border-right: 1px solid #414141;
	white-space: nowrap;
	line-height: 40px;
	text-align: left;
}

.table th {
	background: #18191d;
	line-height: 28px;
	text-align: center;
}

.table tr:nth-child(2n) {
	background: #282e33;
}

a:link,
a:visited,
a:active,
a:hover {
	color: #fff;
	text-decoration: none;
}

.centered {
	position: absolute;
	top: 50%;
	left: 50%;
	-webkit-transform: translate(-50%, -50%);
	-moz-transform: translate(-50%, -50%);
	-ms-transform: translate(-50%, -50%);
	-o-transform: translate(-50%, -50%);
	transform: translate(-50%, -50%);
}

h1,
h2,
h3,
h4,
h5,
h6 {
	margin-bottom: 10px;
}

.btn {
	cursor: pointer;
	background: #148f48;
	border: none;
	padding: 0 10px;
	line-height: 25px;
	border-radius: 5px;
	color: #fff;
}

.btn.red {
	background: #a94442;
}

.btn.yellow {
	background: #bf892b;
}

.form {
	/*	min-width: 300px;*/
	background: #18191d;
	border-radius: 4px;
	padding: 20px;
}

.form input,
.form textarea,
.form select {
	display: block;
	width: 100%;
	margin-bottom: 10px;
	border: none;
	background: #2a2f33;
	border-radius: 4px;
	line-height: 25px;
	padding: 0 15px;
	color: #fff;
}

.form label {
	display: block;
	margin-bottom: 5px;
}

.form input[type="submit"],
.form button {
	cursor: pointer;
	background: #fff;
	background: #2ecc71;
	border: none;
	padding: 0 10px;
	line-height: 25px;
	border-radius: 4px;
	color: #fff;
}

.form select {
	display: block;
	background: #2a2f33;
	color: #fff;
	padding: 10px;
	border: none;
	outline: none;
	border-radius: 5px;
	width: 100%;
	line-height: 25px;
	height: 25px;
	padding: 0 15px;
	font-size: 13px;
	cursor: pointer;
}

.itemlist {
	margin-top: 10px;
	margin-bottom: 20px;
}

.itemlist>label {
	display: block;
	margin-bottom: 5px;
	font-weight: bold;
	font-size: 20px;
}

.itemlist .list {
	display: flex;
	gap: 10px;
	flex-direction: column;
}

.itemlist .sitem,
.itemlist .item {
	width: 100%;
	padding: 20px;
	border-radius: 4px;
	background: #272727;
	transition: .3s;
}

.itemlist .item.center {
	cursor: default;
	opacity: .5;
}

.itemlist .item:not(.center):hover {
	cursor: pointer;
	transform: scale(1.01);
}

main {
	padding: 10px;
}

@keyframes blinker {
	50% {
		opacity: 0;
	}
}

#apartments .item.upcoming {
	/*	background: linear-gradient(90deg, #666eee6e 0%, #272727 50%);*/
	background-color: #9b8714;
}

#apartments .item.rented {
	/*	background: linear-gradient(90deg, #2ecc71b3 0%, #272727 50%);*/
	background-color: #0d6c35;
}

#apartments .item.inactive {
	opacity: .4;
}

#apartments .item.inactive:hover {
	opacity: 1;
}

#alerts {
	position: fixed;
	bottom: 10px;
	left: 10px;
	width: 400px;
	z-index: 100000000000;
}

#alerts .alert {
	cursor: pointer;
	border-radius: 15px;
}

.alert {
	padding: 15px;
	margin: 5px 0 20px 0;
	border: 1px solid;
	border-radius: 4px;
	white-space: normal;
}

.good {
	color: #91ff93;
}

.alert.good {
	color: #3c763d;
	background-color: #dff0d8;
	border-color: #d6e9c6;
}

.bad {
	color: #ff817f;
}

.alert.bad {
	color: #a94442;
	background-color: #f2dede;
	border-color: #ebccd1;
}

.warn {
	color: #ffdca0;
}

.alert.warn {
	color: #8a6d3b;
	background-color: #fcf8e3;
	border-color: #faebcc;
}

/*header*/
header {
	display: flex;
	flex-direction: row;
	justify-content: space-between;
	font-size: 18px;
	background: #18191d;
}

header .box {
	display: flex;
	flex-direction: row;
	justify-content: space-between;
	max-width: 1220px;
}

header #user {
	display: flex;
	margin-right: 10px;
}

header #user .name {
    line-height: 40px;
    margin-right: 10px;
    /* margin-right: 67px; */
    font-size: 14px;
    color: #fff;
}

header #logout {
	width: 30px;
    height: 30px;
    background: url(/read_file.php?svg_id=logout.svg) no-repeat;
    background-size: 80%;
    background-position: center;
    margin: 5px 0;
    cursor: pointer;
	transition: .1s;
}

header #settings_btn:hover,
header #logout:hover {
	background-size: 100%;
}

#to_top {
	display: none;
	font-size: 16px;
    line-height: 40px;
    color: #9499e2;
    padding: 0 10px;
	cursor: pointer;
	transition: .3s;
	user-select: none;
}

#to_top.disabled {
	pointer-events: none;
	color: #999;
	font-size: 14px;
}

#to_top:hover {
    background: #3f3f3f;
	color: #fff;
}

header nav {
	display: flex;
	flex-direction: row;
}

#menu__toggle, .menu__btn {
	display: none;
}

header nav>* {
	padding: 0 8px;
	font-size: 14px;
	line-height: 40px;
	cursor: pointer;
	transition: .3s;
}

header #settings_btn {
	display: block;
	width: 30px;
	height: 30px;
	background: url(read_file.php?svg_id=settings.svg) no-repeat;
	background-size: 80%;
	background-position: center;
	margin: 5px 0;
	transition: .1s;
}

header nav>*:hover,
header nav .list .content a:hover {
	background: #454545;
}

header nav .list {
	position: relative;
	display: flex;
	flex-direction: column;
}

header nav .list .content {
	position: absolute;
	display: none;
	top: 100%;
	left: 0;
	width: 100%;
	flex-direction: column;
	background: #292929;
	font-size: 16px;
	text-indent: 10px;
	line-height: 30px;
	z-index: 1;
}

header nav .list .content {
	transition: .3s;
}

header nav .list:hover .content {
	display: flex;
}

main {
	display: flex;
	flex-direction: column;
	flex-wrap: wrap;
	/* align-items: center; */
	justify-content: center;
}



/*users*/
main#users form {
	display: flex;
	flex-direction: column;
	align-items: center;
}

main#users form>div {
	min-width: 500px;
	display: flex;
	flex-direction: column;
	margin-bottom: 20px;
}

main#users .access>div {
	display: flex;
	flex-wrap: wrap;
}

main#users .access>div input {
	display: none;
}

main#users .access>div label {
	margin: 10px;
	padding: 10px;
	color: #888;
	border-radius: 25px;
	background-color: #222;
	cursor: pointer;
	user-select: none;
}

main#users .access input:checked+label {
	color: inherit;
	background-color: #777;
}

main#users form button {
	/*	margin-left: 50%;*/
	padding: 10px;
	color: inherit;
	font-size: 18px;
	background-color: #222;
	border: none;
	border-radius: 25px;
	/*	transform: translateX(-50%);*/
	user-select: none;
	cursor: pointer;
}

main#users form button:hover {
	background-color: #777;
}

main#users #users_list {
	margin-top: 15px;
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
}

main#users #users_list .btn {
	margin-bottom: 5px;
}

main#users #users_list .btn.disabled {
    background: #6e6e6e;
    color: #bfbcbc;
    pointer-events: none;
}

main#users #users_list .user {
	display: flex;
	flex-direction: column;
	margin: 5px;
	padding: 10px;
	background-color: #444;
}

main#users #users_list .user .parameter label {
	margin-bottom: 10px;
	line-height: 30px;
	color: #888;
	cursor: pointer;
	user-select: none;
}

main#users #users_list .user .parameter input:checked+label {
	color: inherit;
}


/*costs*/
main#costs #sort_and_download_costs .list {
	display: flex;
	flex-wrap: wrap;
}

main#costs #sort_and_download_costs .list .btn {
	cursor: pointer;
	user-select: none;
}

main#costs #sort_and_download_costs .list>div {
	margin: 0 10px;
	display: flex;
	flex-direction: column;
	text-align: center;
}

main#costs table .remove {
	cursor: pointer;
	user-select: none;
}



/*tasks*/
main#tasks {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-evenly;
}

main#tasks>div {
	width: 280px;
	margin: 10px;
	display: flex;
	flex-direction: column;
}

main#tasks>div h3 {
	font-size: 20px;
	text-align: center;
}

main#tasks>div .append_task {
	border: 1px solid red;
	text-align: center;
	font-size: 18px;
	cursor: pointer;
	user-select: none;
}

main#tasks>div .task {
	position: relative;
	display: flex;
	border: 1px solid red;
	font-size: 18px;
}

main#tasks>div .task .success {
	position: absolute;
	top: 0;
	left: -25px;
	height: 22px;
	width: 22px;
	border: 1px solid red;
	border-radius: 50%;
	cursor: pointer;
	user-select: none;
}

main#tasks>div .task .success:hover {
	background-color: red;
}

.modal {
	display: none;
	position: fixed;
	width: 100%;
	height: 100%;
	left: 0;
	top: 0;
	z-index: 10000000;
}

.modal .overlay {
	position: absolute;
	width: 100%;
	height: 100%;
	left: 0;
	top: 0;
	background: rgba(0, 0, 0, .8);
	cursor: pointer;
}

.modal .create_task_area {
	width: 270px;
	height: 100px;
	position: relative;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	display: flex;
	flex-direction: column;
	background-color: #666eee;
}

.modal .create_task_area textarea {
	height: 100%;
	width: 100%;
	padding: 10px;
	resize: none;
}

.modal .create_task_area div {
	line-height: 30px;
	text-align: center;
	cursor: pointer;
	user-select: none;
}



/*chat*/
main#chat #hints_check,
main#chat #hints>div {
	display: none;
}

main#chat #hints {
	z-index: 1;
	position: absolute;
	min-height: 50px;
	min-width: 50px;
	top: 50%;
	left: 10px;
	cursor: pointer;
	background-size: 80%;
    background-repeat: no-repeat;
    transform: translateY(-50%);
}

main#chat #hints>div {
	z-index: 2;
}

main#chat #hints>div li {
	padding: 5px 10px;
}

main#chat #hints_check:checked+#hints>div {
	position: absolute;
	transform: translate(50px, -50%);
	background-color: rgb(0, 0, 0);
	display: block;
}

#chat_window {
	height: calc(100vh - 80px);
}

#chat_window #controls {
	display: flex;
	position: absolute;
	bottom: 0;
	width: 100%;
	background: #282e33;
	padding: 0;
	border-radius: 0;
}

#chat_window #controls #type_message {
	width: 100%;
	margin-bottom: 0;
	resize: none;
	background: transparent;
	width: 100%;
	outline: none;
	height: 40px;
    line-height: 40px;
}

.modal.hidden#chat_hints {
	display: none;
}

#chat_hints {
	display: none!important;
}

.modal#chat_hints>ul {
	display: flex;
	flex-direction: column;
	align-items: center;
}

.modal#chat_hints>ul li {
	padding: 10px;
}

.modal#chat_hints>div {
	display: flex;
	justify-content: space-around;
	flex-direction: row;
	flex-wrap: wrap;
}

.modal#chat_hints>div>div {
	height: 50px;
	width: 50px;
	margin: 20px 0;
	background-position: center;
	background-size: cover;
}

#chat_window #controls .btn {
    line-height: 30px;
    font-size: 14px;
    margin-left: 20px;
	/* background: #1c2023; */
	/* background: #2ecc71; */
	background: #666eee;
	margin: 5px;
}

#chat_window #controls .when {
	display: none;
	
	line-height: 30px;
    font-size: 14px;
    margin-left: 20px;
    background: #1c2023;
    margin: 5px;
    width: 100px;
    height: 30px;
    padding: 0 7px;
    font-weight: normal;
}

#chat_window #controls .save,
#chat_window #controls .cancel {
	display: none;
}

#chat_window #controls.editing .save,
#chat_window #controls.editing .cancel {
	display: block;
}

#chat_window #controls.editing .cancel {
	background: #812e30;
}

#chat_window #controls.editing .when,
#chat_window #controls.editing .send {
	display: none;
}

#chat_window #chat_tabs {
	display: flex;
	gap: 5px;
}

#chat_window #chat_tabs div {
	padding: 5px 20px;
	background: #1f2023;
	border-radius: 8px 8px 0 0;
	font-size: 12px;
	cursor: pointer;
	color: #999;
	transition: .3s;
}

#chat_window #chat_tabs div:hover {
	color: #fff;
	background: #18191d;
}

#chat_window #chat_tabs .active {
	pointer-events: none;
	background: #18191d;
	color: #fff;
}

#chat_window #chat_tabs + #text_area {
	height: calc(100% - 60px);
}

#chat_window #text_area {
	display: flex;
	flex-direction: column;
	flex-wrap: nowrap;
	align-content: flex-end;
	justify-content: flex-end;
	align-items: flex-end;
	padding: 10px;
	height: calc(100% - 40px);
	background: #18191d;

}

#chat_window #text_area #area_wrapper {
	display: flex;
	flex-direction: column;
	align-items: flex-end;
	padding: 0 10px;
	overflow-y: auto;
	width: 100%;
}

#chat_window #text_area .day {
	display: flex;
	flex-direction: column;
	align-items: flex-end;
	width: 100%;
}

#chat_window #text_area .day.hidden {
	display: none;
}

#chat_window #text_area .date {
	text-align: center;
	background: #2f343b;
	border-radius: 50px;
	margin: 0 auto;
	padding: 5px 20px;
}

#chat_window #text_area .message {
	position: relative;
	margin: 5px 0;
	background: #2a2f33;
	padding: 10px 44px 10px 10px;
	border-radius: 5px;
}

#chat_window #text_area .message.important {
	box-shadow: inset 0 0 0 1px #e7b26e, -13px 0 15px -10px #e7b26e;
}

#chat_window #text_area .message.rent .time {
	/* pointer-events: none; */
}

#chat_window #text_area .message.mreport {
	background: #222629;
	position: relative;
	margin: 20px auto;
	padding: 10px;
	overflow-wrap: anywhere;
	box-shadow: 0 10px 10px -7px #000;
}

#chat_window #text_area .message[recognized="0"] {
	background: #4f2829;
}

/* Deleted */
#chat_window #text_area .message[recognized="-1"] { 
	opacity: .3;
	pointer-events: none;
}

#chat_window #text_area .message.editing {
	background: #566067;
}

#chat_window #text_area .message .time {
	position: absolute;
	top: 0;
	right: 10px;
	display: block;
	font-size: .75rem;
	white-space: nowrap;
	color: #828d94;
	width: 24px;
	line-height: 38px;
	user-select: none;
}

#chat_window #text_area .message:hover .time {
	font-size: 0;
	cursor: pointer;
}

#chat_window #text_area .message .time::before {
	pointer-events: none;
}

#chat_window #text_area .message:hover .time::before {
	content: '';
	position: absolute;
	top: 0;
	right: 0;
	width: 24px;
	height: 38px;
	background: url(read_file.php?svg_id=arrow.svg) no-repeat;
	background-size: 80%;
	background-position: center;
	transform: rotate(-90deg);
}

#chat_window #context_menu {
	position: fixed;
	display: none;
	background: #404040;
	z-index: 2;
	border-radius: 5px;
	overflow: hidden;

}

#chat_window #context_menu>* {
	padding: 10px 20px;
	cursor: pointer;
}

#chat_window #context_menu>*:hover {
	background: #777;
}

#context_menu_overlay {
	position: fixed;
	display: none;
	width: 100%;
	height: 100%;
	top: 0;
	left: 0;
	z-index: 1;
}

#report_params {
	display: flex;
	gap: 20px;
	padding: 7px 20px;
}

#report_params .option>div {
	margin-bottom: 5px;
	font-size: 14px;
	color: #b1b1b1;
}

#report_params select {
	margin-bottom: 0;
}

.table_wrap {
	width: 100%;
	max-width: 100vw;
	max-height: calc(100vh - 152px);
	margin-top: 10px;
	overflow: auto;
}

#report th {
	position: relative;
}

#report .comment {
	box-shadow: inset 0 -1px 0 0 #666eee;
    cursor: help;
    background: #666eee14;
}

#report th:hover .comment {
	opacity: 1;
	pointer-events: all;
}

#report th .comment {
	opacity: 0;
	pointer-events: none;
	position: absolute;
	top: 100%;
	left: 0;
	font-weight: normal;
	padding: 10px;
	box-shadow: 0px 5px 5px 0 #00000078;
	transition: .3s;
	width: 100%;
	background: #18191d;
	text-align: left;
	font-size: 14px;
	white-space: break-spaces;
}

#report .table_wrap thead tr:first-child {
	position: sticky;
	top: 0;
	box-shadow: 0 5px 10px 0 #00000070;
	z-index: 1;
}

#report .table_wrap tbody tr td:first-child {
	position: sticky;
	left: 0;
	box-shadow: inset 0 1px 0 0 #414141;
	background: #18191d;
	text-align: center;
}

#report .rented {
	color: #999;
}

#report:not(.admin) .option.uid {
	display: none;
}

#report .rented.kicked {
	color: #be6060;
}

#report span[aid] {
	display: block;
}
#report:not(.admin) th.amount,
#report:not(.admin) th.income,
#report:not(.admin) th.a_rent_employee_paid,
#report:not(.admin) th.cash_yesterday,
#report:not(.admin) th.dispatcher_salary,
#report:not(.admin) th.road,
#report:not(.admin) th.advertising,
#report:not(.admin) th.cash_withdrawal,
#report:not(.admin) th.debt,
#report:not(.admin) th.correction,
#report:not(.admin) th.total_cash,
#report:not(.admin) th.week_day,
#report:not(.admin) th.hours,
#report:not(.admin) th[class^="hours"],
#report:not(.admin) th.apartment,
#report:not(.admin) th.clients,
#report:not(.admin) th.average_hours,
#report:not(.admin) td[key="week_day"],
#report:not(.admin) td[key="hours"],
#report:not(.admin) td[key^="hours"],
#report:not(.admin) td[key^="apartment"],
#report:not(.admin) td[key="average_hours"],
#report:not(.admin) td[key="amount"],
#report:not(.admin) td[key="income"],
#report:not(.admin) td[key="a_rent_employee_paid"],
#report:not(.admin) td[key="cash_yesterday"],
#report:not(.admin) td[key="dispatcher_salary"],
#report:not(.admin) td[key="road"],
#report:not(.admin) td[key="advertising"],
#report:not(.admin) td[key="cash_withdrawal"],
#report:not(.admin) td[key="debt"],
#report:not(.admin) td[key="correction"],
#report:not(.admin) td[key="total_cash"],
#report:not(.admin) td[key="clients"],
#report:not(.admin) td:not([key]) {
	display: none;
}

#popup_comment {
	position: absolute;
	display: none;

    padding: 10px;
    box-shadow: 0px 5px 5px 0 #00000078;
	min-height: 40px;
    background: #272727;
    text-align: left;
    font-size: 14px;
    white-space: break-spaces;
	z-index: 9999;
}

#add_apartment {
	display: inline-block;
}

#show_apartment_form {
	display: flex;
	width: 900px;
	gap: 10px;
}

#show_apartment_form .half {
	width: 50%;
	max-height: 500px;
	padding-right: 10px;
	overflow-y: auto;
}

#show_apartment_form .apartment_info label {
	display: inline-block;
	width: 105px;
	white-space: nowrap;
	font-size: 14px;
	vertical-align: top;
	line-height: 25px;
}

#show_apartment_form .half textarea,
#show_apartment_form .apartment_info input {
	display: inline-block;
	width: calc(100% - 110px);
}

#show_apartment_form .rent_info label {
	font-size: 16px;
	font-weight: normal;

}

#show_apartment_form .rent_info .sitem {
	white-space: nowrap;
	padding: 5px;
	font-size: 14px;
}

#show_apartment_form .rent_info .sitem input {
	display: inline-block;
	width: auto;
	height: 30px;
	width: 100px;
	font-size: 12px;
	padding: 3px;
	margin: 0;
	pointer-events: none;
	opacity: .7;
}

#show_apartment_form .rent_info .add_rent .sitem input {
	pointer-events: all;
	opacity: 1;
	cursor: pointer;
}

#show_apartment_form .rent_info .add_rent .sitem select {
	width: 105px;
    display: inline-block;
    margin: 0;
    height: 30px;
    margin-top: 7px;
}

#show_apartment_form .rent_info .add_rent .add_rent_btn {
	margin: 12px 0;
}

/* #show_apartment_form .rent_info .add_rent_btn {
    float: right;
    line-height: 30px;
} */

#show_apartment_form .rent_info .add_rent_btn,
#show_apartment_form .rent_info .start_rent,
#show_apartment_form .rent_info .delete_rent {
	float: right;
	line-height: 20px;
	height: 20px;
	width: 20px;
	text-align: center;
	padding: 0;
	font-size: 11px;
	margin: 5px 0;
}

#show_apartment_form .rent_info .sitem .price {
	width: 60px;
}

#employees .status,
#employees .dispatcher {
	padding: 0;
	min-width: 78px;
}

#employees .status {
	min-width: 105px;
}

#employees .table select {
	width: 100%;
	display: block;
	height: 40px;
	color: #fff;
	background: transparent;
	cursor: pointer;
	border: none;
	outline: none;
}

#employees .table select option {
	color: #000;
	background: #fff;
}

#employees .table select.prepared {
	background: #222;
}

#employees .table select.active {
	background: #2ecc71;
}

#employees .table select.fired {
	background-color: #ee3f3c;
}

#employees .table .comment {
	padding: 0;
	width: 300px;
	height: 40px;
}

#employees .table .comment textarea {
	background: transparent;
	width: 100%;
	height: 40px;
	color: #fff;
	resize: none;
	overflow: auto;
	display: block;
}

#add_employee {
	display: inline-block;
	margin-bottom: 10px;
}

#results td {
	line-height: 20px;
}

#results tbody tr {
	background: #282e33;
	border-bottom: 1px solid #414141;
}

#results tbody tr:nth-child(6n + 2),
#results tbody tr:nth-child(6n + 3),
#results tbody tr:nth-child(6n + 1) {
	background: #1b1d21;
}

#results tbody tr:nth-child(6n + 1) {
	border-top: 3px solid #000;
}

#results tbody tr:nth-child(6n + 3) {
	border-bottom: 3px solid #000;
}

#results td[class^="hours"] {
	padding: 5px 5px;
}

#results thead {
	position: sticky;
	top: 0;
	z-index: 1;
}

#results tbody td:nth-child(1),
#results tbody td.d_name  {
	position: sticky;
	left: 0;
	background: inherit;
	width: 100px;
}

#results tbody td.d_name {
	left: 87px;
}
































































































































































/*TOGGLE NIGHT MOOD*/
#switch_night_mode {
    position: absolute;
    transform: scale(.25);
    top: -33px;
    right: 55px;
}

#switch_night_mode input {
	display: none;
}

#switch_night_mode .toggle {
	position: relative;
	cursor: pointer;
	display: inline-block;
	width: 200px;
	height: 100px;
	background: #211042;
	border-radius: 50px;
	transition: 500ms;
	overflow: hidden;
}

#switch_night_mode .toggle-button {
	position: absolute;
	display: inline-block;
	top: 7px;
	left: 6px;
	width: 86px;
	height: 86px;
	border-radius: 50%;
	background: #FAEAF1;
	overflow: hidden;
	box-shadow: 0 0 35px 4px rgba(255, 255, 255);
	transition: all 500ms ease-out;
}

#switch_night_mode .crater {
	position: absolute;
	display: inline-block;
	background: #FAEAF1;
	border-radius: 50%;
	transition: 500ms;
}

#switch_night_mode .crater-1 {
	background: #FFFFF9;
	width: 86px;
	height: 86px;
	left: 10px;
	bottom: 10px;
}

#switch_night_mode .crater-2 {
	width: 20px;
	height: 20px;
	top: -7px;
	left: 44px;
}

#switch_night_mode .crater-3 {
	width: 16px;
	height: 16px;
	top: 20px;
	right: -4px;
}

#switch_night_mode .crater-4 {
	width: 10px;
	height: 10px;
	top: 24px;
	left: 30px;
}

#switch_night_mode .crater-5 {
	width: 15px;
	height: 15px;
	top: 40px;
	left: 48px;
}

#switch_night_mode .crater-6 {
	width: 10px;
	height: 10px;
	top: 48px;
	left: 20px;
}

#switch_night_mode .crater-7 {
	width: 12px;
	height: 12px;
	bottom: 5px;
	left: 35px;
}

#switch_night_mode .star {
	position: absolute;
	display: inline-block;
	border-radius: 50%;
	background: #FFF;
	box-shadow: 1px 0 2px 2px rgba(255, 255, 255);
}

#switch_night_mode .star-1 {
	width: 6px;
	height: 6px;
	right: 90px;
	bottom: 40px;
}

#switch_night_mode .star-2 {
	width: 8px;
	height: 8px;
	right: 70px;
	top: 10px;
}

#switch_night_mode .star-3 {
	width: 5px;
	height: 5px;
	right: 60px;
	bottom: 15px;
}

#switch_night_mode .star-4 {
	width: 3px;
	height: 3px;
	right: 40px;
	bottom: 50px;
}

#switch_night_mode .star-5 {
	width: 4px;
	height: 4px;
	right: 10px;
	bottom: 35px;
}

#switch_night_mode .star-6,
.star-7,
.star-8 {
	width: 10px;
	height: 2px;
	border-radius: 2px;
	transform: rotate(-45deg);
	box-shadow: 5px 0px 4px 1px #FFF;
	animation-name: travel;
	animation-duration: 1.5s;
	animation-timing-function: ease-out;
	animation-iteration-count: infinite;
}

#switch_night_mode .star-6 {
	right: 30px;
	bottom: 30px;
	animation-delay: -2s;
}

#switch_night_mode .star-7 {
	right: 50px;
	bottom: 60px;
}

#switch_night_mode .star-8 {
	right: 90px;
	top: 10px;
	animation-delay: -4s;
}

@keyframes travel {
	0% {
		transform: rotate(-45deg) translateX(70px);
	}

	50% {
		transform: rotate(-45deg) translateX(-20px);
		box-shadow: 5px 0px 6px 1px #FFF;
	}

	100% {
		transform: rotate(-45deg) translateX(-30px);
		width: 2px;
		height: 2px;
		opacity: 0;
		box-shadow: none;
	}
}

#switch_night_mode input:checked+.toggle {
	background: #24D7F7;
}

#switch_night_mode input:checked+.toggle .toggle-button {
	background: #F7FFFF;
	transform: translateX(102px);
	box-shadow: 0 0 35px 5px rgba(255, 255, 255);
}

#switch_night_mode input:checked+.toggle .toggle-button .crater {
	transform: rotate(-45deg) translateX(70px);
}

#switch_night_mode input:checked+.toggle .star {
	animation: move 2s infinite;
	transform: none;
	box-shadow: none;
}

#switch_night_mode input:checked+.toggle .star-1 {
	width: 40px;
	height: 10px;
	border-radius: 10px;
	background: #FFF;
	left: 20px;
	top: 25px;
	box-shadow: none;
}

#switch_night_mode input:checked+.toggle .star-2 {
	width: 12px;
	height: 12px;
	background: #FFF;
	left: 26px;
	top: 23px;
	box-shadow: -1px 0 2px 0 rgba(0, 0, 0, 0.1);
}

#switch_night_mode input:checked+.toggle .star-3 {
	width: 16px;
	height: 16px;
	background: #FFF;
	left: 35px;
	top: 19px;
	box-shadow: -1px 0 2px 0 rgba(0, 0, 0, 0.1);
}

#switch_night_mode input:checked+.toggle .star-4 {
	width: 14px;
	height: 14px;
	background: #FFF;
	left: 46px;
	top: 21px;
	box-shadow: -1px 0 2px 0 rgba(0, 0, 0, 0.1);
}

#switch_night_mode input:checked+.toggle .star-5 {
	width: 60px;
	height: 15px;
	border-radius: 15px;
	background: #FFF;
	left: 30px;
	bottom: 20px;
	box-shadow: none;
}

#switch_night_mode input:checked+.toggle .star-6 {
	width: 18px;
	height: 18px;
	background: #FFF;
	border-radius: 50%;
	left: 38px;
	bottom: 20px;
	box-shadow: -1px 0 2px 0 rgba(0, 0, 0, 0.1);
}

#switch_night_mode input:checked+.toggle .star-7 {
	width: 24px;
	height: 24px;
	background: #FFF;
	border-radius: 50%;
	left: 52px;
	bottom: 20px;
	box-shadow: -1px 0 2px 0 rgba(0, 0, 0, 0.1);
}

#switch_night_mode input:checked+.toggle .star-8 {
	width: 21px;
	height: 21px;
	background: #FFF;
	border-radius: 50%;
	left: 70px;
	top: 59px;
	box-shadow: -1px 0 2px 0 rgba(0, 0, 0, 0.1);
}


@keyframes move {
	0% {
		transform: none;
	}

	25% {
		transform: translateX(2px);
	}

	100% {
		transform: translateX(-2px);
	}
}

@media screen and (max-width: 1024px) {
	/* header,
	header nav {
		flex-direction: column;
	} */

	#to_top {
		margin-left: 55px;
	}

	#switch_night_mode {
		top: -23px;
	}

	header {
		padding: 8px;
	}

	main#chat {
		padding: 0;
	}

	.form {
		padding: 5px;
	}

	.modal {
		overflow: auto;
	}

	.modal .overlay span {
		position: absolute;
		top: 12px;
		right: 20px;
		z-index: 1000;
		color: #fff;
		font-family: monospace;
		font-size: 32px;
		line-height: 22px;
		padding: 3px;
	}

	#alerts {
		top: 10px;
		bottom: auto;
	}

	#show_apartment_form {
		overflow-y: auto;
    	max-height: 700px;
	}

	#show_apartment_form .half {
		border-bottom: 1px solid #333;
	}

	.modal>form {
		max-height: 100vh;
		width: 100% !important;
		flex-direction: column;
		align-items: center;
		overflow: auto;
		padding: 20px 10px;
	}

	.modal>form>* {
		width: 95% !important;
	}

	.modal>form .sitem {
		display: flex;
		flex-wrap: wrap;
		align-items: center;
		gap: 5px;
	}

	/* #menu__toggle {
		display: block;
		opacity: 0;
	} */
	
	#menu__toggle:checked+.menu__btn>span {
		transform: rotate(45deg);
	}
	
	#menu__toggle:checked+.menu__btn>span::before {
		top: 0;
		transform: rotate(0deg);
	}
	
	#menu__toggle:checked+.menu__btn>span::after {
		top: 0;
		transform: rotate(90deg);
	}
	
	#menu__toggle:checked~nav {
		left: 0 !important;
	}
	
	.menu__btn {
		display: block;
		position: fixed;
		top: 27px;
		left: 20px;
		width: 26px;
		height: 26px;
		cursor: pointer;
		z-index: 1000001;
	}
	
	.menu__btn>span,
	.menu__btn>span::before,
	.menu__btn>span::after {
		display: block;
		position: absolute;
		width: 100%;
		height: 2px;
		background-color: #616161;
		transition-duration: .25s;
	}
	
	.menu__btn>span::before {
		content: '';
		top: -8px;
	}
	
	.menu__btn>span::after {
		content: '';
		top: 8px;
	}
	
	header nav {
		display: block;
		position: fixed;
		top: 0;
		left: -100%;
		width: 300px;
		height: 100%;
		padding: 40px 0;
		background-color: #212121;
		box-shadow: 2px 2px 6px rgb(0 0 0 / 40%);
		transition: .3s;
		z-index: 1000000;
	}
	
	header nav a {
		display: block;
	}
	
	header nav a:hover {
		background-color: #CFD8DC;
	}
	
	    /* таблица с кнопками "редактировать и удалить" некорректно всплывает,
		на последнем сообщение невозможно нажать кнопку удалить*/
	#chat_window {
/*		height: calc(100vh - 60px);*/
		height: calc(100vh - 120px); 
	}
}

@media screen and (max-width: 768px) {
	.modal:not(.hidden)#chat_hints {
		height: 83vh;
		display: flex;
		justify-content: flex-end;
		flex-direction: column;
		background-color: rgba(61, 61, 61, .9);
	}
}

@media screen and (max-width: 425px) {
	#show_apartment_form .rent_info .sitem {
		justify-content: center;
	}
}