body {
    font-family: 'Arial', sans-serif;
    margin: 0;
    padding: 0;
    overflow: hidden;
}

.background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #44E5EB, #191970); /* Градиентный фон */
    z-index: -1;
}

/* ФИО аккаунта */
.user-info span {
    font-size: 25px;
    color: red;
}

/* Кнопка выйти */
#logout-btn {
    padding: 5px 10px;
    font-size: 14px;
    cursor: pointer;
    border: none;
    border-radius: 5px;
    background-color: #2575fc;
    color: white;
    transition: background-color 0.3s ease;
}

/* Кнопка выйти */
#logout-btn:hover {
    background-color: #1a5bbf;
}

/* Общий фоновый белый контейнер */
.container {
    padding: 20px;
    /*width: 50vw;*/
    margin: 65px auto 0; /* Смещение вниз на 50px + 20px */
    background: rgba(255, 255, 255, 0.95);
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    max-height: 85vh;
    overflow-y: scroll;
}

button {
    padding: 0.75rem;
    background-color: #009CE0;  //До нажатия на кнопку Войти
    color: white;
    border: none;
    border-radius: 4px;
    color: white;
    font-size: 1rem;
    cursor: pointer;
    transition: background-color 0.3s ease;
    height: 45px;
    padding: 10px 20px;
    font-size: 16px;
}

button:hover {
    background-color: #1a5bbf;
}


.contract__contrainer {
    display: flex;
}

.contract__info {
    flex: 0 0 80%;
}

.contract__history {
    flex: 0 0 20%;
    min-width: 150px;
}

.contract__version {
    margin-bottom: 10px;
    border-left: 5px solid;
    border-radius: 5px;
    background-color: white;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    padding: 5px;

}

.contract__version:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.version__username {
    font-size: 12px;
}

.version__type {
    color: #000000;
    cursor: pointer;
}

.version__changes {
    margin: 0;
    padding: 0;
}

.version__change {
    list-style: None;
    
}

/* new styles page */

.hide {
    display: none;
}

/* datepicker */
.ui-datepicker {
    border: 1px solid #ebebeb !important;
    padding: 10px !important;
    color: #899ca8;
    font-size: 13px !important;
    font-family: "Open Sans", sans-serif !important;
}
.ui-datepicker .ui-widget-header,
.ui-datepicker .ui-state-default, .ui-datepicker .ui-widget-content .ui-state-default,
.ui-datepicker .ui-widget-header .ui-state-default {
    border: none !important;
    background: transparent !important;
}
.ui-datepicker table {
    font-size: 1.1em !important;
}
.ui-datepicker td {
    vertical-align: middle !important;
}
.ui-datepicker td span, .ui-datepicker td a {
    padding: .3em !important;
    text-align: center !important;
    color: #899ca8 !important;
}
.ui-datepicker td a:hover {
    color: #303030 !important;
}
.ui-datepicker .ui-state-hover {
    border: none !important;
    background: transparent !important;
}
.ui-datepicker .ui-state-default.ui-state-highlight {
    background: #ffd542 !important;
    border-radius: 100% !important;
    line-height: 17px !important;
    height: 26px !important;
    color: #303030 !important;
}
/* datepicker */

.menu-sidebar {
    position: relative;
    width: 292px;
    flex: 0 0 292px;
    height: 100vh;
    display: flex;
    flex-direction: column;
    background: #fff;
    color: #1f2937;
    border-right: 1px solid #e7edf3;
    overflow: visible;
    transition: width 0.28s ease, flex-basis 0.28s ease;
    z-index: 5;
}

.menu-sidebar a {
    transition: background-color 0.15s ease, color 0.15s ease;
}

input:disabled:hover,
select:disabled:hover {
  cursor: not-allowed
}

.menu-sidebar .nav-link,
.menu-sidebar .nav-link a {
    color: #1f2937;
    text-decoration: none;
    cursor: pointer;
}

.menu-sidebar .nav-link.active,
.menu-sidebar .nav-link.active a {
    color: #14324a;
    background: #e8f4fc;
}

