/* 1. Скрытие ненужных модулей: Капитан AI, Calls, Компании, Кампании */
li:has(.i-woot-captain),
li:has(a[href*="/captain"]),
li:has(button[title*="Captain"]),
li:has(button[title*="Капитан"]),
li:has(a[title*="Captain"]),
li:has(a[title*="Капитан"]),
li:has(.i-lucide-phone),
li:has(a[href*="/calls"]),
li:has(button[title*="Calls"]),
li:has(button[title*="Звонки"]),
li:has(a[title*="Calls"]),
li:has(a[title*="Звонки"]),
li:has(.i-lucide-building-2),
li:has(a[href*="/companies"]),
li:has(button[title*="Companies"]),
li:has(button[title*="Компании"]),
li:has(a[title*="Companies"]),
li:has(a[title*="Компании"]),
li:has(a[href*="/campaigns"]),
li:has(.i-lucide-megaphone) {
  display: none !important;
}

/* 2. Полное скрытие раздела «Мои диалоги» («Диалоги» / Conversations) */
li:has(a[name="Conversation"]),
li:has([name="Conversation"]) {
  display: none !important;
}

/* 3. В Контактах: скрываем системные подпункты (Активные, Сегменты) */
li.child-item:has(a[href*="/contacts/active"]),
li.child-item:has(a[href*="/contacts/segments"]),
li.group\/sidebar-section:has(a[href*="/contacts/segments"]) {
  display: none !important;
}

/* 4. Скрыть вкладку Неназначен в списке чатов (оставляем Мои и Все) */
woot-tabs-item:nth-child(2) {
  display: none !important;
}

/* 5. Выпадающий список выбора оператора в шапке тикета */
.custom-header-operator-select {
  display: inline-flex;
  align-items: center;
  position: relative;
  font-size: 12px;
  font-weight: 500;
  z-index: 10;
  margin-right: 6px;
  flex-shrink: 0;
}
.custom-header-operator-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 30px;
  padding: 3px 8px;
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  cursor: pointer;
  color: #1e293b;
  transition: all 0.15s;
  max-width: 180px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.dark .custom-header-operator-btn {
  background: #1e293b;
  border-color: #334155;
  color: #f1f5f9;
}
.custom-header-operator-btn:hover {
  background: #e2e8f0;
  border-color: #94a3b8;
}
.dark .custom-header-operator-btn:hover {
  background: #334155;
}
.custom-header-operator-menu {
  position: absolute;
  top: 36px;
  right: 0;
  min-width: 210px;
  background: white;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  padding: 4px;
  z-index: 1000;
}
.dark .custom-header-operator-menu {
  background: #1e293b;
  border-color: #334155;
}
.custom-header-operator-item {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 6px 10px;
  font-size: 13px;
  text-align: left;
  border-radius: 6px;
  cursor: pointer;
  color: #334155;
  border: none;
  background: transparent;
}
.dark .custom-header-operator-item {
  color: #cbd5e1;
}
.custom-header-operator-item:hover {
  background: #f1f5f9;
  color: #0f172a;
}
.dark .custom-header-operator-item:hover {
  background: #334155;
  color: white;
}
.custom-header-operator-item.active {
  font-weight: 600;
  background: #e0f2fe;
  color: #0284c7;
}
.dark .custom-header-operator-item.active {
  background: #0369a1;
  color: white;
}

/* 5.1 Выпадающий список выбора статуса тикета в шапке рядом с агентом */
.custom-header-status-select {
  display: inline-flex;
  align-items: center;
  position: relative;
  font-size: 12px;
  font-weight: 600;
  z-index: 10;
  margin-right: 6px;
  flex-shrink: 0;
}
.custom-header-status-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 30px;
  padding: 3px 10px;
  border-radius: 6px;
  cursor: pointer;
  border: 1px solid #cbd5e1;
  background: #f1f5f9;
  color: #1e293b;
  transition: all 0.15s;
  white-space: nowrap;
}
.custom-header-status-btn.status-open {
  background: #eff6ff;
  border-color: #bfdbfe;
  color: #1d4ed8;
}
.custom-header-status-btn.status-resolved {
  background: #ecfdf5;
  border-color: #a7f3d0;
  color: #047857;
}
.custom-header-status-btn.status-pending {
  background: #fffbeb;
  border-color: #fde68a;
  color: #b45309;
}
.custom-header-status-btn.status-snoozed {
  background: #f5f3ff;
  border-color: #ddd6fe;
  color: #6d28d9;
}
.dark .custom-header-status-btn.status-open {
  background: rgba(37, 99, 235, 0.25);
  border-color: #1d4ed8;
  color: #93c5fd;
}
.dark .custom-header-status-btn.status-resolved {
  background: rgba(16, 185, 129, 0.22);
  border-color: #059669;
  color: #6ee7b7;
}
.dark .custom-header-status-btn.status-pending {
  background: rgba(245, 158, 11, 0.22);
  border-color: #d97706;
  color: #fcd34d;
}
.dark .custom-header-status-btn.status-snoozed {
  background: rgba(139, 92, 246, 0.22);
  border-color: #7c3aed;
  color: #c4b5fd;
}
.custom-header-status-btn:hover {
  filter: brightness(0.96);
}
.custom-header-status-dot {
  width: 8px;
  height: 8px;
  border-radius: 9999px;
  flex-shrink: 0;
}
.custom-header-status-menu {
  position: absolute;
  top: 36px;
  right: 0;
  min-width: 195px;
  background: white;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  padding: 4px;
  z-index: 1000;
}
.dark .custom-header-status-menu {
  background: #1e293b;
  border-color: #334155;
}
.custom-header-status-item {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 7px 10px;
  font-size: 13px;
  text-align: left;
  border-radius: 6px;
  cursor: pointer;
  color: #334155;
  border: none;
  background: transparent;
}
.dark .custom-header-status-item {
  color: #cbd5e1;
}
.custom-header-status-item:hover {
  background: #f1f5f9;
  color: #0f172a;
}
.dark .custom-header-status-item:hover {
  background: #334155;
  color: white;
}
.custom-header-status-item.active {
  font-weight: 600;
  background: #eff6ff;
  color: #1d4ed8;
}
.dark .custom-header-status-item.active {
  background: rgba(37, 99, 235, 0.25);
  color: #93c5fd;
}
.custom-header-status-check {
  margin-left: auto;
  font-size: 13px;
  font-weight: 700;
  color: #2563eb;
}
.dark .custom-header-status-check {
  color: #60a5fa;
}

