 .collapsible-hidden {
    display: none;
  }
  .collapsible-content a {
    margin-right: 5px;
  }
  .toggle-btn {
    cursor: pointer;
    color: #0645AD;
    background: none;
    border: none;
    padding: 0;
    font: inherit;
    text-decoration: underline;
  }


 
@media (max-width: 1000px) {
  .hide-on-mobile {
    display: none;
  }
}










#chat-window {
    width: 100%;
    height: 300px;
    border: 1px solid #f3f3f3; /* очень светлая рамка */
    padding: 0px;
    overflow-y: auto;
    background: #fff;
    font-family: Arial, sans-serif;
    font-size: 14px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    scroll-behavior: smooth;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05); /* легкая тень */
    border-radius: 8px; /* чуть закругленные края */
    margin-bottom: 30px; /* Отступ снизу */
    padding-left: 10px;   /* отступ слева */
    padding-right: 10px;  /* отступ справа */
}

#chat-window {
    overflow-y: auto;
    scrollbar-width: none; /* Firefox */
}

#chat-window::-webkit-scrollbar {
    display: none; /* Chrome, Safari, Opera */
}

 


.message {
    display: flex;
    max-width: 75%;
    padding: 12px 14px;
    border-radius: 12px;
    align-items: flex-start;
    gap: 10px;
    box-shadow: 0 1px 6px rgba(0,0,0,0.06);
    font-weight: 400;
    line-height: 1.4;
}

.message.user, .message.guest {
    align-self: flex-end;
    background-color: #f3f3f3;  /* светло-серый фон для бота */
    color: #222;
    flex-direction: row-reverse;
}

.message.bot {
    align-self: flex-start;
    background-color: #f3f3f3; /* светло-серый фон для бота */
    color: #222;
    flex-direction: row;
}

.avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
}

.message .username {
    font-weight: 600;
    margin-bottom: 4px;
    font-size: 13px;
    color: #555;
}

.message-text {
    white-space: pre-wrap;
    word-break: break-word;
}

#chat-input {
    width: calc(100% - 110px);
    padding: 10px 14px;
    font-size: 14px;
    box-sizing: border-box;
    border: 1px solid #f3f3f3;
    border-radius: 12px; /* плавное закругление */
    outline: none;
    transition: border-color 0.3s ease;
    margin-right: 8px; /* отступ справа от поля ввода */
}

#chat-input:focus {
    border-color: #0968d7;
    box-shadow: 0 0 5px rgba(9, 104, 215, 0.3);
}

#send-btn {
    width: 90px;
    padding: 10px 0;
    font-size: 14px;
    background-color: #0968d7;
    border: none;
    border-radius: 12px;
    color: white;
    cursor: pointer;
    transition: background-color 0.3s ease; 
}

#send-btn:hover:not(:disabled) {
    background-color: #0755b7;
}

#send-btn:disabled {
    background-color: #bbb;
    cursor: not-allowed;
}

 


.user-panel {
  display: flex;
  align-items: center;
  cursor: pointer;
  user-select: none;
}

.user-panel img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  margin-right: 10px;
}