/* Общие стили */
.page-container-outer {
    height: 100vh;
    /*height: -webkit-fill-available;*/
    max-height: 100vh;
    overflow-x: auto;
    overflow-y: hidden;
    background: #f3f3f3;
}

#contract-items li.nav-link:hover {
    cursor: pointer;
}

.menu-sidebar .nav-link {
    position: relative;
}

#sandwich {
    display: none;
}

.sidebar-head {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 16px 14px 8px;
    overflow: hidden;
}

.sidebar-toggle {
    position: absolute;
    top: 50%;
    right: 0;
    z-index: 2;
    width: 28px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 1px solid #d7dee6;
    border-radius: 50%;
    background: #fff;
    color: #334155;
    font-size: 14px;
    line-height: 1;
    box-shadow: 0 1px 4px rgba(16, 24, 40, 0.12);
    transform: translate(50%, -50%);
}

.sidebar-toggle i {
    display: block;
    transition: transform 0.2s ease;
}

body.sidebar-collapsed .sidebar-toggle i {
    transform: rotate(180deg);
}

.sidebar-toggle:hover {
    background: #f4f7fa;
    color: #1f2937;
}

.sidebar-test {
    margin: 8px 14px 6px;
    padding: 8px 12px;
    border-radius: 12px;
    background: #fff6dd;
    border: 1px solid #f3e4b8;
    color: #8a6424;
    font-size: 13px;
    font-weight: 600;
    text-align: center;
}

.sidebar-nav {
    list-style: none;
    margin: 8px 0 0;
    padding: 6px 10px;
    flex: 1 1 auto;
    min-height: 0;
    overflow: auto;
}

.sidebar-nav > li {
    margin: 0;
}

.menu-sidebar .sidebar-nav .nav-link,
.menu-sidebar .sidebar-group__btn {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    min-height: 40px;
    margin: 2px 0;
    padding: 8px 10px;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: #1f2937;
    font-size: 15px;
    font-weight: 500;
    line-height: 1.2;
    text-align: left;
    height: auto;
    box-shadow: none;
}

.menu-sidebar .sidebar-nav .nav-link i,
.menu-sidebar .sidebar-group__btn i {
    font-size: 18px;
    width: 20px;
    text-align: center;
    color: #526173;
    flex: 0 0 20px;
}

.menu-sidebar .sidebar-nav .nav-link:hover,
.menu-sidebar .sidebar-group__btn:hover {
    background: #f4f7fa;
    color: #1f2937;
}

.menu-sidebar .nav-link.active,
.menu-sidebar .nav-link.active a {
    background: #e7f4fc;
    color: #16344c;
}

.menu-sidebar .nav-link.active i,
.menu-sidebar .nav-link.active a {
    color: #16344c;
}

.sidebar-label {
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-chevron {
    margin-left: auto;
    width: auto !important;
    flex: 0 0 auto !important;
    font-size: 14px !important;
    color: #7b8794 !important;
    transition: transform 0.2s ease;
    transform: rotate(180deg);
}

.sidebar-group:has(#contract-items.show) .sidebar-chevron {
    transform: rotate(0deg);
}

.sidebar-sub {
    list-style: none;
    margin: 0;
    padding: 0 0 4px;
}

.menu-sidebar .sidebar-sub .nav-link {
    display: block;
    min-height: 0;
    margin: 0;
    padding: 0;
    background: transparent;
}

.sidebar-sub a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    width: 100%;
    min-height: 36px;
    padding: 7px 10px 7px 40px;
    border-radius: 10px;
    color: #243140;
    font-size: 14px;
    font-weight: 500;
}

.sidebar-sub .nav-link.active,
.sidebar-sub .nav-link.active a {
    background: #e7f4fc;
}

.menu-sidebar .badge-notifications {
    position: static;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 28px;
    height: 22px;
    padding: 0 8px;
    border-radius: 999px;
    background: #eef1f4;
    color: #4b5563;
    font-size: 12px;
    font-weight: 600;
    line-height: 1;
}