/* 6. Подразделы левого меню (скрыты по умолчанию) */
li[data-custom-accordion-li="1"] > ul,
li[data-custom-accordion-li="1"] li.child-item,
li[data-custom-accordion-li="1"] .i-lucide-chevron-up,
li[data-custom-accordion-li="1"] .i-lucide-chevron-down {
  display: none !important;
}
.custom-inbox-sublist {
  display: none;
  flex-direction: column;
  gap: 2px;
  margin: 2px 0 6px 14px;
  padding-left: 10px;
  border-left: 2px solid #cbd5e1;
}
.custom-inbox-sublist.open {
  display: flex !important;
}
.dark .custom-inbox-sublist {
  border-left-color: #475569;
}
.custom-nav-chevron {
  margin-left: auto;
  font-size: 11px;
  color: #94a3b8;
  transition: transform 0.2s ease;
  user-select: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
}
.custom-nav-chevron.open {
  transform: rotate(90deg);
}
.custom-inbox-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 10px;
  font-size: 13px;
  font-weight: 500;
  border-radius: 6px;
  color: #334155;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.15s;
}
.dark .custom-inbox-item {
  color: #cbd5e1;
}
.custom-inbox-item:hover {
  background: #f1f5f9;
  color: #0f172a;
}
.dark .custom-inbox-item:hover {
  background: #1e293b;
  color: #f8fafc;
}
.custom-inbox-item.active {
  background: #e0f2fe;
  color: #0284c7;
  font-weight: 600;
}
.dark .custom-inbox-item.active {
  background: #0369a1;
  color: #ffffff;
}
.custom-inbox-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

/* 7. Кнопка "Переслать" сразу за вкладкой Личная заметка в том же стиле */
.custom-forward-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  height: 32px;
  padding: 0 14px;
  font-size: 13.5px;
  font-weight: 500;
  border-radius: 9999px;
  background: #f1f5f9;
  color: #1e293b;
  border: none;
  cursor: pointer;
  margin-left: 6px;
  margin-right: auto;
  white-space: nowrap;
  flex-shrink: 0;
  transition: background 0.15s, color 0.15s;
}
.dark .custom-forward-btn {
  background: #1e293b;
  color: #e2e8f0;
}
.custom-forward-btn:hover {
  background: #e2e8f0;
  color: #0f172a;
}
.dark .custom-forward-btn:hover {
  background: #334155;
  color: #ffffff;
}

/* 8. Блок Логи / История действий в боковом меню Действия в беседе */
.custom-conv-audit-box {
  margin-bottom: 12px;
  padding: 10px 12px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
}
.dark .custom-conv-audit-box {
  background: rgba(30, 41, 59, 0.4);
  border-color: #334155;
}
.custom-conv-audit-header {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #64748b;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.custom-conv-audit-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 220px;
  overflow-y: auto;
}
.custom-conv-audit-item {
  font-size: 12px;
  line-height: 1.4;
  padding: 5px 8px;
  border-radius: 6px;
  background: white;
  border: 1px solid #e2e8f0;
  color: #334155;
}
.dark .custom-conv-audit-item {
  background: #1e293b;
  border-color: #334155;
  color: #cbd5e1;
}
.custom-conv-audit-time {
  font-size: 10px;
  color: #94a3b8;
  display: block;
  margin-top: 2px;
}

