body, html {
    width: 100%;
    height: 100%;
    margin: 0;
    font-family: "Lato", sans-serif;
}

body {
    overflow:hidden;
}

.container {
    display: flex;
    flex-direction: column;
    height: calc(100% - 50px);
    overflow-y: auto;
}

/*стили для sidebar*/
.sidebar {
    margin: 0;
    padding: 0;
    width: 250px;
    max-width: 250px;
    overflow-x: hidden;
    overflow-y: auto;
    background-color: #23282d;
    position: fixed;
    height: calc(100% - 50px);
    /*overflow: auto;*/
    transition: width 0.3s ease;
}

.sidebar-top {
    display: flex;
    flex-direction: column;
    max-width: 100%;
    max-height: 100%;
    overflow-y: auto;
    overflow-x: hidden;

    scrollbar-color: currentColor transparent;
}

.sidebar-top::-webkit-scrollbar-track {
    background-color: inherit; /* наследует background-color */
}


/* На экранах <= 700px — мини-сайдбар */
@media screen and (max-width: 700px) {
    .sidebar {
        width: 70px; /* узкий мини-сайдбар */
        height: calc(100% - 64px); /* полная высота экрана */
        position: fixed;
        top: 0;
        left: 0;
        padding-top: 10px;
        overflow-x: hidden; /* чтобы текст не выходил */
    }

    /* Скрываем текст в ссылках — показываем только иконки */
    .sidebar a .label {
        display: none;
        transition: opacity 0.3s ease;
    }

    /* Центрируем иконки */
    .sidebar a {
        padding: 16px 10px;
        text-align: center;
    }

    /* Добавляем скрытие текста у кнопки-конвертера */
    .sidebarBtn .label {
        display: none;
        transition: opacity 0.3s ease;
    }

    /* Центрируем иконки у кнопки */
    .sidebarBtn {
        padding: 16px 10px;
        text-align: center;
    }

    /* Стили для аватара — показываем только картинку, скрываем текст */
    .avatar {
        flex-direction: column !important; /* вертикальный */
        align-items: center !important;
        justify-content: center !important;
        padding: 10px 0;
    }

    .avatar .avatar_data {
        display: none !important;
    }

    .avatar .padright-10px {
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        padding: 10px 0 !important;
    }

    .btn_logout {
        display: flex;
        align-items: center;
        justify-content: center;
        min-width: 36px;
        min-height: 36px;
        max-width: 36px;
        max-height: 36px;
    }

    .btn_logout img {
        width: 24px;
        height: 24px;
    }

    .avatar .avatar_image {
        margin: 0 auto;
        width: 40px !important;
        height: 40px !important;
        min-width: 40px !important;
        min-height: 40px !important;
        max-width: 40px !important;
        max-height: 40px !important;
        border-radius: 20px !important;
        background-color: ghostwhite;
        border: 2px solid #1d1d29;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .container {
        margin-left: 70px !important;
        width: calc(100% - 70px);
    }

    .sidebar-header {
        display: none;
    }
}

/* На очень узких экранах (<=400px) делаем то же самое для ссылок */
/*@media screen and (max-width: 400px) {
    .sidebar a {
        width: 100%;
        text-align: center;
    }
}*/

.sidebar-header {
    text-align: center;
    color: white;
}

.sidebar a {
    display: block;
    color: white;
    padding: 16px;
    text-decoration: none;
}

.sidebar a.active {
    background-color: #191e23;
    color: #158bde;
}

.sidebar a:hover:not(.active) {
    background-color: #555;
    color: white;
}

.sidebarBtn {
    display: block;
    color: white;
    padding: 16px;
    text-decoration: none;
    background: none;
    border: none;
    cursor: pointer;
    font: inherit;

    width: 100%;
    text-align: left;
}

.sidebarBtn.active {
    background-color: #191e23;
    color: #158bde;
}

.sidebarBtn:hover:not(.active) {
    background-color: #555;
    color: white;
}

.avatar {
    background-color: #4e4e4f;
    display: flex;
    flex-direction: row;
    justify-content: flex-start;
    text-align: center;
    align-items: center;
    margin-bottom: 5px;
}

.avatar .avatar_image {
    width: 250px;
    min-width: 40px;
    min-height: 40px;
    max-width: 40px;
    max-height: 40px;
    align-items: center;
    justify-content: center;
    text-align: center;
    display: flex;
    background-color: ghostwhite;
    border-radius: 20px;
    border: 2px solid #1d1d29;
    margin: 5px;
}

.avatar .avatar_image:hover {
    border-color: #4a90e2; /* подсветка рамки */
    background-color: #f0f0f0;
    box-shadow: 0 0 5px rgba(74, 144, 226, 0.6);
    cursor: pointer;
}

.avatar .avatar_image:hover img {
    transform: scale(1.1);
    transition: transform 0.2s ease-in-out;
}


.avatar .avatar_data {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    flex: 1;
}

.avatar_data .avatar_name {
    display: flex;
    align-self: center;
    margin: 0;
}

.avatar_name {
    color: white;
    margin: 0;
    word-wrap:break-word;
}


.btn_logout {
    min-width: 40px;
    min-height: 40px;
    max-width: 40px;
    max-height: 40px;
    background-color: transparent;
    border: none;
    margin: 5px;
}

.btn_logout:hover {
    transform: scale(1.3);
}

/*=================================================================*/

div.container {
    margin-left: 250px;
    padding: 1px 8px;
    width: calc(100%-200px);
}

div.footer {
    position: fixed;
    left: 0;
    bottom: 0;
    width: 100%;
    height: 50px;
    background-color: #f1f1f1;
    color: black;
    text-align: center;
}

div.content {
    margin-Bottom: 50px;
}

div.tabs {
    background-color: #333;
    overflow: auto;
    white-space: nowrap;
    position: fixed;
    right: 0;
    left: 0;
    margin-left: 252px;
    width: 100%;
}

div.tabs a {
    display: inline-block;
    color: white;
    height: 100%;
    text-align: center;
    padding: 14px;
    text-decoration: none;
    vertical-align: middle;
}

div.tabs a:hover {
    background-color: #777;
}


input[readonly] {
    pointer-events: none;
    background-color: rgba(239, 239, 239, 0.3);
    color: rgb(84, 84, 84);
    outline: none;
    box-shadow: none;
    border-color: inherit;
}