/* Основные стили для приложения */


#app {
  display: flex;
  height: 100%;
  width: 100%;
  overflow: hidden;
  /* Убираем прокрутку */

}

#content {
  flex: 1;
  /* Контент занимает оставшееся пространство */
  overflow-y: auto;
  /* Если контент длинный, добавляем прокрутку */
  /* background-color: #E2E3E5; */
  background-color: #00060c;
}

#chat-box {
  flex-grow: 1;
  /* Позволяет chat-box занимать оставшееся пространство */
  overflow-y: auto;
  /* Прокрутка по вертикали при переполнении */
  padding: 5px;
  scrollbar-width: none;
  transform: rotate(180deg);

}

#chat-box::-webkit-scrollbar {
  display: none;
  /* Скрываем полосу прокрутки */
}

.custom-card {
  /* display: inline-block; Делаем карту по размеру контента */
  /* max-width: 70%; Ограничиваем максимальную ширину */
  /* min-width: 100px; Минимальная ширина */
  word-wrap: break-word;
  /* Перенос слов */
  padding: 10px;
  /* Отступы */
}

.message {
  transform: rotate(180deg);
}


/* Стили для меню */
.menu-vertical {
  background-color: #00060c;
  color: #E0E0E0;
}



.menu-drawer {
  list-style-type: none;
}

.el-drawer {
  background-color: #121212;
  border-right: 1px solid #2E2E2E;
}

/* Ответ на размеры экрана */


@media (min-width: 769px) {
  .uk-textarea {
    margin: 0%;
  }

  #push-min {
    display: none;
  }

  .mobile-menu-button {
    display: none;
    /* Скрываем кнопку открытия меню на больших экранах */
  }
}





.el-drawer {
  background-color: #232b31;
  border-right: 1px solid #2E2E2E;
}

.el-menu {
  background-color: #232b31;
}

.sidebar {
  width: 400px;
  transition: transform 0.3s ease-in-out;
}

.sidebar.collapsed {
  transform: translateX(-400px);
}

@keyframes fadeIn {
  from {
    opacity: 0;
    /* Элемент невидим */
  }

  to {
    opacity: 1;
    /* Элемент становится видимым */
  }
}

.button-container {
  border: none;
  color: #A0A0A0;
}

@media (max-width: 768px) {
  #push-max {
    display: none;
  }

  .button-container {
    left: 16px;
    opacity: 0;
    /* Устанавливаем начальную прозрачность */
    animation: fadeIn 0.3s ease forwards;
    /* Анимация плавного появления */
    animation-delay: 0.0s;
    /* Задержка перед началом анимации */
  }
}

@media (min-width: 769px) {
  .uk-navbar-container {
    /* display: none; */
    /* Скрывает кнопку при ширине экрана 769px и более */
    animation: fadeIn 0.05s ease forwards;
  }
}

.mobile-menu-demo {
  width: 100%;
  background-color: #232b31;
  /* Цвет фона */
  display: block;
  /* Убедитесь, что меню отображается */
}

.el-menu-vertical-demo {
  background-color: #232b31;
  color: #E0E0E0;
  border: none;
}

.el-menu-vertical-demo :hover {
  background-color: #232b31;
  color: #E0E0E0;
  border: none;
}

.mobile-menu-demo :active {
  background-color: #272F36;
  color: #E0E0E0;
}

.el-menu-item:focus,
.el-menu-item:active {
  background-color: #272F36;
  color: #E0E0E0;
}

.el-menu-item:hover {
  border-radius: 8px;
  background-color: #1E1E1E;
  color: #FFFFFF;
}

.el-menu-item {
  font-size: 14px;
  background-color: #272F36;
  color: #E0E0E0;
}


.uk-icon-button {
  background-color: transparent;
  border: none;
}

.uk-textarea {
  resize: none;
  overflow-y: hidden;
  max-height: 200px;
  /* Максимум 10 строк */
}

.uk-custom-container {
  height: calc(100vh - 60px);
  /* Высота контейнера с учетом фиксированной карточки */
  display: flex;
  flex-direction: column;
  /* Вертикальная компоновка */
  justify-content: space-between;
  /* Разделение пространства между элементами */
}

/* Фиксированная карточка */
.uk-card-fixed {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
}

.uk-button-default-menu {
  border: 1px, solid, #232b31;
  border-radius: 9px;
  background-color: #232b31;
  color: #cfcfcf;
  width: 100%;
  height: 40px;
  font-size: medium;
}

.uk-button-default-menu:hover {

  background-color: #393d47;
  border: 1px, solid, #444855;
}

.logout-button {
  margin-top: auto;
  /* Двигает кнопку вниз */
  width: 100%;
  /* Растягиваем кнопку по ширине */
  text-align: center;
  /* Центрируем текст */
}