/* 9. Главный экран тикетов (табличный вид в стиле Usedesk) */
#custom-tickets-table-view {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 200px;
  z-index: 45;
  background: #ffffff;
  color: #1e293b;
  display: none;
  flex-direction: column;
  font-family: -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", Roboto, sans-serif;
  overflow: hidden;
}
.dark #custom-tickets-table-view {
  background: #0f172a;
  color: #f1f5f9;
}
.ctv-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 20px 10px 20px;
  border-bottom: 1px solid #e2e8f0;
  background: #ffffff;
  flex-shrink: 0;
}
.dark .ctv-topbar {
  background: #0f172a;
  border-bottom-color: #1e293b;
}
.ctv-topbar-left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.ctv-title {
  font-size: 18px;
  font-weight: 700;
  color: #0f172a;
  margin: 0;
  white-space: nowrap;
}
.dark .ctv-title { color: #f8fafc; }
.ctv-autorefresh-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 500;
  background: #e0f2fe;
  color: #0369a1;
  border: 1px solid #bae6fd;
  cursor: pointer;
  user-select: none;
  transition: all 0.15s;
}
.ctv-autorefresh-badge.paused {
  background: #f1f5f9;
  color: #64748b;
  border-color: #cbd5e1;
}
.dark .ctv-autorefresh-badge {
  background: rgba(14, 165, 233, 0.18);
  color: #7dd3fc;
  border-color: rgba(56, 189, 248, 0.3);
}
.ctv-topbar-right {
  display: flex;
  align-items: center;
  gap: 10px;
}
.ctv-search-wrap {
  position: relative;
  width: 260px;
}
.ctv-search-input {
  width: 100%;
  height: 34px;
  padding: 0 32px 0 12px;
  border: 1px solid #cbd5e1;
  border-radius: 7px;
  font-size: 13px;
  background: #ffffff;
  color: #0f172a;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.ctv-search-input:focus {
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.12);
}
.dark .ctv-search-input {
  background: #1e293b;
  border-color: #334155;
  color: #f1f5f9;
}
.ctv-search-icon {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  color: #94a3b8;
  pointer-events: none;
  font-size: 13px;
}
.ctv-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 34px;
  padding: 0 12px;
  border-radius: 7px;
  font-size: 13px;
  font-weight: 500;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  color: #334155;
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
}
.ctv-btn:hover { background: #f8fafc; border-color: #94a3b8; }
.dark .ctv-btn { background: #1e293b; border-color: #334155; color: #e2e8f0; }
.dark .ctv-btn:hover { background: #334155; }
.ctv-btn-primary {
  background: #e0edff;
  color: #1d4ed8;
  border-color: #bfdbfe;
  font-weight: 600;
}
.ctv-btn-primary:hover { background: #dbeafe; border-color: #93c5fd; }
.dark .ctv-btn-primary {
  background: rgba(37, 99, 235, 0.25);
  color: #93c5fd;
  border-color: #1d4ed8;
}
.ctv-btn-danger {
  background: #fee2e2;
  color: #b91c1c;
  border-color: #fecaca;
  font-weight: 600;
}
.ctv-btn-danger:hover { background: #fecaca; }
.dark .ctv-btn-danger {
  background: rgba(220, 38, 38, 0.22);
  color: #fca5a5;
  border-color: #991b1b;
}

/* Панель фильтров */
.ctv-filters-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  background: #ffffff;
  border-bottom: 1px solid #e2e8f0;
  flex-shrink: 0;
}
.dark .ctv-filters-bar {
  background: #0f172a;
  border-bottom-color: #1e293b;
}
.ctv-filter-group {
  position: relative;
  display: inline-flex;
}
.ctv-filter-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 30px;
  padding: 0 10px;
  border-radius: 6px;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  color: #334155;
  font-size: 12.5px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s;
}
.ctv-filter-btn:hover { background: #f8fafc; border-color: #94a3b8; }
.ctv-filter-btn.has-value {
  border-color: #93c5fd;
  background: #eff6ff;
  color: #1d4ed8;
}
.dark .ctv-filter-btn {
  background: #1e293b;
  border-color: #334155;
  color: #cbd5e1;
}
.dark .ctv-filter-btn.has-value {
  background: rgba(37, 99, 235, 0.2);
  border-color: #2563eb;
  color: #93c5fd;
}
.ctv-filter-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 17px;
  height: 17px;
  padding: 0 5px;
  border-radius: 999px;
  background: #dbeafe;
  color: #1d4ed8;
  font-size: 11px;
  font-weight: 700;
}
.ctv-dropdown-menu {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  min-width: 220px;
  max-height: 300px;
  overflow-y: auto;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  box-shadow: 0 10px 25px -5px rgba(15, 23, 42, 0.15);
  padding: 6px;
  z-index: 120;
  display: none;
}
.ctv-dropdown-menu.open { display: block; }
.dark .ctv-dropdown-menu {
  background: #1e293b;
  border-color: #334155;
}
.ctv-dropdown-item {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 6px 8px;
  border: none;
  background: transparent;
  border-radius: 5px;
  font-size: 12.5px;
  color: #334155;
  text-align: left;
  cursor: pointer;
}
.ctv-dropdown-item:hover { background: #f1f5f9; }
.ctv-dropdown-item.active { background: #eff6ff; color: #1d4ed8; font-weight: 600; }
.dark .ctv-dropdown-item { color: #e2e8f0; }
.dark .ctv-dropdown-item:hover { background: #334155; }
.dark .ctv-dropdown-item.active { background: rgba(37, 99, 235, 0.25); color: #93c5fd; }

.ctv-chips-bar {
  display: none;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 6px 20px 8px 20px;
  background: #ffffff;
  border-bottom: 1px solid #e2e8f0;
  flex-shrink: 0;
}
.ctv-chips-bar.has-chips { display: flex; }
.dark .ctv-chips-bar { background: #0f172a; border-bottom-color: #1e293b; }
.ctv-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 9px;
  border-radius: 5px;
  background: #f1f5f9;
  color: #334155;
  font-size: 12px;
  font-weight: 500;
}
.dark .ctv-chip { background: #1e293b; color: #cbd5e1; }
.ctv-chip-remove {
  border: none;
  background: none;
  color: #94a3b8;
  cursor: pointer;
  font-size: 13px;
  line-height: 1;
  padding: 0 2px;
}
.ctv-chip-remove:hover { color: #ef4444; }
.ctv-clear-all {
  border: none;
  background: none;
  color: #475569;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  padding: 3px 6px;
}
.ctv-clear-all:hover { color: #ef4444; }

/* Панель массовых действий */
.ctv-bulk-bar {
  display: none;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  padding: 9px 20px;
  background: #eff6ff;
  border-bottom: 1px solid #bfdbfe;
  flex-shrink: 0;
}
.ctv-bulk-bar.visible { display: flex; }
.dark .ctv-bulk-bar {
  background: #172554;
  border-bottom-color: #1e3a8a;
}
.ctv-bulk-count {
  font-size: 13px;
  font-weight: 700;
  color: #1d4ed8;
  margin-right: 4px;
}
.dark .ctv-bulk-count { color: #93c5fd; }
.ctv-bulk-select {
  height: 30px;
  padding: 0 10px;
  border-radius: 6px;
  border: 1px solid #93c5fd;
  background: #ffffff;
  color: #1e293b;
  font-size: 12.5px;
  font-weight: 500;
  cursor: pointer;
}
.dark .ctv-bulk-select {
  background: #1e293b;
  border-color: #3b82f6;
  color: #f1f5f9;
}

/* Таблица тикетов */
.ctv-table-scroll {
  flex: 1;
  overflow: auto;
  background: #ffffff;
}
.dark .ctv-table-scroll { background: #0f172a; }
.ctv-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  min-width: 1060px;
}
.ctv-table thead th {
  position: sticky;
  top: 0;
  z-index: 5;
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
  border-right: 1px solid #f1f5f9;
  padding: 10px 12px;
  text-align: left;
  font-size: 12px;
  font-weight: 600;
  color: #64748b;
  white-space: nowrap;
  user-select: none;
}
.dark .ctv-table thead th {
  background: #1e293b;
  border-bottom-color: #334155;
  border-right-color: #0f172a;
  color: #94a3b8;
}
.ctv-table thead th.sortable { cursor: pointer; }
.ctv-table thead th.sortable:hover { color: #0f172a; background: #f1f5f9; }
.dark .ctv-table thead th.sortable:hover { color: #f8fafc; background: #334155; }
.ctv-table thead th.sorted { color: #0f172a; }
.dark .ctv-table thead th.sorted { color: #f8fafc; }
.ctv-sort-arrow {
  margin-left: 4px;
  color: #2563eb;
  font-weight: 700;
}
.ctv-table tbody tr {
  border-bottom: 1px solid #e2e8f0;
  cursor: pointer;
  transition: background 0.12s;
}
.ctv-table tbody tr:hover { background: #f8fafc; }
.ctv-table tbody tr.selected { background: #eff6ff; }
.dark .ctv-table tbody tr { border-bottom-color: #1e293b; }
.dark .ctv-table tbody tr:hover { background: rgba(30, 41, 59, 0.7); }
.dark .ctv-table tbody tr.selected { background: rgba(37, 99, 235, 0.22); }
.ctv-table tbody td {
  padding: 12px;
  vertical-align: top;
  font-size: 13px;
  color: #334155;
  border-right: 1px solid #f1f5f9;
  word-wrap: break-word;
}
.dark .ctv-table tbody td {
  color: #cbd5e1;
  border-right-color: #1e293b;
}
.ctv-checkbox {
  width: 16px;
  height: 16px;
  cursor: pointer;
  accent-color: #2563eb;
  margin-top: 2px;
}
.ctv-status-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  border-radius: 5px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}
.ctv-status-open { background: #dbeafe; color: #1d4ed8; }
.ctv-status-resolved { background: #dcfce7; color: #15803d; }
.ctv-status-pending { background: #f1f5f9; color: #475569; }
.ctv-status-snoozed { background: #fef3c7; color: #b45309; }
.dark .ctv-status-open { background: rgba(37, 99, 235, 0.25); color: #93c5fd; }
.dark .ctv-status-resolved { background: rgba(22, 163, 74, 0.25); color: #86efac; }
.dark .ctv-status-pending { background: #334155; color: #cbd5e1; }
.dark .ctv-status-snoozed { background: rgba(217, 119, 6, 0.25); color: #fcd34d; }

.ctv-client-wrap {
  position: relative;
  display: inline-block;
  max-width: 100%;
}
.ctv-client-name {
  font-weight: 600;
  color: #0f172a;
  line-height: 1.35;
  display: inline-block;
}
.dark .ctv-client-name { color: #f8fafc; }
.ctv-client-sub {
  font-size: 11.5px;
  color: #64748b;
  margin-top: 2px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ctv-client-tooltip {
  position: absolute;
  left: 0;
  top: calc(100% + 4px);
  background: #1e293b;
  color: #ffffff;
  padding: 5px 10px;
  border-radius: 6px;
  font-size: 11.5px;
  font-weight: 500;
  white-space: nowrap;
  z-index: 30;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s;
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.2);
}
.ctv-client-wrap:hover .ctv-client-tooltip {
  opacity: 1;
  pointer-events: auto;
}
.ctv-client-tooltip a {
  color: #ffffff;
  text-decoration: none;
}
.ctv-client-tooltip a:hover { text-decoration: underline; }

.ctv-subject-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 6px;
  margin-bottom: 3px;
}
.ctv-subject-title {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
  color: #0f172a;
  line-height: 1.35;
}
.dark .ctv-subject-title { color: #f8fafc; }
.ctv-subject-preview {
  font-size: 12.5px;
  color: #64748b;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 6px;
}
.dark .ctv-subject-preview { color: #94a3b8; }
.ctv-tags-row {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}
.ctv-tag {
  display: inline-block;
  padding: 2px 7px;
  border-radius: 4px;
  background: #f1f5f9;
  color: #475569;
  font-size: 11.5px;
  font-weight: 500;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.dark .ctv-tag { background: #1e293b; color: #cbd5e1; }
.ctv-tag-pizzeria { background: #fef3c7; color: #92400e; }
.dark .ctv-tag-pizzeria { background: rgba(217, 119, 6, 0.2); color: #fcd34d; }

.ctv-agent-name {
  font-weight: 500;
  color: #1e293b;
  line-height: 1.35;
}
.dark .ctv-agent-name { color: #f1f5f9; }
.ctv-agent-sub {
  font-size: 12px;
  color: #64748b;
  margin-top: 2px;
}
.ctv-date-cell {
  font-size: 12.5px;
  color: #334155;
  line-height: 1.35;
  font-variant-numeric: tabular-nums;
}
.dark .ctv-date-cell { color: #cbd5e1; }
.ctv-id-cell {
  font-size: 13px;
  font-weight: 600;
  color: #334155;
  font-variant-numeric: tabular-nums;
}
.dark .ctv-id-cell { color: #e2e8f0; }
.ctv-channel-cell {
  font-size: 12.5px;
  color: #334155;
  line-height: 1.35;
}
.dark .ctv-channel-cell { color: #cbd5e1; }
.ctv-footer-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 20px;
  border-top: 1px solid #e2e8f0;
  background: #f8fafc;
  font-size: 12px;
  color: #64748b;
  flex-shrink: 0;
}
.dark .ctv-footer-bar {
  background: #1e293b;
  border-top-color: #334155;
  color: #94a3b8;
}

/* Кнопка возврата к таблице тикетов из открытого чата */
.custom-back-to-tickets-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 30px;
  padding: 0 10px;
  margin-right: 8px;
  border-radius: 6px;
  border: 1px solid #cbd5e1;
  background: #f8fafc;
  color: #1e293b;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  flex-shrink: 0;
  transition: all 0.15s;
}
.custom-back-to-tickets-btn:hover { background: #e2e8f0; }
.dark .custom-back-to-tickets-btn {
  background: #1e293b;
  border-color: #334155;
  color: #f1f5f9;
}
.ctv-date-dropdown {
  min-width: 270px;
  padding: 10px;
}
.ctv-date-presets {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-bottom: 8px;
}
.ctv-date-preset-btn {
  padding: 4px 8px;
  border-radius: 5px;
  border: 1px solid #cbd5e1;
  background: #f8fafc;
  color: #334155;
  font-size: 11.5px;
  cursor: pointer;
}
.ctv-date-preset-btn:hover { background: #e0f2fe; border-color: #93c5fd; color: #1d4ed8; }
.dark .ctv-date-preset-btn { background: #0f172a; border-color: #334155; color: #cbd5e1; }
.ctv-date-inputs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin-bottom: 8px;
}
.ctv-date-inputs label {
  font-size: 11px;
  color: #64748b;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.ctv-date-inputs input[type="date"] {
  padding: 4px 6px;
  border: 1px solid #cbd5e1;
  border-radius: 5px;
  font-size: 12px;
  background: #ffffff;
  color: #0f172a;
}
.dark .ctv-date-inputs input[type="date"] {
  background: #0f172a;
  border-color: #334155;
  color: #f1f5f9;
}
.ctv-pagination {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.ctv-page-btn {
  min-width: 28px;
  height: 26px;
  padding: 0 7px;
  border-radius: 5px;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  color: #334155;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
}
.ctv-page-btn:hover:not(:disabled) { background: #eff6ff; border-color: #93c5fd; color: #1d4ed8; }
.ctv-page-btn.active { background: #2563eb; border-color: #2563eb; color: #ffffff; font-weight: 700; }
.ctv-page-btn:disabled { opacity: 0.45; cursor: not-allowed; }
.dark .ctv-page-btn { background: #0f172a; border-color: #334155; color: #cbd5e1; }
.dark .ctv-page-btn.active { background: #2563eb; border-color: #2563eb; color: #ffffff; }
.ctv-per-page-select {
  height: 26px;
  padding: 0 6px;
  border-radius: 5px;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  color: #334155;
  font-size: 12px;
}
.dark .ctv-per-page-select { background: #0f172a; border-color: #334155; color: #cbd5e1; }
.ctv-modal-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.ctv-field label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: #475569;
  margin-bottom: 4px;
}
.dark .ctv-field label { color: #cbd5e1; }
.ctv-field input, .ctv-field select, .ctv-field textarea {
  width: 100%;
  padding: 7px 10px;
  border-radius: 6px;
  border: 1px solid #cbd5e1;
  font-size: 13px;
  background: #ffffff;
  color: #0f172a;
  box-sizing: border-box;
}
.dark .ctv-field input, .dark .ctv-field select, .dark .ctv-field textarea {
  background: #1e293b;
  border-color: #334155;
  color: #f1f5f9;
}
.ctv-merge-option {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.12s;
}
.ctv-merge-option:hover { background: #f8fafc; border-color: #93c5fd; }
.ctv-merge-option.primary { background: #eff6ff; border-color: #3b82f6; }
.dark .ctv-merge-option { border-color: #334155; }
.dark .ctv-merge-option.primary { background: rgba(37, 99, 235, 0.22); border-color: #3b82f6; }

/* 10. Экран открытого тикета: скрываем левую колонку списка диалогов и закрепляем правую панель контактов */
body.ctv-ticket-detail-mode .conversations-list-wrap {
  display: none !important;
}
body.ctv-ticket-detail-mode div:has(> button .i-ph-user-bold) {
  display: none !important;
}
/* В шапке открытого тикета оставляем только выбор агента и смену статуса */
body.ctv-ticket-detail-mode .header-actions-wrap > :not(#custom-header-operator):not(#custom-header-status) {
  display: none !important;
}
/* Панель эмодзи открывается над полем ввода справа от бокового меню, не заходя под aside */
.reply-box .emoji-dialog,
body.ctv-ticket-detail-mode .emoji-dialog {
  left: 12px !important;
  right: auto !important;
  top: auto !important;
  bottom: calc(100% + 8px) !important;
  z-index: 9999 !important;
}
.reply-box .emoji-dialog::before,
body.ctv-ticket-detail-mode .emoji-dialog::before {
  left: 16px !important;
  right: auto !important;
  bottom: -8px !important;
  transform: rotate(0deg) !important;
}

/* 11. Значок выбора шаблонов ответов в нижней панели поля ответа */
.custom-templates-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
}
.custom-templates-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: none;
  background: #f1f5f9;
  color: #334155;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
  padding: 0;
}
.custom-templates-icon-btn:hover {
  background: #e2e8f0;
  color: #0f172a;
}
.dark .custom-templates-icon-btn {
  background: #1e293b;
  color: #cbd5e1;
}
.dark .custom-templates-icon-btn:hover {
  background: #334155;
  color: #f8fafc;
}
.custom-templates-popover {
  position: fixed;
  width: 380px;
  max-width: calc(100vw - 24px);
  max-height: 420px;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 12px;
  box-shadow: 0 20px 40px -10px rgba(15, 23, 42, 0.22);
  z-index: 99999;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.dark .custom-templates-popover {
  background: #0f172a;
  border-color: #334155;
  color: #f1f5f9;
}
.custom-templates-head {
  padding: 10px 12px;
  border-bottom: 1px solid #e2e8f0;
  display: flex;
  align-items: center;
  gap: 8px;
}
.dark .custom-templates-head { border-bottom-color: #1e293b; }
.custom-templates-search {
  flex: 1;
  height: 30px;
  padding: 0 10px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  font-size: 12.5px;
  background: #f8fafc;
  color: #0f172a;
  outline: none;
}
.custom-templates-search:focus { border-color: #3b82f6; background: #ffffff; }
.dark .custom-templates-search {
  background: #1e293b;
  border-color: #334155;
  color: #f1f5f9;
}
.custom-templates-list {
  flex: 1;
  overflow-y: auto;
  padding: 6px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.custom-template-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
  width: 100%;
  text-align: left;
  padding: 8px 10px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  cursor: pointer;
  transition: all 0.12s;
}
.custom-template-item:hover {
  background: #eff6ff;
  border-color: #bfdbfe;
}
.dark .custom-template-item:hover {
  background: rgba(37, 99, 235, 0.22);
  border-color: #1d4ed8;
}
.custom-template-code {
  font-size: 12.5px;
  font-weight: 700;
  color: #1d4ed8;
}
.dark .custom-template-code { color: #93c5fd; }
.custom-template-preview {
  font-size: 12px;
  color: #475569;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.dark .custom-template-preview { color: #94a3b8; }
.custom-templates-foot {
  padding: 8px 12px;
  border-top: 1px solid #e2e8f0;
  background: #f8fafc;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
}
.dark .custom-templates-foot {
  background: #1e293b;
  border-top-color: #334155;
}

/* 12. Разграничение прав: Оператор (agent) не видит Настройки, Отчёты и админ-действия */
body.ctv-role-agent li[data-custom-nav-section="settings"],
body.ctv-role-agent li:has(a[href*="/settings"]),
body.ctv-role-agent li:has(a[name="Settings"]),
body.ctv-role-agent li:has([name="Settings"]),
body.ctv-role-agent #custom-settings-sublist,
body.ctv-role-agent li[data-custom-nav-section="reports"],
body.ctv-role-agent li:has(a[href*="/reports"]),
body.ctv-role-agent li:has(a[name="Reports"]),
body.ctv-role-agent li:has([name="Reports"]),
body.ctv-role-agent #custom-reports-sublist,
body.ctv-role-agent #ctv-bulk-delete-btn,
body.ctv-role-agent .ctv-admin-only {
  display: none !important;
}

/* 13. Упрощённое подтверждение удаления (без ручного ввода названия) */
.custom-simple-delete-note {
  margin: 4px 0 16px;
  padding: 10px 12px;
  border-radius: 8px;
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #991b1b;
  font-size: 13px;
  line-height: 1.45;
}
.dark .custom-simple-delete-note {
  background: rgba(153, 27, 27, 0.2);
  border-color: rgba(248, 113, 113, 0.35);
  color: #fecaca;
}

/* 14. Чат-вид для email-переписки (скрытие заголовков письма и цитат) */
[data-bubble-name="email"] {
  width: fit-content !important;
  min-width: 160px !important;
  max-width: min(78%, 640px) !important;
  border-radius: 14px !important;
}
[data-bubble-name="email"] > .border-b {
  display: none !important;
}
[data-bubble-name="email"] > section {
  padding: 10px 14px !important;
}
[data-bubble-name="email"] blockquote,
[data-bubble-name="email"] .gmail_quote,
[data-bubble-name="email"] .gmail_attr,
[data-bubble-name="email"] .yahoo_quoted,
[data-bubble-name="email"] .moz-cite-prefix,
[data-bubble-name="email"] #appendonsend,
[data-bubble-name="email"] #divRplyFwdMsg,
[data-bubble-name="email"] .custom-email-quote-hidden {
  display: none !important;
}
[data-bubble-name="email"] .letter-render p:last-child {
  margin-bottom: 0 !important;
}
[data-bubble-name="email"] button:has(.i-lucide-chevron-down),
[data-bubble-name="email"] button:has(.i-lucide-chevron-up) {
  display: none !important;
}

/* 15. Кнопка «Перевести» в сообщениях тикета */
.custom-msg-translate-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 6px;
}
.custom-msg-translate-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 9999px;
  border: 1px solid rgba(148, 163, 184, 0.35);
  background: rgba(255, 255, 255, 0.65);
  color: #475569;
  font-size: 11.5px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s;
  line-height: 1.4;
}
.custom-msg-translate-btn:hover:not(:disabled) {
  background: #ffffff;
  color: #1d4ed8;
  border-color: #93c5fd;
}
.custom-msg-translate-btn:disabled {
  opacity: 0.7;
  cursor: wait;
}
.dark .custom-msg-translate-btn {
  background: rgba(15, 23, 42, 0.45);
  color: #cbd5e1;
  border-color: rgba(148, 163, 184, 0.25);
}
.dark .custom-msg-translate-btn:hover:not(:disabled) {
  background: #1e293b;
  color: #93c5fd;
  border-color: #3b82f6;
}
.custom-msg-translation-box {
  margin-top: 8px;
  padding: 8px 10px;
  border-radius: 8px;
  border-left: 3px solid #3b82f6;
  background: rgba(255, 255, 255, 0.78);
  color: #0f172a;
  font-size: 13px;
  line-height: 1.45;
}
.dark .custom-msg-translation-box {
  background: rgba(15, 23, 42, 0.6);
  color: #f1f5f9;
  border-left-color: #60a5fa;
}
.custom-msg-translation-head {
  font-size: 11px;
  font-weight: 600;
  color: #2563eb;
  margin-bottom: 3px;
}
.dark .custom-msg-translation-head {
  color: #93c5fd;
}
.custom-msg-translation-text {
  white-space: pre-wrap;
  word-break: break-word;
}

/* 16. Вкладка со стрелкой для сворачивания/разворачивания поля ответа */
.reply-box {
  position: relative !important;
  overflow: visible !important;
}
.custom-reply-collapse-tab {
  position: absolute;
  top: -20px;
  left: 50%;
  transform: translateX(-50%);
  width: 52px;
  height: 20px;
  border-radius: 10px 10px 0 0;
  border: 1px solid #cbd5e1;
  border-bottom: none;
  background: #ffffff;
  color: #64748b;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 30;
  box-shadow: 0 -2px 6px rgba(15, 23, 42, 0.06);
  transition: background 0.15s, color 0.15s, border-color 0.15s;
  padding: 0;
}
.custom-reply-collapse-tab:hover {
  background: #eff6ff;
  color: #1d4ed8;
  border-color: #93c5fd;
}
.custom-reply-collapse-tab svg {
  width: 15px;
  height: 15px;
  transition: transform 0.2s ease;
}
.custom-reply-collapse-tab.is-collapsed {
  background: #eff6ff;
  color: #2563eb;
  border-color: #93c5fd;
}
.custom-reply-collapse-tab.is-collapsed svg {
  transform: rotate(180deg);
}
.dark .custom-reply-collapse-tab {
  background: #0f172a;
  color: #94a3b8;
  border-color: #334155;
}
.dark .custom-reply-collapse-tab:hover,
.dark .custom-reply-collapse-tab.is-collapsed {
  background: rgba(37, 99, 235, 0.28);
  color: #93c5fd;
  border-color: #2563eb;
}
.reply-box.custom-reply-collapsed {
  min-height: 0 !important;
  height: 6px !important;
  padding: 0 !important;
  border-top: 1px solid #cbd5e1 !important;
  margin-top: 22px !important;
}
.dark .reply-box.custom-reply-collapsed {
  border-top-color: #334155 !important;
}
.reply-box.custom-reply-collapsed > :not(#custom-reply-collapse-btn) {
  display: none !important;
}

/* 17. Обязательные поля при закрытии: красная подсветка незаполненных полей */
.custom-field-missing {
  outline: 2px solid #ef4444 !important;
  outline-offset: 2px;
  background: #fef2f2 !important;
  border-radius: 8px !important;
  padding: 6px !important;
  animation: customFieldPulse 0.45s ease-in-out 2;
}
.dark .custom-field-missing {
  background: rgba(185, 28, 28, 0.22) !important;
  outline-color: #f87171 !important;
}
.custom-field-missing-hint {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 4px;
  font-size: 11px;
  font-weight: 700;
  color: #dc2626;
}
.dark .custom-field-missing-hint {
  color: #fca5a5;
}
@keyframes customFieldPulse {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-3px); }
  75% { transform: translateX(3px); }
}

/* 18. Защита от одновременного ответа (Collision Detection) */
.custom-collision-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 30px;
  padding: 0 10px;
  border-radius: 9999px;
  font-size: 12px;
  font-weight: 600;
  background: #fef3c7;
  color: #b45309;
  border: 1px solid #fcd34d;
  margin-right: 6px;
  white-space: nowrap;
}
.custom-collision-badge.is-typing {
  background: #fee2e2;
  color: #b91c1c;
  border-color: #fca5a5;
  animation: customCollisionPulse 1.4s infinite;
}
.dark .custom-collision-badge {
  background: rgba(217, 119, 6, 0.25);
  color: #fcd34d;
  border-color: #b45309;
}
.dark .custom-collision-badge.is-typing {
  background: rgba(220, 38, 38, 0.28);
  color: #fca5a5;
  border-color: #dc2626;
}
@keyframes customCollisionPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.72; }
}
.custom-reply-collision-warn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  margin-bottom: 6px;
  border-radius: 8px;
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #b91c1c;
  font-size: 12.5px;
  font-weight: 600;
}
.dark .custom-reply-collision-warn {
  background: rgba(185, 28, 28, 0.24);
  border-color: rgba(248, 113, 113, 0.4);
  color: #fecaca;
}

/* 19. Лёгкий SLA-индикатор в таблице тикетов */
.ctv-sla-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 9999px;
  font-size: 11.5px;
  font-weight: 600;
  white-space: nowrap;
}
.ctv-sla-ok {
  background: #ecfdf5;
  color: #047857;
  border: 1px solid #a7f3d0;
}
.ctv-sla-warn {
  background: #fffbeb;
  color: #b45309;
  border: 1px solid #fde68a;
}
.ctv-sla-crit {
  background: #fef2f2;
  color: #b91c1c;
  border: 1px solid #fecaca;
}
.ctv-sla-done {
  background: #f1f5f9;
  color: #64748b;
  border: 1px solid #e2e8f0;
}
.dark .ctv-sla-ok {
  background: rgba(16, 185, 129, 0.2);
  color: #6ee7b7;
  border-color: rgba(16, 185, 129, 0.4);
}
.dark .ctv-sla-warn {
  background: rgba(245, 158, 11, 0.22);
  color: #fcd34d;
  border-color: rgba(245, 158, 11, 0.4);
}
.dark .ctv-sla-crit {
  background: rgba(220, 38, 38, 0.25);
  color: #fca5a5;
  border-color: rgba(248, 113, 113, 0.45);
}
.dark .ctv-sla-done {
  background: #1e293b;
  color: #94a3b8;
  border-color: #334155;
}
.ctv-row-sla-crit {
  background: rgba(254, 226, 226, 0.28) !important;
}
.dark .ctv-row-sla-crit {
  background: rgba(185, 28, 28, 0.14) !important;
}

/* 20. Карточка повторных обращений клиента в правой панели */
.custom-contact-history-card {
  margin-bottom: 10px;
  padding: 10px 12px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
}
.dark .custom-contact-history-card {
  background: rgba(30, 41, 59, 0.45);
  border-color: #334155;
}
.custom-ch-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}
.custom-ch-title {
  font-size: 11.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #475569;
}
.dark .custom-ch-title {
  color: #cbd5e1;
}
.custom-ch-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-bottom: 8px;
}
.custom-ch-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 7px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
  background: #e2e8f0;
  color: #334155;
}
.custom-ch-pill.warn {
  background: #fef3c7;
  color: #b45309;
  border: 1px solid #fcd34d;
}
.custom-ch-pill.promo {
  background: #fee2e2;
  color: #b91c1c;
  border: 1px solid #fecaca;
}
.dark .custom-ch-pill {
  background: #334155;
  color: #e2e8f0;
}
.dark .custom-ch-pill.warn {
  background: rgba(245, 158, 11, 0.22);
  color: #fcd34d;
  border-color: #b45309;
}
.dark .custom-ch-pill.promo {
  background: rgba(220, 38, 38, 0.25);
  color: #fca5a5;
  border-color: #dc2626;
}
.custom-ch-list {
  display: flex;
  flex-direction: column;
  gap: 5px;
  max-height: 220px;
  overflow-y: auto;
}
.custom-ch-item {
  display: block;
  padding: 6px 8px;
  border-radius: 7px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  text-decoration: none;
  color: #1e293b;
  font-size: 11.5px;
  transition: border-color 0.12s, background 0.12s;
}
.custom-ch-item:hover {
  border-color: #93c5fd;
  background: #eff6ff;
}
.custom-ch-item.is-current {
  border-color: #3b82f6;
  background: #eff6ff;
}
.dark .custom-ch-item {
  background: #1e293b;
  border-color: #334155;
  color: #f1f5f9;
}
.dark .custom-ch-item.is-current {
  background: rgba(37, 99, 235, 0.22);
  border-color: #3b82f6;
}
.custom-ch-promo-note {
  margin-top: 3px;
  padding: 3px 6px;
  border-radius: 5px;
  background: #fef2f2;
  color: #b91c1c;
  font-size: 11px;
  line-height: 1.3;
}
.dark .custom-ch-promo-note {
  background: rgba(185, 28, 28, 0.22);
  color: #fca5a5;
}
