html, body {
  height: 100%;
}

#page {
  clear: both;
  min-height: 100%;
  height: auto !important;
  height: 100%;
  margin-bottom: -72px;
}

#page.wide {
    width: 100%; 
    padding-top: 40px;  
}

#page.wide #page_inner {
    padding: 0 20px;   
}

#page.wide h1,
#page.wide h2,
#page.wide h3 {
    text-align: center;
    margin: 3px;
}

#page.wide h1 {
    font-size: 17px;
    line-height: 20px;
}

#page.wide h2 {
    font-size: 15px;
    line-height: 17px;
}

#page.wide h3 {
    font-size: 13px;
    line-height: 11px;
    margin-bottom: 8px;
}

#page #layout_footer {
  height: 72px;

}

#footer {
  clear: both;
  position: relative;
  height: 72px;
  padding-left: 50px;
  margin-top: 70px;
}

#page {
    padding-top: 60px;
}

#day_view > div {
    width: 234px;
    float: left;
    text-align: center;
}

#day_view  .label {
    padding: 3px 7px;
    margin: 5px 0;
}

.workers {
    text-align: center;
    margin-bottom: 20px;
    padding: 10px 15px;
    background-color: #f9f9f9;
}

.workers .left_nav {
    color: #b94a48;
    font-weight: bold;
}

.workers .masters {
    margin-bottom: 10px;
}

.workers .masters span {
    background-color: #468847;
    color: #ffffff;
    padding: 3px 5px;
    border-radius: 3px;
}

#day_view  .workers form {
    margin: 0;
}

#day_view .detail-view th {
    width: 40px;
}

#day_view a.add {
    visibility: hidden;
    padding: 0 8px;
}

#day_view tr:hover a.add {
    visibility: visible;
}

#day_view .table-condensed th,
#day_view .table-condensed td {
    padding: 0;
}

#day_view a.edit {
    padding: 0 8px;
    overflow: hidden;
    height: 20px;
    width: 168px;
    display: block;
    position: absolute;
    background: rgba(192, 192, 255, 0.44);
    border: 1px solid #0088cc;
    margin: 0 5px;
}

#day_view a.m30 {
    height: 21px;   
}
#day_view a.m60 {
    height: 42px;   
}
#day_view a.m90 {
    height: 63px;   
}
#day_view a.m120 {
    height: 84px;   
}
#day_view a.m150 {
    height: 105px;   
}
#day_view a.m180 {
    height: 126px;   
}
#day_view a.m210 {
    height: 147px;   
}
#day_view a.m240 {
    height: 168px;   
}
#day_view a.m270 {
    height: 189px;   
}
#day_view a.m300 {
    height: 210px;   
}
#day_view a.m330 {
    height: 231px;   
}
#day_view a.m360 {
    height: 252px;   
}
#day_view a.m390 {
    height: 273px;   
}
#day_view a.m420 {
    height: 294px;   
}
#day_view a.m450 {
    height: 315px;   
}
#day_view a.m480 {
    height: 336px;   
}
#day_view a.m510 {
    height: 357px;   
}
#day_view a.m540 {
    height: 378px;   
}

#new_order {
    width: 70%;
    margin-left: -35%;
    top: 3%;
    position: absolute;
    font-size: 0;
}

#new_order .created_by {
    font-size: 13px;
    font-style: italic;
    margin-top: 30px;
}

.this_week {
    clear: both;
}

.this_week > * {
    width: 16%;
    text-align: center;
    display: inline-block;
    font-size: 17px;
}

@media screen and (max-width: 1000px) {
    #new_order {
        width: 95%;
        margin-left: 0;
    }
    
    .this_week > * {
        width: 50%;
    }
    
    /*#month_view .day0 {
        display: none;   
    }*/
}

#new_order .modal-body {
    max-height: initial;
}

#new_order .left_half {
    display: inline-block;
    vertical-align: top;
    width: 50%;
    font-size: 14px;
}

#new_order .right_half {
    display: inline-block;
    vertical-align: top;
    width: 50%;
    font-size: 14px;
}

