@import url('https://fonts.googleapis.com/css2?family=Trajan+Pro+3&display=swap'); /* Подключение шрифта */

body {
    font-family: 'Arial', sans-serif;
    background-color: #f4f4f4;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-size: 14px;
}

.sidebar {
    background: rgba(22,28,38,1);
    width: 50px; /* Ширина боковой панели в свернутом виде */
    height: 100vh;
    position: fixed;
    top: 0;
    left: 0;
    transition: width 0.3s;
    overflow-x: hidden; /* Отключение горизонтальной прокрутки */
    display: flex;
    flex-direction: column;
    align-items: center;
    z-index: 1100; /* Уровень слоя */
}

    .sidebar:hover {
        width: 250px; /* Расширение панели при наведении */
    }

.logo {
    width: 40px;
    height: 40px;
    background-color: black; /* Цвет фона логотипа */
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: bold;
    margin: 10px 0;
    border-radius: 5px;
    font-family: 'Trajan Pro 3', serif; /* Шрифт логотипа */
    transition: width 0.3s;
}

.sidebar:hover .logo {
    width: 100%;
    font-size: 24px;
    justify-content: flex-start;
    padding-left: 20px;
    color: white; /* Цвет текста при расширении */
    font-family: 'Trajan Pro 3', serif; /* Шрифт логотипа */
}

.menu {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-start; /* Выравнивание по верху */
    width: 100%;
}

.sidebar a {
    display: flex;
    align-items: center;
    color: white;
    text-decoration: none;
    padding: 10px;
    background-color: rgba(22,28,38,1);
    margin: 10px 0;
    border-radius: 5px;
    transition: background-color 0.3s, padding 0.3s;
    white-space: nowrap; /* Отключение переноса текста */
    overflow: hidden; /* Отключение прокрутки */
    text-overflow: ellipsis; /* Троеточие для длинного текста */
    width: 100%;
}

    .sidebar a:hover {
        background-color: #dbdbdb;
        color: black;
    }

    .sidebar a .icon {
        display: inline-block;
        width: 24px;
        height: 24px;
        margin-right: 10px;
        color: white; /* Цвет значка */
        transition: color 0.3s;
    }

    .sidebar a .icon i {
    font-size: 10px; /* или любой другой размер */
    line-height: 1;
}

.sidebar:hover a .icon {
    color: white; /* Цвет значка при расширении */
}

.sidebar a .text {
    display: none;
    color: white; /* Цвет текста при свернутом виде */
}

.sidebar:hover a .text {
    display: inline-block;
}

.topbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 50px;
    background-color: #f5f5f5; /* Фоновый цвет */
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    padding-bottom: 10px; /* Добавляем отступ снизу */
    box-shadow: 0 0 10px rgba(0,0,0,0.1);
    z-index: 1000;
}

    .topbar .title {
        font-size: 18px;
        color: #333; /* Цвет текста */
        font-weight: bold; /* Жирный шрифт */
        margin-left: 60px; /* Отступ слева */
    }

    .topbar .right-icons {
        display: flex;
        align-items: center;
    }

#searchContainer {
    margin-top: 120px; /* Отступ сверху, чтобы окно было ниже верхней панели */
    z-index: 1051; /* Убедитесь, что это значение выше, чем у .topbar */
}

.notification-icon {
    position: relative;
    font-size: 24px;
    color: #7b7b7b; /* Цвет значка */
    cursor: pointer;
    margin-right: 20px;
}

    .notification-icon:hover {
        color: #5b5b5b;
    }

.notification-badge {
    position: absolute;
    top: -10px;
    right: -10px;
    background-color: red;
    color: white;
    border-radius: 50%;
    padding: 5px 10px;
    font-size: 12px;
}

.notification {
    display: none;
    position: fixed;
    bottom: 20px;
    right: 20px;
    background-color: #d4edda;
    color: #155724;
    padding: 15px;
    border: 1px solid #c3e6cb;
    border-radius: 5px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    z-index: 1050;
    cursor: pointer;
}

.profile-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: #7b7b7b; /* Цвет фона */
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    margin-left: 20px;
    position: relative;
}

    .profile-icon:hover {
        background-color: #5b5b5b;
    }

.profile-menu {
    display: none;
    position: absolute;
    top: 50px;
    right: 0;
    width: 240px; /* Ширина меню */
    background-color: white;
    box-shadow: 0 0 10px rgba(0,0,0,0.1);
    border-radius: 5px;
    overflow: hidden;
    z-index: 1100;
    border: 1px solid black; /* Цвет границы */
}

    .profile-menu .profile-info {
        padding: 10px;
        background-color: #f5f5f5;
        border-bottom: 1px solid #ddd;
    }

        .profile-menu .profile-info p {
            margin: 0;
        }

    .profile-menu a {
        display: block;
        width: calc(100% - 20px); /* Ширина ссылок */
        margin: 5px auto;
        padding: 10px;
        color: black;
        text-decoration: none;
        transition: background-color 0.3s;
        background-color: #e0e0e0; /* Фон ссылок */
        border: 1px solid black; /* Граница */
        text-align: center;
        border-radius: 5px;
    }

        .profile-menu a:hover {
            background-color: #c0c0c0; /* Фон при наведении */
        }

.profile-icon:focus .profile-menu,
.profile-icon:focus-within .profile-menu {
    display: block;
}

.content {
    margin-left: 50px; /* Отступ для основного контента */
    padding: 70px 20px 20px 20px; /* Отступы */
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0,0,0,0.1);
    overflow-x: auto; /* Горизонтальная прокрутка */
}

table {
    border-collapse: collapse;
    width: 100%;
    cursor: pointer; /* Курсор для таблицы */
    font-family: 'Arial', sans-serif;
    font-size: 14px;
    border: 2px solid #007bff; /* Граница таблицы */
}

th, td {
    text-align: left;
    padding: 8px;
    border: 1px solid #ddd;
}

th {
    background-color: #f2f2f2;
    position: sticky;
    top: 0;
    cursor: pointer; /* Курсор для заголовков */
}

    th .sort-arrow {
        display: inline-block;
        width: 0;
        height: 0;
        margin-left: 5px;
        vertical-align: middle;
        border-left: 5px solid transparent;
        border-right: 5px solid transparent;
    }

        th .sort-arrow.asc {
            border-bottom: 5px solid #333; /* Восходящая стрелка */
        }

        th .sort-arrow.desc {
            border-top: 5px solid #333; /* Нисходящая стрелка */
        }

@media (max-width: 768px) {
    th, td {
        display: block;
        width: 100%;
    }

    th {
        position: absolute;
        top: -9999px;
        left: -9999px;
    }

    tr {
        margin: 0 0 1rem 0;
        display: block;
        border: 1px solid #ccc;
    }

    td {
        border: none;
        position: relative;
        padding-left: 50%;
        text-align: right;
    }

        td:before {
            content: attr(data-label);
            position: absolute;
            left: 0;
            width: 50%;
            padding-left: 15px;
            font-weight: bold;
            text-align: left;
        }
}

.button {
    display: inline-block;
    padding: 8px 15px;
    margin: 10px 5px; /* Отступы для кнопок */
    background-color: #007bff;
    color: white;
    text-decoration: none;
    border-radius: 5px;
    transition: background-color 0.3s ease;
}

    .button:hover {
        background-color: #0056b3;
    }

.back-button {
    display: inline-block;
    padding: 8px 15px;
    margin-top: 20px;
    background-color: #6c757d;
    color: white;
    text-decoration: none;
    border-radius: 5px;
    transition: background-color 0.3s ease;
}

    .back-button:hover {
        background-color: #5a6268;
    }
