﻿﻿/* Основной стиль страницы */
body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    display: flex;
    background-color: #f4f4f9;
}

/* Стили боковой панели */
.sidebar {
    width: 250px;
    background-color: #333;
    color: #fff;
    height: 100vh;
    position: fixed;
    top: 0;
    left: 0;
    padding-top: 60px;
    padding-bottom: 150px;
    overflow-y: scroll;
    -ms-overflow-style: none; /* IE и Edge */
    scrollbar-width: none; /* Firefox */
    transition: transform 0.3s ease;
    z-index:100;
}

.sidebar::-webkit-scrollbar {
    display: none; /* Chrome, Safari и Opera */
}

.menu {
    list-style-type: none;
    padding: 0;
    margin: 0;
}

/* Основной стиль элементов меню */
.menu-item {
    padding: 10px;
    border-bottom: 1px solid #444;
}

.menu-item > span {
    color: #fff;
    font-weight: bold;
    display: block;
    cursor: pointer;
    transition: background-color 0.2s;
}

.menu-item > span:hover {
    background-color: #555;
}

.menu-item.active > span {
    background-color: #666;
}

/* Подменю */
.menu-item ul {
    list-style: none;
    padding: 5px 0;
    display: none;
    background-color: #444;
}

.menu-item ul span {
    color: #ddd;
    padding: 5px;
    display: block;
    cursor: pointer;
    transition: background-color 0.2s;
}

.menu-item ul span:hover {
    background-color: #666;
}

.menu-item ul .active-action {
    background-color: #777;
    color: #fff;
}

/* Стили иконки "гамбургера" */
.hamburger {
    position: fixed;
    top: 10px;
    left: 10px;
    display: flex;
    flex-direction: column;
    cursor: pointer;
    z-index: 101;
}

.hamburger div {
    width: 30px;
    height: 3px;
    background-color: #999;
    margin: 5px 0;
}

/* Основной контент  */
.content {
    margin-left: 250px;
    padding: 20px;
    width: 100%;
    transition: margin-left 0.3s ease, width 0.3s ease; 
}

    .sidebar {
        transform: translateX(-100%); /* Прячем панель */
        transition: transform 0.3s ease; /* Плавное скрытие */
    }
    .sidebar.open {
        transform: translateX(0); /* Показываем панель, когда она открыта */
    }


/* Стили для preloader */
.preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(255, 255, 255, 0.7); /* полупрозрачный фон */
    display: none; /* скрыто по умолчанию */
    justify-content: center;
    align-items: center;
    z-index: 9999; /* поверх всех элементов */
}

.spinner {
    border: 4px solid rgba(255, 255, 255, 0.3); /* светлый фон */
    border-top: 4px solid #3498db; /* цвет верхней части */
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite; /* анимация вращения */
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Стили для логотипа */
.logo {

    top: 5px;  /* Расположение от верхней границы */
    
}

/* Логотип (картинка) */
.logo {
    background: url('../img/AllLs.png') no-repeat center;
    background-size: cover;
    width: 50px;  /* Можно настроить нужный размер */
    height: 50px;

}
.logo:hover img {
    transform: scale(1.2);  /* Увеличение масштаба изображения */
    filter: brightness(1.3);  /* Увеличение яркости */
}
.logo.spin {
	animation: overshootSpin 1s ease-out forwards;
}
@keyframes overshootSpin {
    0% {
        transform: rotateY(0deg);
    }
    60% {
        transform: rotateY(405deg); /* Перекрут до 405° */
    }
    80% {
        transform: rotateY(350deg); /* Откат назад */
    }
    100% {
        transform: rotateY(360deg); /* Конечное положение */
    }
}
/* Адаптивность: скрытие панели на мобильных устройствах */
@media (max-width: 768px) {
    /* Для контента на мобильных устройствах */
    #maincontainer{
    max-width: 100%!important;
    }
    .content {
        margin-left: 0 !important; /* Убираем отступ */
        width: 100%; /* Контент занимает всю ширину */
    }
            #filter-container {
                grid-template-columns: auto auto; /* Две колонки на среднем экране */
            }

}