body .dropdown-menu {
    z-index: 2000;   
}

.wide #current_date_form,
.wide #current_date_form .input-append {
    margin: 0;
}

.wide #current_date_form {
    position: absolute;
    top: 50px;
}

#month_view > div > div {
    font-size: 0;
    display: inline-block;
    vertical-align: top;
    width: 94%;
}

#month_view .day-times {
    width: 4%;
    display: inline-block;
    text-align: center;
    padding-top: 70px;
    font-size: 12px;
    line-height: 29px;
}

#month_view .day-times > div {
    border-bottom: 1px solid #333333;
}

#month_view .day-times.headless {
    padding-top: 1px;
}

#month_view .day {
    width: 15.7%;
    min-height: 142px;
    display: inline-block;
    vertical-align: top;
    font-size: 0;
    margin: 0;
    border: 1px solid #A0A0A0;
    -webkit-transition: background 0.5s ease;
}

#month_view .day.thin {
    width: 13.4%;
}

#month_view .day.disabled {
    background: #f5f5f5;
}

#month_view .day.headless {
    min-height: 116px;
}

#month_view .day:hover {
    background: #F9F9F9;
}

#month_view .day:first-child:hover {
    background: none;   
}

#month_view .record {
    background: rgb(165, 255, 180);
    cursor: pointer;
    font-size: 11px;
    line-height: 15px;
    height: 135px;
    position: absolute;
    width: 100%;
    overflow: hidden;
    box-sizing: border-box;
    border-bottom: 1px solid rgba(51, 51, 51, 0.5);
    border-top: 1px solid rgba(51, 51, 51, 0.5);
}

#month_view .record:hover {
    overflow: visible;  
    z-index: 70;
    height: auto !important;
    background: rgb(206, 255, 214);
    border: 1px solid #333333;
    box-shadow: 0px 0px 10px 7px #fff;
}

#month_view .record.duration8:hover,
#month_view .record.duration9:hover {
    height: 135px !important;
}

#month_view .record.type14 {
    background: #bdbdbd;
}

#month_view .record .title {
    display: inline-block;
    vertical-align: top;
    padding: 3px 5px;
    box-sizing: border-box;
}

#month_view .record.duration1 .title {
    padding: 0 5px;
}

#month_view .record:after {
    content: '';
    display: inline-block;
    vertical-align: middle;
    height: 100%;
}

#month_view .record.duration1 {
    height: 15px;
}

#month_view .record.duration2 {
    height: 30px;
}

#month_view .record.duration3 {
    height: 45px;
}

#month_view .record.duration4 {
    height: 60px;
}

#month_view .record.duration5 {
    height: 75px;
}

#month_view .record.duration6 {
    height: 90px;
}

#month_view .record.duration7 {
    height: 105px;
}

#month_view .record.duration8 {
    height: 120px;
}

#month_view .record.start0900 {
    top: 0;
}

#month_view .record.start0930 {
    top: 7px;
}

#month_view .record.start1000 {
    top: 15px;
}

#month_view .record.start1030 {
    top: 22px;
}

#month_view .record.start1100 {
    top: 30px;
}

#month_view .record.start1130 {
    top: 37px;
}

#month_view .record.start1200 {
    top: 45px;
}

#month_view .record.start1230 {
    top: 52px;
}

#month_view .record.start1300 {
    top: 60px;
}

#month_view .record.start1330 {
    top: 67px;
}

#month_view .record.start1400 {
    top: 75px;
}

#month_view .record.start1430 {
    top: 82px;
}

#month_view .record.start1500 {
    top: 90px;
}

#month_view .record.start1530 {
    top: 97px;
}

#month_view .record.start1600 {
    top: 105px;
}

#month_view .record.start1630 {
    top: 112px;
}

#month_view .record.start1700 {
    top: 120px;
}

#month_view .record.start1730 {
    top: 127px;
}

#month_view a,
#month_view .records {
    display: block;
    padding: 10px;
    text-decoration: none;
    color: #333333;
    font-size: 14px;
}