.user-menu {
  position: absolute; /* или fixed, если нужно */
  top: 60px; /* под user-panel */
  right: 10px;
  background: white;
  border: 1px solid #ccc;
  border-radius: 12px;
  box-shadow: 0 10px 15px rgba(0,0,0,0.1);
  padding: 15px;
  width: 300px;
  box-sizing: border-box;
  z-index: 1000;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.user-menu[hidden] {
  display: none;
}

.user-menu a,
.user-menu div a {
  display: block;
  padding: 8px 12px;
  margin: 5px 0;
  color: #007BFF;
  text-decoration: none;
  border-radius: 6px;
  font-weight: 600;
  transition: background-color 0.3s ease;
}

.user-menu a:hover,
.user-menu div a:hover {
  background-color: #0056b3;
  color: #fff;
  text-decoration: none;
}









 .infotxt {
    display: flex;
    background: #ffffff;
    border-radius: 8px;
    padding: 16px;
    gap: 20px;
    box-sizing: border-box;
    max-width: 100%;
    margin: 20px auto;
    border: 1px solid #f3f3f3; /* очень светлая рамка */
  }
  .infotxt .part {
    flex: 1;
    color: #333;
    font-family: Arial, sans-serif;
  }

  /* Адаптация под мобильные */
  @media (max-width: 768px) {
    .infotxt {
      flex-direction: column;
      padding: 12px;
    }
    .infotxt .part {
      width: 100%;
    }
  
}

 


.info-block {
  display: flex;
  align-items: stretch;
  border-radius: 8px;  /* Закругление только у общего контейнера */
  position: relative; /* для корректного позиционирования, если понадобится вложенный контент */
  background-image: url('/img/f.png'); /* путь к фоновому изображению */
  background-repeat: no-repeat; /* запрещаем повторение */
  background-position: right center; /* выравнивание по правому краю по горизонтали и по центру по вертикали */
  background-size: auto 150%; /* высота фонового изображения 100% по высоте блока, ширина автоматически, сохраняется пропорция */
  background-color: #f3f3f3; /* светлая заливка фона, можно менять */
  width: 100%; /* ширина блока */
  height: 500px; /* пример фиксированной высоты, подберите под ваш дизайн */
  overflow: hidden; /* чтобы не было прокрутки, если что-то выходит за пределы */
  box-sizing: border-box;
  padding: 0px; /* если нужно внутренние отступы */
    border: 1px solid #f3f3f3; /* очень светлая рамка */


 /* сохраним пропорции и не искажать */
  object-fit: contain;

  /* для чёткого масштабирования */
  image-rendering: crisp-edges; /* работает в некоторых браузерах */
  image-rendering: pixelated; /* для масштабирования пиксельных изображений */

  /* для устройств с высокой плотностью пикселей */
  image-rendering: -webkit-optimize-contrast; 
  image-rendering: -moz-crisp-edges;
  image-rendering: -o-crisp-edges;
  image-rendering: crisp-edges;


}




.info-text {
  flex: 1 1 50%;
  padding: 20px;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.info-image {
  flex: 1 1 50%;
  position: relative;
  overflow: hidden;
  margin: 0;
  padding: 0;
 /* сохраним пропорции и не искажать */
  object-fit: contain;

  /* для чёткого масштабирования */
  image-rendering: crisp-edges; /* работает в некоторых браузерах */
  image-rendering: pixelated; /* для масштабирования пиксельных изображений */

  /* для устройств с высокой плотностью пикселей */
  image-rendering: -webkit-optimize-contrast; 
  image-rendering: -moz-crisp-edges;
  image-rendering: -o-crisp-edges;
  image-rendering: crisp-edges;
}

.info-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  display: block;
  margin: 0;   /* Убираем отступы */
  padding: 0;
  border-radius: 0;  /* Без скруглений у изображения */
 /* сохраним пропорции и не искажать */
  object-fit: contain;

  /* для чёткого масштабирования */
  image-rendering: crisp-edges; /* работает в некоторых браузерах */
  image-rendering: pixelated; /* для масштабирования пиксельных изображений */

  /* для устройств с высокой плотностью пикселей */
  image-rendering: -webkit-optimize-contrast; 
  image-rendering: -moz-crisp-edges;
  image-rendering: -o-crisp-edges;
  image-rendering: crisp-edges;
}

/* Мобильная адаптация: */
@media (max-width: 1068px) {
  .info-block {
    flex-direction: column;
    height: auto;
    border-radius: 12px;
  }
  .info-text, .info-image {
    flex: none;
    width: 100%;
    height: auto;
    padding: 15px 10px;
    margin: 0;
  }
.info-image {
  flex: 1 1 70%;
  height: 200px;
  margin: 0;
  padding: 0;
  overflow: hidden;
  border-radius: 8px;    /* Скругление контейнера */
  display: flex;
  align-items: flex-end;
  justify-content: center;
  box-sizing: border-box;
  background-clip: padding-box; /* Контролирует область заливки */
}

.info-image img {
  height: 100%;
  width: auto;
  object-fit: cover;          /* Можно заменить на contain, но с cover заполняется вся область */
  object-position: center bottom;
  border-radius: 8px;         /* Такой же радиус, чтобы совпадало с контейнером */
  margin: 0;
  padding: 0;
  display: block;
}

}













/* Общие настройки */
body {
  font-family: Arial, sans-serif;
  margin: 0;
  background: #fff;
  color: #333333; /* темно-серый текст */
  display: flex;
  justify-content: center;
}
#page-wrapper {
  width: 100%;
  max-width: 1200px;
  padding: 0 15px;
  box-sizing: border-box;
}
/* Хедер */
header {
  background: #fff;
  color: #333333;
  padding: 22px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  border-bottom: 0px solid #ccc;
}
 

