/* Скрыть центральный список задач, що очікують підтвердження */
#completedTasksList {
  display: none !important;
}

/* Если перед ним есть заголовок, тоже скрыть (без изменения HTML/JS) */
h2:has(+ #completedTasksList) {
  display: none !important;
}

/* Стилі для об'єктів в роботі техніка */
.object-task-item {
  background: linear-gradient(180deg, rgba(15,22,34,0.8), rgba(11,17,26,0.9));
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 12px;
  padding: 8px 10px;
  margin: 4px 0;
  font-size: 13px;
  color: #e7edf6;
  cursor: pointer;
  transition: background-color 0.2s ease, transform 0.12s ease, box-shadow 0.2s ease;
  backdrop-filter: blur(10px);
  box-shadow: 0 8px 20px rgba(0,0,0,0.25);
}

.object-task-item:hover {
  background: linear-gradient(180deg, rgba(24,34,51,0.9), rgba(15,22,34,0.95));
  border-color: rgba(79,156,255,0.3);
  transform: translateY(-1px);
  box-shadow: 0 10px 22px rgba(0,0,0,0.3);
}

.object-task-item .object-number {
  font-weight: 600;
  color: #e7edf6;
}

.object-task-item .object-title {
  margin: 2px 0;
}

.object-task-item .object-address {
  font-size: 11px;
  color: #a9b6c7;
}

/* Стилі для кнопки згортання списку об'єктів */
.collapse-toggle {
  transition: color 0.2s ease;
}

.collapse-toggle:hover {
  color: #e7edf6 !important;
}