#month_view .day > a {
    padding: 3px 10px;
    font-size: 12px;
    line-height: 29px;
}

#month_view .day .records {
    position: relative;
    padding: 0;
    border-top: 1px solid #333333;
}

#month_view .day .records > a {
    height: 29px;
    font-size: 11px;
    line-height: 29px;
    padding: 0 5px;
    border-bottom: 1px solid #333333;
    color: #0088cc;
}

#month_view .day.headless .records {
    border-top: none;
}

#month_view .day_shift_0 {
    width: 840px;
    margin: 2px 78px;
    border: none;
    padding: 0;
}

#month_view .day_shift_1 {
    width: 0;
    margin: 0;
    border: none;
    padding: 0;
}

#month_view .day_shift_2 {
    width: 160px;
    border: none;
    padding: 0;
}

#month_view .day_shift_3 {
    width: 280px;
    margin: 2px 26px;
    border: none;
    padding: 0;
}

#month_view .day_shift_4 {
    width: 420px;
    margin: 2px 39px;
    border: none;
    padding: 0;
}

#month_view .day_shift_5 {
    width: 560px;
    margin: 2px 52px;
    border: none;
    padding: 0;
}

#month_view .day_shift_6 {
    width: 700px;
    margin: 2px 65px;
    border: none;
    padding: 0;
}

#month_view .date_caption {
    float: right;
}

#month_view .headless .date_caption {
    display: none;
}

#month_view .date-week-day {
    display: inline-block;
    vertical-align: top;
    color: #468847;
    font-weight: bold;
    font-size: 12px;
    margin-bottom: 10px;
}

#month_view .headless .date-week-day {
    display: none;
}

#month_view .disabled .date-week-day {
    color: #999999;
}

.wide #month_view .day .date-week-day {
    margin-bottom: 3px;
}

#month_view .worker {
    margin: 0;
    font-size: 11px;
    line-height: 15px;
    height: 45px;
    overflow: hidden;
    padding: 0 3px;
}

#month_view .headless .worker {
    display: none;
}

#month_view .worker .away {
    color: #b94a48;
}

#timetable_view .head {
    padding-left: 146px;
    margin-bottom: 1px;
}

#timetable_view .head span {
    width: 23px;
    margin: 0 1px;
    text-align: center;
}

#timetable_view .line {
    border: 1px solid transparent;
    height: 28px;
}

#timetable_view .line:hover {
    border: 1px solid #A0A0A0;
}

#timetable_view .cell, #legend .cell {
    width: 31px;
    height: 27px;
    line-height: 27px;
    margin: 1px;
    float: left;
    padding: 0;
    text-align: center;
    background: #f3f3f3;
    cursor: pointer;
    -webkit-transition: background 0.5s ease;
}

#timetable_view .cell.status0:hover {
    background: #D1D1D1;
}

#timetable_view .cell.status1, #legend .cell.status1 {
    background: #b94a48;
}

#timetable_view .cell.status1:hover {
    background: #CE7270;
}

#timetable_view .cell.status2, #legend .cell.status2 {
    background: #468847 url('../../../images/master_icon.png') no-repeat 50% 50%;
}

#timetable_view .cell.status2:hover {
    background-color: #5CB45D;
}

#timetable_view .cell form {
    display: none;
}

#timetable_view .cell.first {
    width: 138px;
    text-align: left;
    cursor: initial;
    padding-left: 5px;
}

#timetable_view .cell .update {
    display: none;
    position: absolute;
    margin-top: -63px;
    height: 59px;
    width: 99px;
    background: #fff;
    border: 1px solid #A0A0A0;
    padding: 1px;
}

#timetable_view .cell:hover .update {
    display: block;   
}

#timetable_view .cell .update .comment {
    width: 89px;
    padding: 3px;
}

#legend .descr {
    float: left;
    line-height: 27px;
    padding-left: 4px;
    padding-right: 25px;
}

.left_nav {
    width: 50%;
    text-align: left;
    float: left;
}

.right_nav {
    width: 50%;
    text-align: right;
    float: left;
}