/* ЧВТБОКС */
.middle-panel {
  min-height: 100vh;
  position: relative;
  overflow: hidden;
}

/* Чатбокс (свернутый и раскрытый) */
.chatbox {
  position: fixed;
  bottom: 0;
  right: 50%;
  transform: translateX(50%);
  width: 400px;
  border-top-left-radius: 12px;
  border-top-right-radius: 12px;
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.3);
  transition: transform 0.3s ease;
}

.chatbox.collapsed .chatbox-body,
.chatbox.collapsed .chatbox-header {
  display: none;
}

.chatbox.collapsed .chatbox-input {
  border-top: 1px solid #444;
}

/* Сообщения */
.chatbox-body .message {
  padding: 8px 12px;
  margin-bottom: 6px;
  border-radius: 8px;
  max-width: 80%;
}

.from-user {
  background-color: #1e87f0;
  align-self: flex-end;
  color: white;
  margin-left: auto;
}

.from-agent {
  background-color: #666;
  color: white;
  margin-right: auto;
}

/* Заголовок чата */
.chatbox-header {
  background-color: #111;
  font-weight: bold;
}

/* Кнопка закрытия */
.chatbox-header button {
  font-size: 18px;
}

/* Упрощённые стили инпута */
.chatbox-input input {
  width: 100%;
}

@media (max-width: 640px) {
  .chatbox {
    width: 100%;
    right: 0;
    transform: none;
  }
}

.hide-scrollbar {
  overflow: auto;
  scrollbar-width: none;
  /* Firefox */
  -ms-overflow-style: none;
  /* IE и Edge */
}

.hide-scrollbar::-webkit-scrollbar {
  display: none;
  /* Chrome, Safari, Opera */
}

.card {
  position: relative;
  overflow: hidden;
  background-color: #0f1011;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  /* max-width: 700px; */
  padding: 24px;
  margin-top: 8px;
  color: #D8DEE9;
  box-shadow: 0px 8px 16px rgba(0, 0, 0, 0.12);
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}

.card-title {

  display: flex;
  align-items: center;
}
.card-title h4 {
    color: #e2e8f0ea;
    font-size: 16px;
    font-weight: 500;
    margin: 0;
}

.card-title img {
  margin-right: 8px;
  border-radius: 6px;
}

.card-title h4 {
  color: #e2e8f0ea;
  font-size: 18px;
  font-weight: 500;
  margin: 0;
}

.card-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.btn-primary {
  background: transparent;
  color: #7F85F5;
  border: 1px solid rgba(127, 133, 245, 0.4);
  border-radius: 8px;
  padding: 8px 16px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 6px;
}

.btn-primary:hover {
  background: rgba(127, 133, 245, 0.1);
  border-color: rgba(127, 133, 245, 0.6);
}

.btn-primary:active {
  transform: translateY(1px);
}

.btn-warning {
  background: rgba(240, 80, 110, 0.1);
  color: #F0506E;
  border: 1px solid rgba(240, 80, 110, 0.3);
  border-radius: 8px;
  padding: 8px;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-warning:hover {
  background: rgba(240, 80, 110, 0.2);
  border-color: rgba(240, 80, 110, 0.5);
}

.btn-warning:active {
  transform: translateY(1px);
}

.card-body {
  display: flex;
  gap: 16px;
  justify-content: space-between;
  z-index: 1;
}

.sub-card {
  background-color: #ffffff05;
  border: 1px solid rgba(255, 255, 255, 0.055);
  border-radius: 10px;
  flex: 1;
  padding: 16px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  box-shadow: 0px 4px 12px rgba(0, 0, 0, 0.05);
  transition: background-color 0.3s, border-color 0.3s;
  z-index: 1;
}

.sub-card:hover {
  /* background-color: #ffffff10; */
  border-color: rgba(127, 133, 245, 0.3);
}

.sub-title {
  font-size: 14px;
  color: #A1A1AA;
  margin-bottom: 6px;
}

.sub-value {
  font-size: 20px;
  font-weight: 600;
  color: #D8DEE9;
}

.card-header,
.card-body {
  position: relative;
  z-index: 1;
}

.card-title img {
  width: 30px;
  height: 30px;
  margin-right: 10px;
  border-radius: 6px;
  filter: invert(90%) sepia(5%) saturate(100%) hue-rotate(190deg) brightness(85%) contrast(90%);
  opacity: 0.8;
  transition: all 0.3s ease;
}

/* Эффект при наведении */
.card-title:hover img {
  filter: invert(48%) sepia(80%) saturate(1500%) hue-rotate(210deg) brightness(0.95);
  opacity: 1;
}

/* Переключатель */
.filter-switch {
  position: relative;
  display: inline-flex;
  align-items: center;
  margin-right: 16px;
  cursor: pointer;
}

.filter-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: relative;
  width: 36px;
  height: 20px;
  background-color: rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  margin-right: 8px;
  transition: .4s;
}