.sidebar-sub .nav-link.active .badge-notifications {
    background: #d7e8f4;
    color: #1f3b52;
}

.sidebar-theme {
    margin-top: auto;
    padding: 8px 14px 10px;
}

.sidebar-theme__btn {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    min-height: 40px;
    margin: 0;
    padding: 8px 10px;
    border: 1px solid #e5e8ee;
    border-radius: 10px;
    background: #fff;
    color: #334155;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.2;
    text-align: left;
    height: auto;
    box-shadow: none;
    cursor: pointer;
}

.sidebar-theme__btn:hover {
    background: #f4f7fa;
    color: #1f2937;
}

.sidebar-theme__btn i {
    font-size: 18px;
    width: 20px;
    text-align: center;
    flex: 0 0 20px;
    color: #526173;
}

.sidebar-theme__icon-sun,
body.theme-dark .sidebar-theme__icon-moon,
body.theme-dark .sidebar-theme__label-dark {
    display: none;
}

body.theme-dark .sidebar-theme__icon-sun,
body.theme-dark .sidebar-theme__label-light {
    display: inline;
}

.sidebar-theme__label-light {
    display: none;
}

.sidebar-user {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px 16px;
    border-top: 1px solid #eef2f6;
    overflow: hidden;
}

.sidebar-avatar {
    width: 36px;
    height: 36px;
    flex: 0 0 36px;
    border-radius: 50%;
    background: #e7eef6;
    color: #31506c;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 700;
}

.sidebar-user__name {
    min-width: 0;
    font-size: 15px;
    font-weight: 700;
    color: #1f2937;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-logout,
.menu-sidebar #logout-btn,
.menu-sidebar #logout-btn:hover {
    margin-left: auto;
    padding: 0;
    background: transparent;
    border: 0;
    border-radius: 0;
    color: inherit;
}

.menu-sidebar .sidebar-logout button {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 36px;
    padding: 0 12px;
    border: 1px solid #e5e8ee;
    border-radius: 10px;
    background: #fff;
    color: #334155;
    font-size: 14px;
    font-weight: 600;
    box-shadow: none;
}

.menu-sidebar .sidebar-logout button:hover {
    background: #f4f7fa;
    color: #1f2937;
}

body.sidebar-collapsed .menu-sidebar {
    width: 76px;
    flex-basis: 76px;
}

body.sidebar-collapsed .sidebar-head {
    justify-content: center;
    padding: 12px 8px 4px;
}

body.sidebar-collapsed .main_logo {
    justify-content: center;
}

body.sidebar-collapsed .logo_title,
body.sidebar-collapsed .sidebar-label,
body.sidebar-collapsed .sidebar-test,
body.sidebar-collapsed .sidebar-chevron,
body.sidebar-collapsed .sidebar-user__name,
body.sidebar-collapsed .badge-notifications,
body.sidebar-collapsed #contract-items {
    display: none;
}

body.sidebar-collapsed .sidebar-theme {
    padding: 8px;
}

body.sidebar-collapsed .sidebar-theme__btn {
    justify-content: center;
    width: 36px;
    min-height: 36px;
    padding: 0;
    margin: 0 auto;
}

body.sidebar-collapsed .sidebar-nav {
    padding: 6px;
}

body.sidebar-collapsed .menu-sidebar .sidebar-nav .nav-link,
body.sidebar-collapsed .menu-sidebar .sidebar-group__btn {
    justify-content: center;
    padding: 8px;
}

body.sidebar-collapsed .sidebar-user {
    flex-direction: column;
    align-items: center;
    padding: 10px 8px 14px;
}

body.sidebar-collapsed .sidebar-logout,
body.sidebar-collapsed .menu-sidebar #logout-btn {
    margin-left: 0;
    width: auto;
    align-self: center;
    display: flex;
    justify-content: center;
}

body.sidebar-collapsed .menu-sidebar .sidebar-logout button {
    width: 36px;
    padding: 0;
    justify-content: center;
}

