/* АДАПТИВ СТРАНИЦЫ АВТОРИЗАЦИИ */

@media screen and (max-width: 768px){
    #door form{
        margin-top: 50px;
        padding: 30px 20px;
    }
    #door form p label{
        font-size: 20px;
    }
    .submit_form input{
        font-size: 23px;
    }
}

/* АДАПТИВ ГЛАВНОЙ ПАНЕЛИ */

@media screen and (max-width: 1200px){
    #functions a{
        width: 32%;
    }
}

@media screen and (max-width: 950px) {
    #top_container{
        flex-direction: column;
        align-items: flex-start;
    }
    #top_container h1{
        margin-left: 0;
        margin-top: 15px;
    }

    #functions a{
        width: 48%;
    }

    .project_panel{
        width: 100%;
        font-size: 17px;
    }
}

@media screen and (max-width: 600px){
    #top_container h1{
        font-size: 21px;
    }
    #functions{
        justify-content: center;
    }
    #functions a{
        width: 80%;
    }
}

/* АДАПТИВ ДНЕВНИКА РАБОТНИКОВ */

@media screen and (max-width: 850px){
    .worker_element{
        width: 550px;
        max-width: 100%;
        padding: 25px;
        border: 2px solid #eee;
        border-radius: 5px;
        margin: 30px auto 0;
        background: #fafafa;
    }
    .worker_element form{
        flex-direction: column;
    }

    .diary_name, .project_diary, .partic_diary{
        width: 100%;
        border: none;
    }

    .worker_element:first-child .diary_name,
    .worker_element:first-child .partic_diary,
    .worker_element:first-child .project_diary,
    .worker_element:first-child .sub_diary{
        border: none;
    }

    .diary_name, .worker_element:first-child .diary_name{
        width: 170px;
        background: #b92323;
        color: #fff;
        border-left: 5px solid #ffd700;
        border-top-right-radius: 5px;
        border-bottom-right-radius: 5px;
        text-align: center;
    }

    .project_diary, .partic_diary{
        margin-top: 15px;
    }

    .project_diary select, .partic_diary select{
        border: 1px solid #999;
        border-radius: 5px;
        background: #fff;
    }

    .sub_diary{
        width: 100%;
        margin-top: 20px;
        border: none;
    }
    .sub_diary input{
        width: 170px;
        border-radius: 5px;
        margin-left: auto;
    }

    .fill_project, .fill_participation, .fill_name_ceo, .name_ceo_diary{
        padding: 15px 10px;
    }

    .fill_name_worker{
        background: #eee!important;
        color: #888!important;
        border-left: 5px solid #888!important;
    }
}

@media screen and (max-width: 500px){
    #dates_diary{
        flex-direction: column;
        align-items: center;
    }
    .today{
        margin-left: 0;
        margin-top: 30px;
    }
}


/* АДАПТИВ СПИСКА РАБОТНИКОВ */

@media screen and (max-width: 800px){
    #add_worker_form div p{
        width: 100%;
    }
}

@media screen and (max-width: 600px){
    .worker{
        flex-direction: column;
    }
    .left_worker{
        width: 100%;
    }
    .right_worker{
        margin-top: 8px;
        width: 100%;
        display: flex;
        justify-content: flex-start;
    }
    .right_worker p:nth-child(2){
        margin-top: 0;
        margin-left: 8px;
    }
}

/* АДАПТИВ СПИСКА РУКОВОДИТЕЛЕЙ */

@media screen and (max-width: 800px){
    #add_user_form div p{
        width: 100%;
    }
}

@media screen and (max-width: 600px){
    .user_ceo{
        flex-direction: column;
    }
    .left_user_ceo{
        width: 100%;
    }
    .right_user_ceo{
        margin-top: 8px;
        width: 100%;
        display: flex;
        justify-content: flex-start;
    }
    .right_user_ceo p:nth-child(2){
        margin-top: 0;
        margin-left: 8px;
    }
}

@media screen and (max-width: 600px){
    .cont_edit > div > div{
        flex-direction: column;
    }
    .cont_edit > div > div input[type='submit']{
        margin-left: 0;
        margin-top: 10px;
    }
}

/* АДАПТИВ СПИСКА ЗАЯВОК */

@media screen and (max-width: 1024px){
    #application_calculations{
        display: flex;
        justify-content: flex-start;
        flex-wrap: wrap;
    }
    .calculation_element{
        flex-direction: column;
        width: 30%;
        margin: 10px;
        padding: 20px;
    }
    .calculation_element:first-child{
        display: none;
    }
    .calculation_element p:nth-child(1),
    .calculation_element p:nth-child(2),
    .calculation_element p:nth-child(3),
    .calculation_element p:nth-child(4){
        width: 100%;
        border: none;
        padding: 5px 0;
        font-size: 14px;
    }
    .calculation_element p:nth-child(2):before{
        content: 'Менеджер: ';
    }
    .calculation_element p:nth-child(3):before{
        content: 'Описание: ';
    }
    .calculation_element p:nth-child(4):before{
        content: 'Дата добавления: ';
    }
}