.collapse-toggle .toggle-icon {
  transition: transform 0.2s ease;
}

  /* Старі стилі видалено */

  /* Стилі для чату */
  .chat-header {
      padding: 15px;
      background: linear-gradient(180deg, rgba(15,22,34,0.8), rgba(11,17,26,0.9));
      border-bottom: 1px solid rgba(255,255,255,0.08);
      display: flex;
      align-items: center;
      gap: 15px;
      backdrop-filter: blur(10px);
  }

  .chat-title {
      flex: 1;
  }

  .current-chat-name {
      font-weight: bold;
      display: block;
      color: #e7edf6;
  }

  .online-status {
      font-size: 12px;
      color: #35d09f;
  }

  .chat-messages {
      flex: 1;
      padding: 15px;
      overflow-y: auto;
      background: linear-gradient(180deg, rgba(15,22,34,0.4), rgba(11,17,26,0.6));
      backdrop-filter: blur(5px);
  }

  /* Стилізація скролбару для чату */
  .chat-messages::-webkit-scrollbar {
      width: 8px;
  }

  .chat-messages::-webkit-scrollbar-track {
      background: rgba(15,22,34,0.3);
      border-radius: 4px;
  }

  .chat-messages::-webkit-scrollbar-thumb {
      background: rgba(79,156,255,0.3);
      border-radius: 4px;
      transition: background 0.3s ease;
  }

  .chat-messages::-webkit-scrollbar-thumb:hover {
      background: rgba(79,156,255,0.5);
  }

  /* Для Firefox */
  .chat-messages {
      scrollbar-width: thin;
      scrollbar-color: rgba(79,156,255,0.3) rgba(15,22,34,0.3);
  }

  .chat-input-container {
      padding: 15px;
      border-top: 1px solid rgba(255,255,255,0.08);
      display: flex;
      gap: 10px;
      background: linear-gradient(180deg, rgba(15,22,34,0.8), rgba(11,17,26,0.9));
      backdrop-filter: blur(10px);
  }

  .chat-input {
      flex: 1;
      padding: 10px 12px;
      border: 1px solid rgba(255,255,255,0.15);
      border-radius: 20px;
      outline: none;
      background: rgba(255,255,255,0.08);
      color: #e7edf6;
      backdrop-filter: blur(5px);
  }

  .chat-input::placeholder {
      color: #a9b6c7;
  }

  .chat-input:focus {
      border-color: #4f9cff;
      box-shadow: 0 0 0 3px rgba(79,156,255,0.15);
  }

  .send-message-btn {
      background: linear-gradient(135deg, #4f9cff, #7b61ff);
      color: white;
      border: none;
      width: 40px;
      height: 40px;
      border-radius: 50%;
      display: flex;
      align-items: center;
      justify-content: center;
      cursor: pointer;
      transition: all 0.3s ease;
      box-shadow: 0 4px 12px rgba(79,156,255,0.3);
  }

  .send-message-btn:hover {
      transform: scale(1.05);
      box-shadow: 0 6px 16px rgba(79,156,255,0.4);
  }

  /* Стили для списка техников */
  .technician-item {
      display: flex;
      align-items: center;
      padding: 10px 15px;
      cursor: pointer;
      transition: background-color 0.2s;
      position: relative;
  }

  .technician-item:hover {
      background: rgba(79,156,255,0.1);
      transform: translateY(-1px);
      box-shadow: 0 4px 12px rgba(0,0,0,0.2);
  }

  /* Індикатор непрочитаних повідомлень */
  .technician-item .unread-dot {
      position: absolute;
      top: 8px;
      right: 8px;
      width: 10px;
      height: 10px;
      border-radius: 50%;
      background: #ef4444;
      box-shadow: 0 0 0 2px rgba(15,22,34,0.8), 0 0 8px rgba(239,68,68,0.6);
      display: none !important;
      z-index: 10;
      animation: pulse-dot 2s infinite;
  }

  .technician-item.has-unread .unread-dot {
      display: block !important;
  }

  @keyframes pulse-dot {
      0%, 100% { transform: scale(1); opacity: 1; }
      50% { transform: scale(1.1); opacity: 0.8; }
  }

  /* Никакого сдвига контента при открытии чата */
  /* Чат теперь появляется поверх содержимого */
  .main-menu-wrapper {
      position: relative;
      z-index: 1;
      display: flex;
      justify-content: center;
      margin: auto;
      max-width: 900px;
  }

  .pult-left {
      display: flex;
      justify-content: center;
  }

  .search-section {
      width: 100%;
      max-width: 500px;
      background: linear-gradient(180deg, rgba(15,22,34,0.85), rgba(11,17,26,0.90));
      border: 1px solid rgba(255,255,255,0.08);
      border-radius: 12px;
      padding: 16px;
      box-shadow: 0 8px 24px rgba(0,0,0,0.35), 0 2px 8px rgba(0,0,0,0.15);
      position: relative;
      backdrop-filter: blur(15px);
  }

  .search-results {
      position: absolute;
      top: 100%;
      left: 0;
      right: 0;
      background: linear-gradient(180deg, rgba(15,22,34,0.95), rgba(11,17,26,0.98));
      border: 1px solid rgba(255,255,255,0.08);
      border-top: none;
      border-radius: 0 0 12px 12px;
      box-shadow: 0 8px 24px rgba(0,0,0,0.4);
      z-index: 1000;
      max-height: 300px;
      overflow-y: auto;
      backdrop-filter: blur(20px);
  }

  /* Стилі для пошукового поля та кнопки */
  .search-box {
      display: flex;
      gap: 8px;
      align-items: center;
  }

  #searchInput {
      flex: 1;
      padding: 10px 12px;
      border: 1px solid rgba(255,255,255,0.15);
      border-radius: 8px;
      background: rgba(255,255,255,0.08);
      color: #e7edf6;
      font-size: 14px;
      outline: none;
      backdrop-filter: blur(5px);
  }

  #searchInput::placeholder {
      color: #a9b6c7;
  }

  #searchInput:focus {
      border-color: #4f9cff;
      box-shadow: 0 0 0 3px rgba(79,156,255,0.15);
  }

  #searchButton {
      padding: 10px 16px;
      background: linear-gradient(135deg, #4f9cff, #7b61ff);
      color: white;
      border: none;
      border-radius: 8px;
      font-weight: 600;
      cursor: pointer;
      transition: all 0.3s ease;
      box-shadow: 0 4px 12px rgba(79,156,255,0.3);
  }

  #searchButton:hover {
      transform: translateY(-1px);
      box-shadow: 0 6px 16px rgba(79,156,255,0.4);
  }

  /* Контейнер з техніками та контрольними панелями */
  .technicians-and-controls-wrapper {
      margin: 5px auto;
      max-width: 1400px;
      display: grid;
      grid-template-columns: 300px 1fr 400px;
      gap: 20px;
      align-items: start;
  }

  /* Секция списка техніків */
  .technicians-section {
      background: linear-gradient(180deg, rgba(15,22,34,0.85), rgba(11,17,26,0.90));
      border: 1px solid rgba(255,255,255,0.08);
      border-radius: 12px;
      padding: 12px;
      backdrop-filter: blur(15px);
      box-shadow: 0 8px 24px rgba(0,0,0,0.35), 0 2px 8px rgba(0,0,0,0.15);
  }

  .technicians-section h2 {
      color: #e7edf6;
  }

  /* Панель подій */
  .events-panel {
      background: linear-gradient(180deg, rgba(15,22,34,0.85), rgba(11,17,26,0.90));
      border: 1px solid rgba(255,255,255,0.08);
      border-radius: 12px;
      padding: 12px;
      backdrop-filter: blur(15px);
      box-shadow: 0 8px 24px rgba(0,0,0,0.35), 0 2px 8px rgba(0,0,0,0.15);
  }

  /* Стилі для кнопок в панелі подій */
  .events-panel button {
      background: linear-gradient(135deg, rgba(79,156,255,0.2), rgba(123,97,255,0.15));
      border: 1px solid rgba(255,255,255,0.15);
      color: #e7edf6;
      padding: 8px 12px;
      border-radius: 8px;
      font-weight: 600;
      cursor: pointer;
      transition: all 0.3s ease;
      backdrop-filter: blur(10px);
  }

  .events-panel button:hover {
      background: linear-gradient(135deg, rgba(79,156,255,0.3), rgba(123,97,255,0.25));
      transform: translateY(-1px);
      box-shadow: 0 4px 12px rgba(79,156,255,0.2);
  }

  /* Стилі для дат в панелі подій */
  .events-panel strong {
      color: #e7edf6;
  }

  /* Стилі для контенту панелі подій */
  #listWrap {
      color: #a9b6c7;
  }

  /* Стилі для елементів подій */
  #listWrap > div,
  .event-item {
      background: linear-gradient(180deg, rgba(15,22,34,0.6), rgba(11,17,26,0.8));
      border: 1px solid rgba(255,255,255,0.08);
      border-radius: 8px;
      padding: 8px 10px;
      margin: 4px 0;
      color: #e7edf6;
      backdrop-filter: blur(5px);
  }

  /* Стилі для тексту подій */
  #listWrap div,
  #listWrap span,
  #listWrap p {
      color: #e7edf6 !important;
  }

  /* Стилі для посилань в подіях */
  #listWrap a {
      color: #4f9cff !important;
      text-decoration: none;
  }

  #listWrap a:hover {
      color: #7b61ff !important;
      text-decoration: underline;
  }

  /* Стилі для часу в подіях */
  #listWrap .time,
  #listWrap small {
      color: #a9b6c7 !important;
      font-size: 12px;
  }

  /* Контейнер панелі чату */
  .chat-panel-container {
      background: linear-gradient(180deg, rgba(15,22,34,0.85), rgba(11,17,26,0.90));
      border: 1px solid rgba(255,255,255,0.08);
      border-radius: 12px;
      padding: 12px;
      backdrop-filter: blur(15px);
      box-shadow: 0 8px 24px rgba(0,0,0,0.35), 0 2px 8px rgba(0,0,0,0.15);
  }

  /* Статичний чат */
  .static-chat-panel {
      background: linear-gradient(180deg, rgba(15,22,34,0.6), rgba(11,17,26,0.8));
      border: 1px solid rgba(255,255,255,0.08);
      border-radius: 12px;
      display: flex;
      flex-direction: column;
      height: 400px;
      backdrop-filter: blur(10px);
  }
  .technicians-section h2 {
      margin: 0 0 8px 0;
  }
  .technicians-list {
      display: flex;
      flex-direction: column;
      gap: 6px;
  }
  /* Немного усилим карточку техніка */
  .technician-item {
      border: 1px solid rgba(255,255,255,0.08);
      border-radius: 12px;
      background: linear-gradient(180deg, rgba(15,22,34,0.6), rgba(11,17,26,0.8));
      color: #e7edf6;
      transition: all 0.3s ease;
      backdrop-filter: blur(10px);
      margin-bottom: 6px;
  }

  /* Пузырьки сообщений */
  .message { margin: 8px 0; }
  .message .message-content {
      padding: 5px 5px;
  }

  /* Стилі для вибору чергового диспетчера */
  .dispatcher-section {
      margin:5px auto;
      max-width: 900px;
      background: linear-gradient(180deg, rgba(15,22,34,0.85), rgba(11,17,26,0.90));
      border: 1px solid rgba(255,255,255,0.08);
      border-radius: 12px;
      padding: 12px;
      backdrop-filter: blur(15px);
      box-shadow: 0 8px 24px rgba(0,0,0,0.35), 0 2px 8px rgba(0,0,0,0.15);
  }

  .dispatcher-selector {
      display: flex;
      align-items: center;
      gap: 12px;
  }

  .dispatcher-selector label {
      font-weight: 600;
      color: #e7edf6;
      white-space: nowrap;
  }

  .dispatcher-selector select {
      padding: 8px 12px;
      border: 1px solid rgba(255,255,255,0.15);
      border-radius: 8px;
      background: rgba(255,255,255,0.08);
      color: #e7edf6;
      font-size: 14px;
      min-width: 200px;
      cursor: pointer;
      backdrop-filter: blur(5px);
  }

  .dispatcher-selector select option {
      background: rgba(15,22,34,0.95);
      color: #e7edf6;
  }

  .dispatcher-selector select:focus {
      outline: none;
      border-color: #4f9cff;
      box-shadow: 0 0 0 3px rgba(79,156,255,0.15);
  }

          /* Chat panel look & feel в стиле Telegram - темна тема */
          .static-chat-panel {
            display: flex;
            flex-direction: column;
            height: 100%;
            min-height: 500px;
            border: 1px solid rgba(255,255,255,0.08);
            border-radius: 14px;
            overflow: hidden;
            background: linear-gradient(180deg, rgba(15,22,34,0.8), rgba(11,17,26,0.9));
            backdrop-filter: blur(15px);
          }
    
          .chat-header {
            padding: 12px 14px;
            background: linear-gradient(180deg, rgba(15,22,34,0.9), rgba(11,17,26,0.95));
            border-bottom: 1px solid rgba(255,255,255,0.08);
            backdrop-filter: blur(10px);
          }
    
          .chat-title {
            display: flex;
            align-items: baseline;
            gap: 8px;
            font-weight: 600;
            color: #e7edf6;
          }
    
          .chat-title .online-status {
            font-size: 12px;
            color: #35d09f;
          }
    
          .chat-messages {
            flex: 1;
            overflow-y: auto;
            padding: 12px 12px 6px;
            background: linear-gradient(180deg, rgba(15,22,34,0.3), rgba(11,17,26,0.5));
            display: flex;
            flex-direction: column;
            gap: 6px;
            backdrop-filter: blur(5px);
          }
    
          /* Разделитель даты */
          .date-divider {
            display: flex;
            justify-content: center;
            margin: 8px 0;
          }
          .date-divider > span {
            background: rgba(15,22,34,0.8);
            color: #e7edf6;
            font-size: 12px;
            padding: 4px 10px;
            border-radius: 999px;
            user-select: none;
            backdrop-filter: blur(10px);
            border: 1px solid rgba(255,255,255,0.08);
          }
    
          /* Сообщения */
          .message {
            max-width: 75%;
            position: relative;
            padding: 8px 10px 18px;
            border-radius: 12px;
            line-height: 1.3;
            word-wrap: break-word;
            box-shadow: 0 1px 0 rgba(0,0,0,0.03);
          }
          .message.received {
            align-self: flex-start;
            background: rgba(255,255,255,0.08);
            border: 1px solid rgba(255,255,255,0.15);
            border-top-left-radius: 4px;
            color: #e7edf6;
          }
          .message.sent {
            align-self: flex-end;
            background: linear-gradient(135deg, rgba(79,156,255,0.3), rgba(123,97,255,0.2));
            border: 1px solid rgba(79,156,255,0.4);
            border-top-right-radius: 4px;
            color: #e7edf6;
          }
    
          /* Время в правом нижнем углу пузырька */
          .message-time {
            position: absolute;
            right: 8px;
            bottom: 4px;
            font-size: 11px;
            color: #a9b6c7;
          }
    
          /* Инпут как в Телеграм */
          .chat-input-container {
            display: flex;
            align-items: center;
            gap: 8px;
            padding: 10px;
            background: linear-gradient(180deg, rgba(15,22,34,0.9), rgba(11,17,26,0.95));
            border-top: 1px solid rgba(255,255,255,0.08);
            backdrop-filter: blur(10px);
          }
    
          .chat-input {
            flex: 1;
            padding: 10px 12px;
            border-radius: 20px;
            border: 1px solid rgba(255,255,255,0.15);
            outline: none;
            background: rgba(255,255,255,0.08);
            color: #e7edf6;
            backdrop-filter: blur(5px);
          }
          .chat-input:focus {
            border-color: #4f9cff;
            box-shadow: 0 0 0 3px rgba(79,156,255,0.15);
          }
          .chat-input::placeholder {
            color: #a9b6c7;
          }
    
          .send-message-btn {
            border: none;
            background: linear-gradient(135deg, #4f9cff, #7b61ff);
            color: #fff;
            width: 40px;
            height: 40px;
            border-radius: 50%;
            cursor: pointer;
            transition: all 0.3s ease;
            box-shadow: 0 4px 12px rgba(79,156,255,0.3);
          }
          .send-message-btn:hover {
            transform: scale(1.05);
            box-shadow: 0 6px 16px rgba(79,156,255,0.4);
          }

          /* Фиксируем окно чата, чтобы страница не растягивалась */
          .chat-panel-container {
            display: flex;
            flex-direction: column;
            /* высота в пределах окна, но не меньше 420px */
            max-height: 70vh;
            min-height: 420px;
            overflow: hidden; /* всё, что выше — скрыть, прокрутку даём только ленте */
          }
          /* Панель заполняет контейнер и не навязывает свой min-height */
          #chatPanel.static-chat-panel {
            height: 100%;
            max-height: 100%;
            min-height: 0 !important; /* перебиваем возможные внешние min-height */
            display: flex;
            flex-direction: column;
          }
          /* Прокрутка только для ленты сообщений */
          #chatPanel .chat-messages {
            flex: 1;
            overflow-y: auto;
            -webkit-overflow-scrolling: touch; /* плавная прокрутка на iOS */
          }

