/*
 * This is a manifest file that'll be compiled into application.css.
 */

/* Основная цветовая палитра */
:root {
  --primary-color: #6B73A8;      /* Спокойный сиреневый */
  --secondary-color: #8B9DC3;    /* Мягкий голубой */
  --accent-color: #A8B2D1;       /* Светло-лавандовый */
  --success-color: #7FB069;      /* Приглушенный зеленый */
  --warning-color: #D4A574;      /* Теплый бежевый */
  --danger-color: #C57C7C;       /* Мягкий розовый */
  --info-color: #7BB3C0;         /* Спокойный бирюзовый */
  --dark-color: #5A5A5A;         /* Темно-серый */
  --light-color: #F8F9FB;        /* Очень светлый */
  --background-color: #FAFBFC;   /* Фоновый */
  --card-background: #FFFFFF;    /* Белый для карточек */
  --border-color: #E1E5E9;       /* Границы */
  --text-primary: #2C3E50;       /* Основной текст */
  --text-secondary: #6C757D;     /* Вторичный текст */
  --shadow-light: rgba(107, 115, 168, 0.1);
  --shadow-medium: rgba(107, 115, 168, 0.15);
}

/* Общие стили */
body {
  background-color: var(--background-color);
  color: var(--text-primary);
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  line-height: 1.6;
}

/* Переопределение Bootstrap цветов */
.btn-primary {
  background-color: var(--primary-color);
  border-color: var(--primary-color);
  color: white;
  transition: all 0.3s ease;
}

.btn-primary:hover {
  background-color: #5A6394;
  border-color: #5A6394;
  transform: translateY(-1px);
  box-shadow: 0 4px 8px var(--shadow-medium);
}

.btn-outline-primary {
  color: var(--primary-color);
  border-color: var(--primary-color);
}

.btn-outline-primary:hover {
  background-color: var(--primary-color);
  border-color: var(--primary-color);
}

.btn-secondary {
  background-color: var(--secondary-color);
  border-color: var(--secondary-color);
}

.btn-outline-secondary {
  color: var(--secondary-color);
  border-color: var(--secondary-color);
}

.btn-outline-secondary:hover {
  background-color: var(--secondary-color);
  border-color: var(--secondary-color);
}

.btn-danger {
  background-color: var(--danger-color);
  border-color: var(--danger-color);
}

.btn-outline-danger {
  color: var(--danger-color);
  border-color: var(--danger-color);
}

.btn-outline-danger:hover {
  background-color: var(--danger-color);
  border-color: var(--danger-color);
}

/* Карточки */
.card {
  background-color: var(--card-background);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  box-shadow: 0 2px 12px var(--shadow-light);
  transition: all 0.3s ease;
}

.card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px var(--shadow-medium);
}

.card-header {
  background-color: var(--light-color);
  border-bottom: 1px solid var(--border-color);
  border-radius: 12px 12px 0 0 !important;
  font-weight: 600;
  color: var(--text-primary);
}

/* Таблицы */
.table {
  color: var(--text-primary);
}

.table thead th {
  background-color: var(--light-color);
  border-color: var(--border-color);
  color: var(--text-primary);
  font-weight: 600;
}

.table-striped > tbody > tr:nth-of-type(odd) > td {
  background-color: #FAFBFC;
}

/* Значки */
.bg-danger { background-color: var(--danger-color) !important; }
.bg-warning { background-color: var(--warning-color) !important; }
.bg-info { background-color: var(--info-color) !important; }
.bg-success { background-color: var(--success-color) !important; }
.bg-dark { background-color: var(--dark-color) !important; }
.bg-secondary { background-color: var(--secondary-color) !important; }

/* Формы */
.form-control {
  border: 1px solid var(--border-color);
  border-radius: 8px;
  transition: all 0.3s ease;
}

.form-control:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 0.2rem rgba(107, 115, 168, 0.25);
}

.form-select {
  border: 1px solid var(--border-color);
  border-radius: 8px;
}

.form-select:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 0.2rem rgba(107, 115, 168, 0.25);
}

/* Алерты */
.alert {
  border-radius: 8px;
  border: none;
}

.alert-danger {
  background-color: rgba(197, 124, 124, 0.1);
  color: var(--danger-color);
}