.wide .left_nav {
    position: absolute;
    margin-top: 19px;
}

.wide .right_nav {
    position: absolute;
    margin-top: 19px;
    right: 20px;
}

.aright {
    text-align: right;
}

.clearb {
    clear: both;
}

#content .grid-view .button-column {
    width: 80px;
}

.form .row {
    margin-left: 0;
}

.day-view-date {
    width: 210px;
    display: inline-block;
    vertical-align: top;
}

.week-day {
    display: inline-block;
    vertical-align: top;
    line-height: 30px;   
}

#page #rights .flashes {
    position: relative;
    top: 0;
    left: 0;
}

@media (max-width: 979px) {
    body {
        padding-top: 70px !important;
    }

    .navbar-fixed-top {
        position: fixed !important;
        margin: 0 !important;
    }

    .nav-collapse.collapse {
        height: 100vh !important;
    }

    #page.wide #page_inner {
        padding: 0;
    }

    .wide #current_date_form {
        top: 70px;
        margin-left: -5px;
    }

    .wide .left_nav {
        position: static;
        margin-left: -5px;
        width: 55%;
    }

    #month_view .day-times {
        width: 6%;
    	padding-top: 93px;
    }

    #month_view .day-times.headless {
       padding-top: 93px;
    }

    #month_view .day.headless {
        min-height: 142px;
    }

    #month_view .headless .date-week-day {
        display: inline-block;
    }

    #month_view .headless .date_caption {
        display: block;
    }

    #month_view .headless .worker {
        display: block;
    }

	#month_view .date_caption {
    	float: none;
        margin-left: 4px;
	}

    #month_view > div > div {
        width: 92%;
        margin-bottom: 20px;
    }

    #month_view > div > div > div {
        width: 102%;
    }

    #month_view .day.thin {
        width: 100%;
    }

	#new_order .left_half {
	    padding-right: 10px;
    	box-sizing: border-box;
	}

    #new_order .help-block {
        display: none;
    }

    #new_order #order_date {
        width: 40%;
        display: inline-block;
        vertical-align: top;
    }

    #new_order #order_date input {
        width: 80%;
    }

    #new_order .input-append,
    #new_order select {
        display: inline-block;
        vertical-align: top;
    }

    #new_order #order_time {
        width: 110%;
        margin-left: 20px;
    }

    #new_order label[for="Auto_model_id"],
    #new_order label[for="Auto_brand_id"],
    #new_order label[for="Order_type_id"],
    #new_order label[for="phone"],
    #new_order label[for="Client_name"],
    #new_order label[for="Order_hours"],
    #new_order label[for="Order_box_id"],
    #new_order label[for="Order_price"],
    #new_order label[for="Order_regnumber"] {
        display: inline-block;
        vertical-align: top;
        width: 37%;
    }

    #new_order #Auto_model_id,
    #new_order #Order_regnumber,
    #new_order #Order_type_id,
    #new_order #Client_phone,
    #new_order #Client_name,
    #new_order #Order_hours,
    #new_order #Order_box_id,
    #new_order #Order_price,
    #new_order #Auto_brand_id {
        width: 60%;
        display: inline-block;
        vertical-align: top;
    }

    #new_order #Client_phone {
        width: 53%;
    }

    #new_order label[for="Order_regnumber"] {
        font-size: 12px;
        line-height: 14px;
    }

    #new_order label[for="Order_hours"] {
        font-size: 10px;
        line-height: 12px;
    }

    #new_order #Auto_description {
        height: 150px;
        margin-bottom: 0;
    }

    .modal-header {
        padding-top: 5px !important;
        padding-bottom: 5px !important;
    }

    .modal-body {
        padding-top: 5px !important;
        padding-bottom: 0 !important;
    }
}

@media (max-width: 600px) {
	#month_view .day-times {
    	background: url('/images/swipe-icon.jpg') no-repeat 0 0;
        width: 15%;
	}

 	#month_view > div > div {
        width: 83%;
	}

	#new_order .left_half,
    #new_order .right_half {
        width: 100%;
    }
}