/* Додаткові стилі для календарика на сторінці Пульт */
.date-picker-btn {
  background: linear-gradient(135deg, rgba(15,22,34,0.8), rgba(11,17,26,0.9)) !important;
  border: 1px solid rgba(255,255,255,0.15) !important;
  color: var(--text) !important;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 13px;
  cursor: pointer;
  backdrop-filter: blur(10px);
  transition: all 0.2s ease;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.date-picker-btn:hover {
  background: linear-gradient(135deg, rgba(24,34,51,0.9), rgba(15,22,34,0.95)) !important;
  border-color: rgba(79,156,255,0.4) !important;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.date-picker-btn:focus {
  border-color: rgba(79,156,255,.65) !important;
  box-shadow: 0 0 0 3px rgba(79,156,255,.18) !important;
  outline: none;
}

/* Стилі для календарика в модальних вікнах */
.modal input[type="date"],
.slide-panel input[type="date"] {
  background: rgba(15,22,34,0.9) !important;
  border: 1px solid rgba(255,255,255,0.2) !important;
  color: var(--text) !important;
}

/* Стилі для кнопок дат в панелі подій */
.events-panel .date-btn {
  background: linear-gradient(135deg, rgba(15,22,34,0.7), rgba(11,17,26,0.8)) !important;
  border: 1px solid rgba(255,255,255,0.12) !important;
  color: var(--text) !important;
  padding: 6px 10px;
  border-radius: 6px;
  font-size: 12px;
  cursor: pointer;
  backdrop-filter: blur(8px);
  transition: all 0.2s ease;
}

.events-panel .date-btn:hover {
  background: linear-gradient(135deg, rgba(79,156,255,0.2), rgba(123,97,255,0.15)) !important;
  border-color: rgba(79,156,255,0.3) !important;
  transform: scale(1.02);
}

.events-panel .date-btn.active {
  background: linear-gradient(135deg, rgba(79,156,255,0.3), rgba(123,97,255,0.2)) !important;
  border-color: rgba(79,156,255,0.5) !important;
  font-weight: 600;
}

/* ========== Стилі для попереднього перегляду файлів ========== */
.chat-files-preview {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 8px 10px;
  max-height: 120px;
  overflow-y: auto;
  background: rgba(15,22,34,0.6);
  border-top: 1px solid rgba(255,255,255,0.08);
  flex-shrink: 0;
}

.chat-file-item {
  position: relative;
  width: 80px;
  height: 80px;
  border-radius: 6px;
  overflow: hidden;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
}

.chat-file-item img,
.chat-file-item video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.chat-file-item .file-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  font-size: 32px;
  color: #4f9cff;
}

.chat-file-remove {
  position: absolute;
  top: 2px;
  right: 2px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: rgba(239,68,68,0.9);
  color: white;
  border: none;
  cursor: pointer;
  font-size: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  transition: background 0.2s;
}

.chat-file-remove:hover {
  background: rgba(239,68,68,1);
}

/* ========== Стилі для медіа у повідомленнях ========== */
.message-media {
  margin-top: 8px;
  width: 100%;
  min-width: 200px;
  max-width: 280px;
  height: 200px;
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  position: relative;
  background: rgba(255,255,255,0.05);
  display: flex;
  align-items: center;
  justify-content: center;
}

.message-media::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(255,255,255,0.05) 0%, rgba(255,255,255,0.12) 50%, rgba(255,255,255,0.05) 100%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  opacity: 1;
  transition: opacity 0.3s;
}