header img.logo {
  width: 65px;
  height: 65px;

  /* сохраним пропорции и не искажать */
  object-fit: contain;

  /* для чёткого масштабирования */
  image-rendering: crisp-edges; /* работает в некоторых браузерах */
  image-rendering: pixelated; /* для масштабирования пиксельных изображений */

  /* для устройств с высокой плотностью пикселей */
  image-rendering: -webkit-optimize-contrast; 
  image-rendering: -moz-crisp-edges;
  image-rendering: -o-crisp-edges;
  image-rendering: crisp-edges;
}











header h1 {
  margin: 0;
  font-size: 1.5em;
  font-weight: 700;
  letter-spacing: 0.05em;
}
/* Навигация */
nav {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
}
nav a {
  color: #007BFF; /* стандартный синий цвет ссылок */
  text-decoration: none; /* без подчеркивания по умолчанию */
  margin-left: 18px;
  font-weight: 700;
  font-size: 1em;
  padding-bottom: 4px;
  transition: color 0.3s ease;
  cursor: pointer;
}
nav a:hover,
nav a:focus {
  text-decoration: underline; /* подчеркнуты только при наведении */
  color: #0056b3; /* темнее при наведении */
  outline: none;
}



 





/* Основной контент */
main {
  padding: 5px 0;
}
/* Контентные блоки */
.company-details ul {
  list-style: none;
  padding: 0;
  width: 100%;
  max-width: 1300px;
  margin: 0 auto 30px auto;
  box-sizing: border-box;
}
.company-details li {
  padding: 8px 0;
  border-bottom: 1px solid #ccc;
}
.company-details li strong {
  width: 150px;
  display: inline-block;
  font-weight: 700;
  color: #333333;
}
/* Формы */
form label {
  display: block;
  margin-top: 15px;
  font-weight: 90%;
  color: #333333;
}
form input[type="text"],
form input[type="number"],
form input[type="date"],
form select,
form textarea,
form input[type="search"] {
  width: 100%;
  padding: 10px;
  margin-top: 6px;
  box-sizing: border-box;
  border: 1px solid #ccc;
  border-radius: 8px; /* закругленные углы */
  background: #f7f7f7; /* светло-серый фон */
  color: #333333;
  font-size: 1em;
  transition: border-color 0.3s ease;
}
form input[type="text"]:focus,
form input[type="number"]:focus,
form input[type="date"]:focus,
form select:focus,
form textarea:focus,
form input[type="search"]:focus {
  border-color: #007BFF;
  outline: none;
  background: #fff;
}
/* Кнопки */
form button {
  margin-top: 20px;
  padding: 10px 25px;
  background-color: #007BFF; /* синий фон */
  color: #fff;
  border: none;
  border-radius: 8px; /* закругленные углы */
  cursor: pointer;
  font-weight: 700;
  font-size: 1em;
  transition: background-color 0.3s ease;
  width: auto;
}
form button:hover,
form button:focus {
  background-color: #0056b3;
  outline: none;
}





a.button {
  display: inline-block;
  margin-top: 20px;
  padding: 10px 25px;
  background-color: #007BFF; /* синий фон */
  color: #fff;
  text-decoration: none; /* убрать подчеркивание */
  border: none;
  border-radius: 8px; /* закругленные углы */
  cursor: pointer;
  font-weight: 700;
  font-size: 1em;
  transition: background-color 0.3s ease;
  width: auto;
  text-align: center;
  width: 50%;
}

a.button:hover,
a.button:focus {
  background-color: #0056b3;
  color: #fff;
  outline: none;
  text-decoration: none; /* убрать подчеркивание */
}





/* Ссылки вне навигации */
a {
  color: #007BFF;
  text-decoration: underline;
  cursor: pointer;
  transition: color 0.3s ease;
}
a:hover,
a:focus {
  text-decoration: underline;
  color: #0056b3;
  outline: none;
}
/* Ошибки и сообщения */
.message {
  color: #cc0000;
  font-weight: 700;
  margin-bottom: 20px;
}
/* Мелкие блоки */
.deal-item, .comment-item, .task-item, .file-item {
  margin-bottom: 20px;
  border: 1px solid #ccc;
  padding: 15px;
  border-radius: 8px;
  background: #f9f9f9;
}
/* Заголовки мелких блоков */
.deal-header {
  font-weight: 700;
  font-size: 1.1em;
  margin-bottom: 10px;
}
 