.modal-body input[type="number"],
.modal-body input[type="text"],
.modal-body input[type="date"],
.modal-body select  {
    width: 300px;
    padding: .375rem .75rem;
    font-weight: 400;
    line-height: 1.5;
    font-size: 16px;
    border-radius: 5px;
    outline: none;
    border: 1px solid #D3D3D3; 
}

.chosen-container-single .chosen-single {
    outline: none!important;
    border: none!important;
    box-shadow: none!important;
    background: none!important;
}

.chosen-container-single .chosen-drop {
    margin-top: 0;
    border-radius: 0 0 4px 4px;
    background-clip: padding-box;
    left: 0;
    border: 1px solid #dee2e6;
    border-top: 0;
    width: 100%;
    border-top-left-radius: 0;
    border-top-right-radius: 0;
    box-shadow: none;
    box-sizing: border-box;
}

.main_logo {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    min-width: 0;
    margin: 0;
    color: #1f2937;
    text-decoration: none;
}

.main_logo img {
    width: 42px;
    height: 42px;
    object-fit: cover;
    flex: 0 0 42px;
    border-radius: 50%;
}

.green_btn {
    background: none;
    color: #68b08f;
    opacity: 1;
}

.green_btn:disabled {
    background: none;
    color: #68b08f;
    opacity: 0.4;
}

.all_contracts-outer .green_btn {
    position: relative;
    z-index: 2;
}

.ui-widget-header .ui-icon {
    background: url(../images/ui-icons_444444_256x240.png)!important;
    opacity: 0.5;
    transition: 500ms;
}

.ui-widget-header .ui-icon:hover {
    opacity: 1;
    cursor: pointer;
}

.ui-datepicker .ui-datepicker-next span {
    transform: rotate(90deg);
}

.ui-datepicker .ui-datepicker-prev span {
    transform: rotate(-90deg);
}

.form-control:focus {
    outline: none;
    box-shadow: none;
}

#contracts-list {
    margin-top: 1rem;
}

.clean_btn {
    font-size: 14px;
    color: #6c757d;
    text-decoration: none;
    transition: 500ms;
}

.clean_btn:hover {
    opacity: 0.5;
    cursor: pointer;
}

.clean_btn i {
    margin-left: 5px;
}

.send_searchFields.green_btn {
    padding: 5px 20px!important;
    transition: 500ms;
}

.pagination {
    margin-bottom: 25px;
    display: block;
    padding-top: 15px;
}

.pagination .current {
    color: white;
    background: #6c757d;
    padding: 5px 10px;
    border-radius: 50px;
}

.pagination a {
    color: #6c757d;
    padding: 5px 10px;
    border-radius: 50px;
    text-decoration: none;
    transition: 500ms;
}

.pagination a:hover {
    color: white;
    background: #6c757d;
}


#edit-section td {
    width: 320px;
    min-width: 320px;
}

#id_add_contract_files_form-file{
    display: none;
}

label[for="id_add_contract_files_form-file"] {
  display: none;
}

label[for="id_add_contract_files_form-file"]:hover {
  background: #3367d6;
}

label[for="id_add_contract_files_form-file"]::before {
  content: "📁";
  margin-right: 8px;
}

.file-name-container {
  display: inline-flex;
  align-items: center;
  margin-left: 10px;
  gap: 8px;
}

.file-name {
  color: #333;
  font-style: italic;
}

.delete-file-btn {
  background: #ff4444;
  color: white;
  border: none;
  border-radius: 50%;
  width: 24px;
  height: 24px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  line-height: 1;
  padding: 0;
}

.delete-file-btn:hover {
  background: #cc0000;
}

.file-message {
  color: #666;
  font-style: italic;
}

.create_contract-col {
    flex: 1 0 360px;
    margin-right: 25px;
    margin-bottom: 20px;
    width: 380px;
}

.create_contract-outer {
    flex-wrap: wrap;
}

.chosen-container-single.form-control {
    width: 386px;
} 

.logo_title {
    font-size: 13px;
    line-height: 1.35;
    font-weight: 600;
    letter-spacing: 0;
    color: #1f2937;
}