.message-media::after {
  content: '⏳';
  position: absolute;
  font-size: 32px;
  opacity: 0.5;
  z-index: 0;
  transition: opacity 0.3s;
}

.message-media.loaded::before,
.message-media.loaded::after {
  opacity: 0;
}

@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

.message-media img,
.message-media video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  position: relative;
  z-index: 1;
  opacity: 0;
  transition: opacity 0.3s;
}

.message-media.loaded img,
.message-media.loaded video {
  opacity: 1;
}

.message-media video {
  background: #000;
}

.message-file {
  margin-top: 8px;
  padding: 8px 12px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 6px;
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  transition: background 0.2s;
}

.message-file:hover {
  background: rgba(255,255,255,0.08);
}

.message-file-icon {
  font-size: 24px;
  color: #4f9cff;
}

.message-file-name {
  flex: 1;
  font-size: 13px;
  color: #e7edf6;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Адаптація для маленьких екранів */
@media (max-width: 400px) {
  .message-media {
    min-width: 180px;
    max-width: 100%;
    height: 160px;
  }
  .message {
    max-width: 85%;
  }
}

/* Стилі для розділювача дат у чаті */
.date-separator {
  text-align: center;
  margin: 16px 0;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #a9b6c7;
  font-size: 12px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.date-separator::before,
.date-separator::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(to right, transparent, rgba(255,255,255,0.1), transparent);
}

.date-separator::before {
  margin-right: 12px;
}

.date-separator::after {
  margin-left: 12px;
}

/* Стилі для відповідей на повідомлення */
.message-reply-preview {
  background: rgba(79,156,255,0.15);
  border-left: 3px solid rgba(79,156,255,0.6);
  padding: 6px 8px;
  margin-bottom: 6px;
  border-radius: 4px;
  font-size: 11px;
  color: #a9b6c7;
  cursor: pointer;
}

.message-reply-preview:hover {
  background: rgba(79,156,255,0.2);
}

.message-reply-author {
  font-weight: 600;
  color: #4f9cff;
  margin-bottom: 2px;
}

.message-reply-text {
  color: #e7edf6;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 100%;
}

.message-reply-btn {
  position: absolute;
  bottom: 4px;
  background: rgba(79,156,255,0.25);
  border: 1px solid rgba(79,156,255,0.4);
  color: #e7edf6;
  width: 24px;
  height: 24px;
  border-radius: 6px;
  font-size: 14px;
  cursor: pointer;
  opacity: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
}

.message.received .message-reply-btn {
  right: -32px;
}

.message.sent .message-reply-btn {
  left: -32px;
}

/* Стилі для попереднього перегляду відповіді у полі вводу */
.reply-input-preview {
  display: none;
  background: rgba(79,156,255,0.1);
  border-left: 3px solid rgba(79,156,255,0.6);
  padding: 8px 10px;
  margin: 0 10px 8px 10px;
  border-radius: 4px;
  position: relative;
}

.reply-input-preview.active {
  display: block;
}

.reply-input-preview-author {
  font-size: 11px;
  font-weight: 600;
  color: #4f9cff;
  margin-bottom: 4px;
}

.reply-input-preview-text {
  font-size: 12px;
  color: #e7edf6;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.reply-input-preview-close {
  position: absolute;
  top: 4px;
  right: 4px;
  background: rgba(255,101,118,0.2);
  border: none;
  color: #e7edf6;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 14px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.reply-input-preview-close:hover {
  background: rgba(255,101,118,0.35);
}