.slider:before {
  content: "";
  position: absolute;
  height: 16px;
  width: 16px;
  left: 2px;
  bottom: 2px;
  background-color: #7F85F5;
  border-radius: 50%;
  transition: .4s;
}

input:checked+.slider {
  background-color: rgba(240, 80, 110, 0.2);
}

input:checked+.slider:before {
  transform: translateX(16px);
  background-color: #F0506E;
}

.label-text {
  font-size: 14px;
  color: #A1A1AA;
}

/* Таблица */
.table-container {
  max-height: 200px;
  overflow-y: auto;
  margin-top: 16px;
}

.deals-table {
  width: 100%;
  border-collapse: collapse;
}

.deals-table th {
  text-align: left;
  padding: 12px 16px;
  font-weight: 500;
  color: #A1A1AA;
  background: rgba(255, 255, 255, 0.03);
  position: sticky;
  top: 0;
}

.deals-table td {
  padding: 12px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

/* Прогресс-бар */
.progress-container {
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 3px;
  margin-bottom: 4px;
}

.progress-bar {
  height: 100%;
  border-radius: 3px;
}

.stage-name {
  font-size: 13px;
  color: #D8DEE9;
}

/* Статусы */
.status-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 500;
}

.status-badge.danger {
  background: rgba(240, 80, 110, 0.2);
  color: #F0506E;
}

.stage-comment {
  font-size: 12px;
  color: #A1A1AA;
  margin-top: 2px;
}

/* Проблемные строки */
.problem-row {
  background: rgba(240, 80, 110, 0.08) !important;
}

/* Кнопки */
.btn-link {
  background: none;
  border: none;
  color: #7F85F5;
  cursor: pointer;
  font-size: 13px;
  padding: 0;
}

.btn-link.warning {
  color: #F0506E;
}

.btn-link:hover {
  text-decoration: underline;
}

.btn-icon {
  background: none;
  border: none;
  color: #A1A1AA;
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
}

.btn-icon:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #D8DEE9;
}

/* Дропдаун */
.warning-dropdown {
  position: relative;
  display: inline-block;

}

.dropdown-content {
  background: #1E293B;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  padding: 12px;
  width: 500px;
  max-width: 90vw;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);


}

.dropdown-alert {
  background: rgba(240, 80, 110, 0.1);
  border-left: 3px solid #F0506E;
  padding: 8px 12px;
  margin-bottom: 12px;
  font-size: 13px;
  border-radius: 4px;
}

.dropdown-alert a {
  color: #7F85F5;
  text-decoration: none;
}

.dropdown-table-container {
  max-height: 200px;
  overflow-y: auto;
  margin: 0 -12px;
  padding: 0 12px;



}

.dropdown-table {
  width: 100%;
  font-size: 13px;
  border-collapse: collapse;

}

.dropdown-table th {
  text-align: left;
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.03);
  color: #A1A1AA;
  font-weight: 500;
  position: sticky;
  top: 0;
}

.dropdown-table td {
  padding: 8px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.actions-cell {
  white-space: nowrap;
}

.action-link {
  padding: 2px 6px;
  border-radius: 4px;
  margin-right: 8px;
  text-decoration: none;
  font-size: 12px;
}

.action-link.success {
  color: #10B981;
  background: rgba(16, 185, 129, 0.1);
}

.action-link.danger {
  color: #F0506E;
  background: rgba(240, 80, 110, 0.1);
}

/* Карточки-метрики */
.metric-card {
  cursor: pointer;
  transition: transform 0.2s;
}

.metric-card:hover {
  transform: translateY(-1px);
  background-color: #ffffff10;
}

/* Стили табов */
.card-tabs {
  margin-top: 16px;
}

.tab-nav {
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  margin-bottom: 0;
}

.tab-nav li {
  margin-bottom: -1px;
}

.tab-nav li a {
  color: #A1A1AA;
  padding: 12px 16px;
  font-size: 14px;
  border-bottom: 2px solid transparent;
  transition: all 0.2s ease;
}

.tab-nav li.uk-active a {
  color: #7F85F5;
  border-bottom-color: #7F85F5;
}

.tab-nav li a:hover {
  color: #D8DEE9;
}

/* Контейнер контента табов */
.card-content {
  margin-top: 12px;
}

.tab-content-container {
  max-height: 340px;
  overflow: auto;
}

/* Скрытие скроллбара */
.tab-content-container::-webkit-scrollbar {
  width: 0;
  height: 0;
  background: transparent;
}