@media screen and (max-width: 768px){
    #application_calculations{
        justify-content: space-between;
    }
    .calculation_element{
        width: 48%;
        margin: 10px 0;
    }
}

@media screen and (max-width: 600px){
    .calculation_element{
        width: 100%;
    }
}

/* Адаптив заявок на логистику */

@media screen and (max-width: 1024px){
    #types_logistics{
        flex-direction: column;
        justify-content: flex-start;
        align-items: flex-start;
    }
    #types_logistics a{
        margin-right: 0;
        margin-top: 15px;
        text-align: left;
    }
    #types_logistics a:first-child{
        margin-top: 0;
    }
}

@media screen and (max-width: 768px){
    #types_logistics a{
        font-size: 16px;
    }

    #list_logistics{
        display: flex;
        justify-content: space-between;
        align-items: stretch;
        flex-wrap: wrap;
    }
    .line_logistic_table{
        flex-direction: column;
        width: 48%;
        margin: 20px 0;
        padding: 15px;
    }

    .line_logistic_table:first-child{
        display: none;
    }

    .line_logistic_table p:nth-child(1),
    .line_logistic_table p:nth-child(2),
    .line_logistic_table p:nth-child(3),
    .line_logistic_table p:nth-child(4){
        width: 100%;
        border: none;
        padding: 0;
        margin: 5px 0;
    }
}

@media screen and (max-width: 600px){
    .line_logistic_table {
        width: 100%;
        margin: 10px 0;
    }
}

/* Добавление новой заявки на логистику */

@media screen and (max-width: 700px){
    .form_logistic div > p{
        width: 100%;
    }
    .form_logistic div > p label{
        font-size: 14px;
    }
    .custom-radio{
        padding-left: 0!important;
    }
}

/* Адаптив заявки на логистику */

@media screen and (max-width: 700px) {
    .table_applications {
        font-size: 14px;
    }
}

/* АДАПТИВ ЧАТА */

@media screen and (max-width: 700px){
    #messages{
        width: 90%;
    }
}

@media screen and (max-width: 500px){
    #messages{
        margin: 0 auto 300px;
    }
    #messages > div{
        width: 90%;
        margin-top: 30px;
    }

    #add_message_form div{
        flex-direction: column;
    }

    #add_message_form input[type='submit']{
        margin-top: 10px;
    }
}

/* АДАПТИВ СПИСКА ПРОЕКТОВ */

@media screen and (max-width: 1024px){
    #project_list_panel{
        display: flex;
        justify-content: flex-start;
        flex-wrap: wrap;
    }
    .project_panel{
        flex-direction: column;
        width: 30%;
        margin: 10px;
        padding: 20px;
        border-top: 1px solid #ccc;
    }
    .project_panel:first-child{
        display: none;
    }
    .project_panel p:nth-child(1),
    .project_panel p:nth-child(2),
    .project_panel p:nth-child(3),
    .project_panel p:nth-child(4){
        width: 100%;
        border: none;
        padding: 5px 0;
        font-size: 14px;
    }
    .project_panel p:nth-child(1){
        font-weight: bold;
    }
    .project_panel p:nth-child(2):before{
        content: 'Описание: ';
    }
    .project_panel p:nth-child(3):before{
        content: 'Руководитель: ';
    }
    .project_panel p:nth-child(4):before{
        content: 'Дата открытия: ';
    }
}

@media screen and (max-width: 768px){
    #project_list_panel{
        justify-content: space-between;
    }
    .project_panel{
        width: 48%;
        margin: 10px 0;
    }
}

@media screen and (max-width: 600px){
    .project_panel{
        width: 100%;
    }
}

/* АДАПТИВ СТРАНИЦЫ ПРОЕКТА */

@media screen and (max-width: 1024px) {
    .cont_ip{
        width: 65%;
    }
}

@media screen and (max-width: 850px) {
    #information_project section{
        flex-direction: column;
        align-items: flex-start;
    }
    .cont_ip{
        width: 100%;
        margin-top: 20px;
    }
    .show_h3{
        display: none;
    }
    .hide_h3{
        display: block;
    }
}