.box table {
    font-family: Arial, sans-serif;
    font-size: 1.5rem; /* 1 rem = размер шрифта корневого элемента */
}
/* Если класс 'open' отсутствует, устанавливаем margin-left: 0px */
.content {
    margin-left: 0px;
    width: 95% ;
    max-width: 100% ;
    transition: margin-left 0.3s ease, width 0.3s ease, max-width 0.3s ease; 
}
.content.open {
    margin-left: 250px;
    width: calc(95% - 250px); /* Пробелы вокруг знака минус */
    max-width: calc(95% - 250px); /* Пробелы также здесь */
    transition: margin-left 0.3s ease, width 0.3s ease, max-width 0.3s ease;

}
        #dropArea {
            width: 100%;
            height: 200px;
            border: 2px dashed #ccc;
            text-align: center;
            line-height: 200px;
            color: #888;
            margin-bottom: 20px;
        }
        #dropArea.hover {
            border-color: #2d87f0;
            background-color: #e9f1fe;
        }




/* Контейнер для кнопок */
.buttons-container {
  display: flex;           /* Выставляем кнопки в ряд */
  gap: 10px;               /* Отступ между кнопками */
  align-items: center;     /* Выравнивание кнопок по вертикали */
  justify-content: center; /* Выравнивание кнопок по горизонтали */
}

/* Стиль для кнопок */
.xls-button {
  color: white;
  padding: 10px;
  font-size: 16px;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.3s ease, transform 0.2s ease;
  position: relative;
  width: 40px;  /* Ограничиваем ширину кнопки */
  height: 40px; /* Ограничиваем высоту кнопки */
}

.xls-button:hover {
  background-color: #45a049;
}

.xls-button:active {
  transform: scale(0.98);
}

.xls-icon {
  width: 35px;  /* Ограничиваем размер иконки */
  height: 35px;
}

/* Стиль для всплывающей подсказки */
.xls-button[title]:hover::after {
  content: attr(title);
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  background-color: rgba(0, 0, 0, 0.7);
  color: white;
  padding: 5px;
  border-radius: 5px;
  font-size: 16px;
  white-space: nowrap;
  z-index: 10;
}


/* Стиль для контейнера с кнопкой скачивания */
.top-bar {
    display: flex;
    justify-content: flex-end;
}

/* Стиль для кнопки скачивания */
.download-btn {
    padding: 5px 10px;
    background: #007bff;
    color: white;
    text-decoration: none;
    border-radius: 5px;
    cursor: pointer;
}

.view-switcher {
  display: flex;
  gap: 10px;
  padding: 10px;
}
.switch-btn {
  padding: 5px 10px;
  cursor: pointer;
  border: 1px solid #007bff;
  background: #fff;
  color: #007bff;
  border-radius: 4px;
}
.switch-btn.selected {
  background: #007bff;
  color: #fff;
}
#auth-section {
  display: none;
}
/* Стили для формы авторизации */
#auth-section {
  max-width: 400px;
  margin: 60px auto;
  padding: 30px 25px;
  border: 1px solid #ccc;
  border-radius: 8px;
  background: #f9f9f9;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  font-family: Arial, sans-serif;
}

#auth-section h2 {
  text-align: center;
  margin-bottom: 20px;
  color: #333;
}

#auth-section input[type="email"],
#auth-section input[type="password"],
#auth-section input[type="text"] {
  width: 100%;
  padding: 12px 15px;
  margin: 8px 0 15px;
  border: 1px solid #bbb;
  border-radius: 5px;
  box-sizing: border-box;
  font-size: 16px;
}

#auth-section button {
  width: 100%;
  padding: 12px;
  background-color: #007bff;
  border: none;
  border-radius: 5px;
  color: white;
  font-size: 17px;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

#auth-section button:hover {
  background-color: #0056b3;
}

#login-status {
  margin-top: 10px;
  min-height: 18px;
  text-align: center;
  font-weight: 600;
  color: red;
}

#auth-toggle {
  margin-top: 15px;
  text-align: center;
  font-size: 14px;
  color: #007bff;
  cursor: pointer;
  user-select: none;
}

#auth-toggle:hover {
  text-decoration: underline;
}