/* Общие стили для формы фильтрации */
.filter-form {
  margin-bottom: 20px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  max-width: 100%;
}
.filter-form label {
  font-weight: 700;
  color: #333333;
  display: flex;
  flex-direction: column;
  font-size: 0.9em;
}
.filter-form input,
.filter-form select {
  padding: 8px 12px;
  font-size: 1em;
  border: 1px solid #ccc;
  border-radius: 8px;
  background: #f7f7f7;
  color: #333333;
  width: 150px;
  box-sizing: border-box;
  transition: border-color 0.3s ease;
}
.filter-form input[type=number] {
  width: 90px;
}
.filter-form input:focus,
.filter-form select:focus {
  border-color: #007BFF;
  outline: none;
  background: #fff;
}
/* Кнопки формы фильтрации */
.filter-form button,
.filter-reset {
  background-color: #007BFF;
  color: #fff;
  border: none;
  cursor: pointer;
  padding: 8px 20px;
  font-weight: 700;
  border-radius: 8px;
  transition: background-color 0.3s ease;
  margin-left: 10px;
  height: 40px;
  align-self: flex-end;
  white-space: nowrap;
}
.filter-form button:hover,
.filter-reset:hover {
  background-color: #0056b3;
}
.filter-reset {
  text-decoration: none;
  display: inline-flex;
  justify-content: center;
  align-items: center;
}
/* Контейнер списка компаний */
.company-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.company-list li {
  border-bottom: 1px solid #ccc;
  padding: 12px 0;
}
.company-card {
  display: block;
  color: #007BFF;
  text-decoration: none;
  font-weight: 700;
  margin-bottom: 6px;
  cursor: pointer;
}
.company-card:hover,
.company-card:focus {
  text-decoration: underline;
  color: #0056b3;
}
.company-inn,
.company-contact {
  font-weight: normal;
  font-size: 0.9em;
  color: #333333;
}
hr {
  border: none;
  border-top: 1px solid #eee;
  margin: 12px 0;
}
.company-website {
  font-size: 0.9em;
  color: #007BFF;
  text-decoration: none;
}
.company-website:hover,
.company-website:focus {
  text-decoration: underline;
  color: #0056b3;
}
/* Пагинация */
.pagination {
  margin-top: 20px;
  text-align: center;
}
.pagination a {
  margin: 0 10px;
  color: #007BFF;
  text-decoration: none;
  font-weight: 700;
}
.pagination a:hover,
.pagination a:focus {
  text-decoration: underline;
  color: #0056b3;
}



.tz-container {
    max-width: 100%;
    margin: 0 auto;
    padding: 20px;
    font-family: Arial, sans-serif;
    color: #333;
}
.tz-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
}
.tz-header img {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #007BFF;
}
.tz-header .user-info {
    flex-grow: 1;
}
.tz-header .user-info a {
    color: #007BFF;
    text-decoration: none;
    font-weight: bold;
}
.tz-header .user-info a:hover {
    text-decoration: underline;
}
.tz-info p {
    margin: 5px 0;
}
.status {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 12px;
    font-weight: 700;
    color: #fff;
}
.status.новое {
    background-color: #007bff;
}
.status.выполнено {
    background-color: #28a745;
}
.status.в работе {
    background-color: #ffc107;
    color: #212529;
}
.status.отменено {
    background-color: #dc3545;
}
.documents ul {
    padding-left: 20px;
}
.comment {
    border-bottom: 1px solid #ddd;
    padding: 10px 0;
    display: flex;
    gap: 10px;
}
.comment img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid #aaa;
    cursor: pointer;
}
.comment-content {
    flex-grow: 1;
}
.comment-content strong a {
    color: #007BFF;
    text-decoration: none;
}
.comment-content strong a:hover {
    text-decoration: underline;
}
.comment-content small {
    color: #666;
}
.comment-form textarea {
    width: 100%;
    height: 80px;
    padding: 6px;
    font-size: 14px;
    box-sizing: border-box;
}
.comment-form button {
    margin-top: 10px;
    padding: 8px 20px;
    background-color: #007BFF;
    color: #fff;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    font-size: 1em;
}
.comment-form button:hover {
    background-color: #0056b3;