@media screen and (max-width: 650px){
    #materials, #contractors, #supple_agreem, #receiving{
        padding: 30px 15px;
    }

    #add_form_material div p, #edit_form_material div p, .plus_payment div p,
    #add_form_contractor div p, #edit_form_contractor div p,
    #add_form_rec div p, #edit_form_rec div p
    {
        width: 48%;
    }
    #add_form_material .add_material_sub, #edit_form_material .edit_material_sub, .plus_payment .payment_sub,
    #add_form_contractor .add_contractor_sub, #edit_form_contractor .edit_contractor_sub,
    #add_form_rec .add_rec_sub, #edit_form_rec .edit_rec_sub
    {
        width: 48%;
        margin-top: 15px;
        margin-left: auto;
    }

    #supple_agreem table .operations a{
        display: block;
        width: 100%;
    }
    #supple_agreem table .operations a:last-child{
        margin-left: 0;
        margin-top: 5px;
    }

    #add_supple_agreem div p, #edit_supple_agreem div p{
        width: 100%;
        margin-top: 8px;
    }

    #add_supple_agreem .add_agreem_sub, #edit_supple_agreem .edit_agreem_sub{
        width: 40%;
        margin-top: 15px;
        margin-left: auto;
    }

}

@media screen and (max-width: 500px){
    #container_project{
        width: 96%;
    }
    .cont_ip{
        padding: 20px 7px;
    }
    .elem_info_project div p{
        font-size: 13px;
    }
    #information_project h3{
        font-size: 17px;
    }
    .elem_info_project form input[type='text'], .elem_info_project form textarea{
        font-size: 14px;
    }
    .elem_info_project form input[type='submit']{
        font-size: 14px;
    }

}

@media screen and (max-width: 430px){
    #add_form_material div p, #edit_form_material div p, .plus_payment div p,
    #add_form_contractor div p, #edit_form_contractor div p,
    #add_form_rec div p, #edit_form_rec div p
    {
        width: 100%;
    }
}


/* Страница месячных отчетов */

@media screen and (max-width: 920px){
    .every_days_reports{
        width: 320px;
        max-width: 100%;
        margin-left: 0;
        margin-top: 30px;
    }
}

@media screen and (max-width: 830px){
    .titles_table_report{
        display: none;
    }
    .worker_report_tr{
        border: 1px solid #999;
        border-radius: 5px;
        margin-top: 25px;
    }
    .worker_report_tr:first-child{
        margin-top: 0;
    }
    .worker_report_tr p{
        width: 100%;
        border-bottom: none;
        border-left: none;
        padding: 10px;
        border-top: 1px dashed #aaa;
    }
    .worker_report_tr p:last-child{
        border-right: none;
    }
    .worker_report_tr p:first-child{
        border-top: none;
    }
    .work_time_report:before{
        content: 'Рабочее время: ';
    }
    .vacation_worker_report:before{
        content: 'Отпускное время: ';
    }
    .disease_worker_report:before{
        content: 'Больничное время: ';
    }
}

@media screen and (max-width: 700px){
    #month_reports a{
        width: 32%;
    }
}

@media screen and (max-width: 650px){
    #year_reports form{
        width: 350px;
        max-width: 100%;
        margin-left: 0;
        margin-top: 15px;
    }
}

@media screen and (max-width: 550px){
    .every_days_reports{
        margin-left: 0;
        margin-top: 25px;
        width: 100%;
    }
}

/* Страница ежедневных отчетов */

@media screen and (max-width: 830px){
    .titles_day_report{
        display: none;
    }
    .report_element{
        border: 1px solid #999;
        border-radius: 5px;
        margin-top: 25px;
    }
    .report_element:first-child{
        margin-top: 0;
    }
    .report_element p{
        width: 100%;
        padding: 10px;
        border-bottom: none;
        border-left: none;
        border-top: 1px dashed #aaa;
    }
    .report_element:nth-child(2) p{
        border-top: 1px dashed #aaa;
    }
    .report_element p:last-child{
        border-right: none;
    }
    .report_element p:nth-child(2){
        border-top: none!important;
    }
    .delete_diary{
        top: 50%;
        right: 10px;
    }
    .overtime_diary{
        top: 20%;
        right: 10px;
    }
    .report_element p:nth-child(4):before{
        content: 'Объект: ';
    }
    .report_element p:nth-child(5):before{
        content: 'Участие: ';
    }
    .report_element p:nth-child(6):before{
        content: 'Добавил запись: ';
    }


    #add_article_diary p{
        width: 100%;
        margin-top: 10px;
        border-right: none;
        border-bottom: none;
        border-top: none;
    }
    #add_article_diary p:nth-child(5){
        border-left: none;
    }
    #add_article_diary p select{
        border: 1px solid #aaa;
    }

}


/* Страница работника */

@media screen and (max-width: 500px) {
    #table_diary_worker td{
        font-size: 13px;
    }
}