.summary_contract-price {
    text-align: right;
    padding-right: 25px;
    font-size: 16px;
}

.all_contracts-outer {
    padding-top: 303px;
}

#counterpartyForm {
    text-align: left;
}

#counterpartyForm > div {
    margin-bottom: 15px;
}

@media only screen and (max-width: 1000px) {
    .page-container-outer {
        display: block!important;
    }

    .menu-sidebar,
    body.sidebar-collapsed .menu-sidebar {
        position: absolute;
        left: -1000px;
        width: 100%;
        flex-basis: auto;
        z-index: 4;
    }

    body.sidebar-collapsed .logo_title,
    body.sidebar-collapsed .sidebar-test,
    body.sidebar-collapsed .sidebar-user__name {
        display: block;
    }

    body.sidebar-collapsed .sidebar-label,
    body.sidebar-collapsed .sidebar-chevron {
        display: inline;
    }

    body.sidebar-collapsed .badge-notifications {
        display: inline-flex;
    }

    body.sidebar-collapsed #contract-items.collapse:not(.show) {
        display: none;
    }

    body.sidebar-collapsed #contract-items.show {
        display: block;
    }

    body.sidebar-collapsed .sidebar-head,
    body.sidebar-collapsed .sidebar-user {
        flex-direction: row;
        align-items: center;
    }

    .sidebar-toggle {
        display: none;
    }

    #sandwich {
        display: block;
        z-index: 1000;
        position: relative;
        top: 0px;
        left: 0px;
        margin-top: 10px;
        width: 50px;
        height: 50px;
        text-align: center;
        background: #434446;
        display: block;
        position: absolute;
        top: -10px;
    }

    .line-wrapp {
        width: 18px;
        height: 12px;
        z-index: 10;
        margin: 0px;
        transition: 600ms ease-in-out;
    }

    .line {
        width: 25px;
        height: 3px;
        background-color: white;
        margin-bottom: 5px;
        text-align: center;
        margin-left: 12px;
        margin-top: 3px;
        transition: 600ms ease-in-out;
        border-radius: 15px;
    }

    #sandwich.active .line.top {
        width: 21px;
        transform: translateX(-3px) translateY(2px) rotate(-45deg);
    }

    #sandwich.active .line.bottom {
        width: 21px;
        transform: translateX(-3px) translateY(-2px) rotate(45deg);
    }

    .mob-d-block {
        display: block!important;
    }

    .main_logo {
        margin-left: 0px;
        justify-content: center;
        margin-bottom: 0px!important;
    }

    .nav-link a {
        width: auto;
    }

    .all_contracts-outer {
        overflow-x: scroll;
    }

    .contracts-table {
        width: 1200px!important;
    }

    .open_details-td .bi-arrows-angle-expand {
        position: absolute;
        left: 16px;
        top: -28px;
    }

    .go_to-btn {
        margin-left: 150px !important;
        margin-top: 20px !important;
        margin-bottom: 0px !important;
    }

    .overlay_menu {
        width: 100%;
        background: black;
        opacity: 0.7;
        z-index: 3;
        display: none;
        position: fixed;
        width: 100%;
        height: 100%;
    }

    .contart_info-stat-outer {
        margin-left: 15px !important;
        margin-right: 15px !important;
        margin-top: 70px !important;
        position: relative;
    }

    .contart_info-stat-outer:after {
        display: none;
    }

    .page-container-outer {
        overflow-y: scroll;
    }

    .progressbar-outer {
        margin: 0 !important;
    }

    .mob-width-100pr {
        width: 100%!important;
    }

    .mob-ml-0 {
        margin-left: 0!important;
    }

    .history_container {
        width: 100%!important;
    }

    .edit_section-contract-table td {
        width: 50%!important;
    }

    .history_open-block {
        height: 350px;
        overflow-y: scroll;
    }

    .supply_and_payment-container {
        margin: 0!important;
    }

    .supply_and_payment-container .container {
        width: 100%;
    }

    .supply_and_payment-container .list-group {
        max-height: 340px;
        overflow-y: scroll;
    }
}