.alert-success {
  background-color: rgba(127, 176, 105, 0.1);
  color: var(--success-color);
}

/* Навигация и хедер */
.navbar {
  background-color: var(--card-background) !important;
  border-bottom: 1px solid var(--border-color);
  box-shadow: 0 2px 4px var(--shadow-light);
}

/* Анимации */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.fade-in {
  animation: fadeIn 0.6s ease-out;
}

/* Адаптивность */
@media (max-width: 768px) {
  .container {
    padding-left: 15px;
    padding-right: 15px;
  }
  
  .card {
    margin-bottom: 20px;
  }
  
  .btn-group {
    flex-direction: column;
    gap: 5px;
  }
  
  .btn-group .btn {
    margin-bottom: 5px;
  }
}

/* Дополнительные утилиты */
.text-muted {
  color: var(--text-secondary) !important;
}

.gradient-bg {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
}

.glass-effect {
  backdrop-filter: blur(10px);
  background-color: rgba(255, 255, 255, 0.9);
}

/* Unified approval chain */
.unified-chain { margin:0; padding:0; list-style:none; }
.unified-chain .step-circle { width:34px; height:34px; border-radius:50%; background: var(--secondary-color); color:#fff; display:flex; align-items:center; justify-content:center; font-weight:600; box-shadow:0 0 0 3px #fff, 0 2px 6px var(--shadow-light); position:relative; transition:all .25s ease; }
.unified-chain .step-circle.done { background: var(--success-color); }
.unified-chain .step-circle.rejected { background: var(--danger-color); }
.unified-chain .step-circle.current { background: var(--info-color); }
.unified-chain li { position:relative; }
.unified-chain li:not(:last-child):after { content:''; position:absolute; left:16px; top:34px; width:2px; height:calc(100% - 34px); background: var(--border-color); }
.unified-chain li .step-circle.done ~ * li:not(:last-child):after { background: var(--success-color); }
.unified-chain .attachments i { font-size:14px; }
.unified-chain .attachments span { background: var(--light-color); border-radius:4px; padding:2px 4px; }

/* Timeline (history list) */
.timeline { position:relative; padding-left:30px; }
.timeline-item { position:relative; margin-bottom:20px; padding-bottom:20px; }
.timeline-item:not(.timeline-item-last):after { content:''; position:absolute; left:-19px; top:30px; height:calc(100% - 10px); width:2px; background-color: var(--border-color); }
.timeline-marker { position:absolute; left:-30px; top:0; width:22px; height:22px; display:flex; align-items:center; justify-content:center; }
.timeline-content { background: var(--light-color); border-radius:8px; padding:15px; }

/* Вкладки */
.home-tabs .nav-link { position:relative; padding:0.75rem 1.25rem; border-radius:30px; font-weight:600; color: var(--text-secondary); background: var(--light-color); margin:0 6px; display:flex; align-items:center; box-shadow:0 2px 6px var(--shadow-light); transition:all .3s ease; }
.home-tabs .nav-link .badge { font-size:10px; letter-spacing:.5px; transition: color .2s ease, background-color .2s ease; }
.home-tabs .nav-link:hover { color: var(--primary-color); transform: translateY(-2px); }
.home-tabs .nav-link.active { background: linear-gradient(135deg, var(--primary-color), var(--secondary-color)); color:#fff; box-shadow:0 4px 12px var(--shadow-medium); }
.home-tabs .nav-link.active .badge { background: rgba(255,255,255,0.85)!important; color:#000 !important; }
/* Черные цифры в бейджах при фокусе/ховере */
.home-tabs .nav-link:focus .badge,
.home-tabs .nav-link:focus-visible .badge,
.home-tabs .nav-link:hover .badge { color:#000 !important; }

/* Список сотрудников */
.avatar-circle { width:44px; height:44px; border-radius:50%; background: linear-gradient(135deg, var(--secondary-color), var(--accent-color)); color:#fff; font-weight:600; display:flex; align-items:center; justify-content:center; font-size:14px; box-shadow:0 2px 6px var(--shadow-light); }
.employee-item { border:1px solid var(--border-color); border-radius:10px; margin-bottom:10px; background: var(--card-background); transition:all .25s ease; }
.employee-item:hover { transform: translateY(-2px); box-shadow:0 6px 16px var(--shadow-medium); }
.employee-item .role-badge { background: var(--light-color); color: var(--text-secondary); font-size:11px; border-radius:4px; padding:2px 6px; }
.perf-progress { background: var(--light-color); }
.perf-value { font-weight:600; }

@media (max-width: 576px) {
  .home-tabs .nav-link { margin:4px 4px; width:100%; justify-content:center; }
  .employee-item { padding:0.75rem; }
}

.app-body { background: radial-gradient(circle at 20% 20%, #ffffff, var(--background-color)); }

/* Chat UI */
.chat-card { border-radius: 12px; overflow: hidden; }
.chat-messages { max-height: 70vh; min-height: 50vh; overflow: auto; background: var(--card-background); padding: 6px 0; }
.mention { background: rgba(255, 215, 0, 0.25); padding: 0 4px; border-radius: 4px; font-weight: 600; }
.chat-avatar { width:36px; height:36px; border-radius:50%; background: linear-gradient(135deg, var(--secondary-color), var(--accent-color)); color:#fff; font-weight:600; display:flex; align-items:center; justify-content:center; font-size:12px; box-shadow:0 2px 6px var(--shadow-light); }
.chat-avatar-sm { width:28px; height:28px; border-radius:50%; background: linear-gradient(135deg, var(--secondary-color), var(--accent-color)); color:#fff; font-weight:600; display:flex; align-items:center; justify-content:center; font-size:11px; box-shadow:0 2px 6px var(--shadow-light); }
.chat-header-actions .btn { padding: .25rem .5rem; }
.chat-sidebar .list-group-item { padding:.6rem .75rem; }
.chat-input .form-control { border-top-left-radius: 12px; border-bottom-left-radius: 12px; }
.chat-input .btn-primary { border-top-right-radius: 12px; border-bottom-right-radius: 12px; }
.app-navbar { backdrop-filter: blur(14px); background: rgba(255,255,255,0.8)!important; border-bottom:1px solid var(--border-color); box-shadow:0 4px 18px var(--shadow-light); position:sticky; top:0; z-index:1030; }
.app-navbar .brand-logo { font-size:1.1rem; font-weight:600; letter-spacing:.5px; }
.logo-icon { width:40px; height:40px; display:flex; align-items:center; justify-content:center; border-radius:12px; background:linear-gradient(135deg,var(--primary-color),var(--secondary-color)); color:#fff; font-size:1.35rem; box-shadow:0 4px 10px var(--shadow-light); }
.nav-accent { position:absolute; left:0; bottom:0; width:100%; height:3px; background:linear-gradient(90deg,var(--primary-color),var(--secondary-color),var(--accent-color)); opacity:.8; }
.user-initials { width:42px; height:42px; border-radius:50%; background:linear-gradient(135deg,var(--secondary-color),var(--accent-color)); color:#fff; display:flex; align-items:center; justify-content:center; font-weight:600; box-shadow:0 2px 8px var(--shadow-light); }
.navbar .nav-link { font-weight:500; padding:.65rem 1rem; border-radius:10px; position:relative; transition:all .3s ease; }
.navbar .nav-link:hover { background:var(--light-color); color:var(--primary-color); }
.navbar .nav-link.active { background:linear-gradient(135deg,var(--primary-color),var(--secondary-color)); color:#fff!important; box-shadow:0 4px 12px var(--shadow-medium); }
.pulse-badge { animation: pulse 1.6s infinite; }
@keyframes pulse { 0% { transform:scale(1); box-shadow:0 0 0 0 rgba(197,124,124,0.6);} 70% { transform:scale(1.05); box-shadow:0 0 0 10px rgba(197,124,124,0);} 100% { transform:scale(1); box-shadow:0 0 0 0 rgba(197,124,124,0);} }
.btn-gradient { background:linear-gradient(135deg,var(--primary-color),var(--secondary-color)); border:none; color:#fff; font-weight:600; box-shadow:0 3px 10px var(--shadow-light); }
.btn-gradient:hover { opacity:.9; color:#fff; }

/* Welcome card enlargement */
.card.welcome-card { border:0; overflow:hidden; position:relative; }
.card.welcome-card .card-header { background:linear-gradient(135deg,var(--primary-color),var(--secondary-color)); color:#fff; position:relative; }
.card.welcome-card .card-header:after { content:""; position:absolute; inset:0; background:radial-gradient(circle at 70% 30%, rgba(255,255,255,.25), transparent 70%); mix-blend-mode:overlay; }
.card.welcome-card .floating-shape { position:absolute; width:160px; height:160px; top:-40px; right:-40px; background:linear-gradient(135deg,var(--accent-color),var(--secondary-color)); filter:blur(10px); opacity:.35; border-radius:50%; animation: float 8s ease-in-out infinite; }
@keyframes float { 0%,100% { transform:translateY(0) scale(1);} 50% { transform:translateY(20px) scale(1.05);} }

/* Прокручиваемый контейнер для списка сотрудников */
.employees-scroll { max-height: 420px; overflow-y: auto; padding-right:8px; }
.employees-scroll::-webkit-scrollbar { width:8px; }
.employees-scroll::-webkit-scrollbar-track { background: var(--light-color); border-radius:10px; }
.employees-scroll::-webkit-scrollbar-thumb { background: linear-gradient(var(--secondary-color), var(--accent-color)); border-radius:10px; box-shadow:0 0 0 2px var(--light-color); }
.employees-scroll::-webkit-scrollbar-thumb:hover { background: linear-gradient(var(--primary-color), var(--secondary-color)); }
/* Firefox */
.employees-scroll { scrollbar-width: thin; scrollbar-color: var(--secondary-color) var(--light-color); }

/* Красивый кастомный чекбокс для пролонгации */
.custom-checkbox-wrapper {
  padding: 1rem;
  background: var(--light-color);
  border: 2px solid var(--border-color);
  border-radius: 10px;
  transition: all 0.3s ease;
}

.custom-checkbox-wrapper:hover {
  background: #fff;
  border-color: var(--primary-color);
  box-shadow: 0 2px 8px var(--shadow-light);
}

.custom-checkbox {
  width: 1.5rem;
  height: 1.5rem;
  margin-top: 0.25rem;
  cursor: pointer;
  border: 2px solid var(--border-color);
  border-radius: 6px;
  transition: all 0.3s ease;
  flex-shrink: 0;
}

.custom-checkbox:hover {
  border-color: var(--primary-color);
  transform: scale(1.05);
}

.custom-checkbox:checked {
  background-color: var(--success-color);
  border-color: var(--success-color);
  box-shadow: 0 0 0 3px rgba(127, 176, 105, 0.15);
}

.custom-checkbox:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px var(--shadow-light);
}

.custom-checkbox-label {
  cursor: pointer;
  display: flex;
  flex-direction: column;
  margin-left: 0.5rem;
  flex-grow: 1;
}

.checkbox-text {
  font-weight: 600;
  color: var(--text-primary);
  font-size: 1rem;
  margin-bottom: 0.25rem;
}

.checkbox-hint {
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.4;
}

/* Красивые радиокнопки для типа подписи */
.form-check-input[type="radio"] {
  cursor: pointer;
  width: 1.25rem;
  height: 1.25rem;
  margin-top: 0.1rem;
  border: 2px solid var(--secondary-color);
  transition: all 0.3s ease;
}

.form-check-input[type="radio"]:checked {
  background-color: var(--primary-color);
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(46, 125, 50, 0.15);
}

.form-check-input[type="radio"]:hover {
  border-color: var(--primary-color);
  transform: scale(1.05);
}

.form-check-input[type="radio"]:focus {
  box-shadow: 0 0 0 0.25rem rgba(46, 125, 50, 0.25);
}

.form-check-label {
  cursor: pointer;
  font-weight: 500;
  color: var(--text-primary);
  transition: color 0.3s ease;
  user-select: none;
}

.form-check:has(.form-check-input[type="radio"]:checked) .form-check-label {
  color: var(--primary-color);
  font-weight: 600;
}

.custom-checkbox-wrapper:has(.custom-checkbox:checked) {
  background: rgba(127, 176, 105, 0.05);
  border-color: var(--success-color);
}

.custom-checkbox-wrapper:has(.custom-checkbox:checked) .checkbox-text {
  color: var(--success-color);
}

/* Стили для карточки информации о договоре */
.card.border-info {
  border-width: 2px;
  border-style: solid;
  transition: all 0.3s ease;
}

.card.border-info:hover {
  box-shadow: 0 4px 12px var(--shadow-medium);
  transform: translateY(-2px);
}

/* Стили для кнопок редактирования комментариев */
.comment-container {
  position: relative;
}

.comment-actions {
  position: absolute;
  top: 8px;
  right: 8px;
  display: none;
  gap: 4px;
  z-index: 10;
}

.comment-actions .btn {
  padding: 4px 8px;
  font-size: 0.875rem;
  opacity: 0.9;
  transition: all 0.2s ease;
}

.comment-actions .btn:hover {
  opacity: 1;
  transform: scale(1.05);
}

.comment-container:hover .comment-actions {
  display: flex;
}

/* Стили для истории изменений комментариев */
.history-version {
  padding: 1rem 0;
}

.history-version .badge {
  font-size: 0.75rem;
  padding: 0.35em 0.65em;
}

/* Стили для модального окна с историей комментариев */
.modal-body {
  scrollbar-width: thin;
  scrollbar-color: var(--primary-color) var(--light-color);
}

.modal-body::-webkit-scrollbar {
  width: 8px;
}

.modal-body::-webkit-scrollbar-track {
  background: var(--light-color);
  border-radius: 4px;
}

.modal-body::-webkit-scrollbar-thumb {
  background: var(--primary-color);
  border-radius: 4px;
  transition: background 0.3s ease;
}

.modal-body::-webkit-scrollbar-thumb:hover {
  background: #5A6394;
}

/* ========================================
   История согласования - Вкладки и стили
   ======================================== */

/* Стили для вкладок */
#historyTabs {
  border-bottom: 2px solid var(--border-color);
}

#historyTabs .nav-link {
  color: var(--text-secondary);
  border: none;
  border-bottom: 3px solid transparent;
  padding: 12px 24px;
  font-weight: 500;
  transition: all 0.3s ease;
  position: relative;
}

#historyTabs .nav-link:hover {
  color: var(--primary-color);
  background-color: var(--light-color);
  border-bottom-color: var(--accent-color);
}

#historyTabs .nav-link.active {
  color: var(--primary-color);
  border-bottom-color: var(--primary-color);
  background-color: transparent;
  font-weight: 600;
}

#historyTabs .badge {
  font-size: 0.75rem;
  padding: 0.25rem 0.5rem;
}

/* Комментарии - новые стили */
.comments-container {
  max-height: 600px;
  overflow-y: auto;
  overflow-x: hidden;
  padding-right: 10px;
}

.comments-container::-webkit-scrollbar {
  width: 8px;
}

.comments-container::-webkit-scrollbar-track {
  background: var(--light-color);
  border-radius: 4px;
}

.comments-container::-webkit-scrollbar-thumb {
  background: var(--primary-color);
  border-radius: 4px;
  transition: background 0.3s ease;
}

.comments-container::-webkit-scrollbar-thumb:hover {
  background: #5A6394;
}

.comment-item {
  animation: fadeInUp 0.4s ease;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.avatar-circle {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 600;
  font-size: 1.1rem;
  box-shadow: 0 2px 8px var(--shadow-medium);
  flex-shrink: 0;
  position: relative;
}

.avatar-circle .comment-number {
  font-size: 1.2rem;
  font-weight: 700;
}

.comment-card {
  background: var(--card-background);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 16px;
  transition: all 0.3s ease;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  width: 100%;
  min-width: 0;
}

.comment-card:hover {
  box-shadow: 0 4px 12px var(--shadow-medium);
  border-color: var(--accent-color);
  transform: translateY(-2px);
}

.comment-header strong {
  color: var(--text-primary);
  font-size: 1rem;
}

.comment-body {
  color: var(--text-primary);
  line-height: 1.6;
  margin-top: 8px;
  word-wrap: break-word;
  overflow-wrap: break-word;
  word-break: break-word;
}

.comment-footer {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border-color);
}

/* Действия - улучшенная timeline */
.timeline {
  position: relative;
  padding: 20px 20px 20px 60px;
  max-height: 600px;
  overflow-y: auto;
  overflow-x: hidden;
}

.timeline::-webkit-scrollbar {
  width: 8px;
}

.timeline::-webkit-scrollbar-track {
  background: var(--light-color);
  border-radius: 4px;
}

.timeline::-webkit-scrollbar-thumb {
  background: var(--primary-color);
  border-radius: 4px;
  transition: background 0.3s ease;
}

.timeline::-webkit-scrollbar-thumb:hover {
  background: #5A6394;
}

.timeline-item {
  display: flex;
  gap: 15px;
  position: relative;
  padding-bottom: 30px;
  margin-left: 0;
  animation: fadeInUp 0.4s ease;
}

.timeline-item::before {
  content: '';
  position: absolute;
  left: -40px;
  top: 45px;
  width: 2px;
  height: calc(100% - 20px);
  background: linear-gradient(to bottom, var(--accent-color), transparent);
}

.timeline-item-last::before {
  display: none;
}

.timeline-marker {
  position: absolute;
  left: -60px;
  top: 0;
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  z-index: 1;
}

.timeline-marker .badge {
  width: 40px !important;
  height: 40px !important;
  max-width: 40px !important;
  max-height: 40px !important;
  min-width: 40px !important;
  min-height: 40px !important;
  border-radius: 50% !important;
  display: flex !important;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  font-weight: 700;
  box-shadow: 0 3px 10px var(--shadow-medium);
  border: 3px solid white;
  line-height: 1;
  padding: 0 !important;
  text-align: center;
}

.timeline-content {
  flex: 1;
  background: var(--card-background);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 16px;
  transition: all 0.3s ease;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.timeline-content:hover {
  box-shadow: 0 4px 12px var(--shadow-medium);
  border-color: var(--accent-color);
  transform: translateX(5px);
}

/* Пустые состояния */
.text-center i.bi-inbox,
.text-center i.bi-chat-left-dots {
  opacity: 0.3;
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% {
    opacity: 0.3;
  }
  50% {
    opacity: 0.5;
  }
}

/* Адаптивность */
@media (max-width: 768px) {
  .comment-item {
    flex-direction: column;
  }
  
  .avatar-circle {
    width: 40px;
    height: 40px;
    font-size: 0.8rem;
  }
  
  .timeline {
    padding: 15px 15px 15px 50px;
  }
  
  .timeline-item {
    gap: 10px;
  }
  
  .timeline-item::before {
    left: -35px;
  }
  
  .timeline-marker {
    left: -50px;
    width: 35px;
    height: 35px;
  }
  
  .timeline-marker .badge {
    width: 35px !important;
    height: 35px !important;
    max-width: 35px !important;
    max-height: 35px !important;
    min-width: 35px !important;
    min-height: 35px !important;
    font-size: 0.9rem;
    border: 2px solid white;
  }
  
  .timeline-content {
    font-size: 0.9rem;
    padding: 12px;
  }
  
  #historyTabs .nav-link {
    padding: 10px 16px;
    font-size: 0.9rem;
  }
}

/* Модальное окно истории комментариев */
.history-version {
  width: 100%;
  max-width: 100%;
}

.history-version .bg-light {
  width: 100%;
  max-width: 100%;
  word-wrap: break-word;
  overflow-wrap: break-word;
  word-break: break-word;
  white-space: pre-wrap;
}

.history-version .bg-light p {
  margin-bottom: 0.5rem;
  word-wrap: break-word;
  overflow-wrap: break-word;
  word-break: break-word;
}

.history-version .bg-light p:last-child {
  margin-bottom: 0;
}

.modal-body .timeline {
  padding: 0;
  max-height: none;
  overflow: visible;
}

/* User search dropdown styles */
.user-search-results {
  background: var(--card-background);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  margin-top: 4px;
}

.user-search-results .list-group-item {
  border: none;
  border-bottom: 1px solid var(--border-color);
  cursor: pointer;
  transition: all 0.2s ease;
}

.user-search-results .list-group-item:last-child {
  border-bottom: none;
}

.user-search-results .list-group-item:hover {
  background-color: var(--light-color);
  transform: translateX(4px);
}

.user-search-results .list-group-item:active {
  background-color: var(--accent-color);
}

.user-search-results .chat-avatar {
  flex-shrink: 0;
}
