/* Campanita de notificaciones (29-oct-2026) */
.cip-bell-btn { position: relative; margin-left: auto; font-size: 1.25rem !important; color: var(--text, #e8eaf0); }
.cip-bell-btn .ti { font-size: 1.35rem; vertical-align: middle; }
.cip-bell-btn.active { background: var(--accent-dim) !important; }
.cip-bell-btn.has-critical .ti { color: #ff5d5d; animation: cip-bell-ring 2.4s ease-in-out infinite; transform-origin: 50% 0; }
@keyframes cip-bell-ring { 0%, 86%, 100% { transform: rotate(0); } 90% { transform: rotate(14deg); } 94% { transform: rotate(-12deg); } 98% { transform: rotate(6deg); } }
.cip-bell-badge {
  position: absolute; top: -4px; right: -4px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px;
  background: #f5a524; color: #111; font-size: 11px; font-weight: 700; line-height: 18px; text-align: center;
  box-shadow: 0 0 0 2px var(--bg-soft, #161920);
}
.cip-bell-badge.critical { background: #ff4d4f; color: #fff; }
.cip-bell-badge.hidden { display: none; }

.cip-bell-panel {
  position: fixed; top: 56px; left: 12px; width: 400px; max-width: calc(100vw - 24px); max-height: min(640px, calc(100vh - 80px));
  display: flex; flex-direction: column; z-index: 9000; overflow: hidden;
  background: var(--bg-soft, #161920); color: var(--text, #e8eaf0);
  border: 1px solid rgba(255, 255, 255, .08); border-radius: 14px; box-shadow: 0 18px 48px rgba(0, 0, 0, .55);
}
.cip-bell-panel.hidden { display: none; }
.cip-bell-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px 8px; }
.cip-bell-title { font-size: 1rem; font-weight: 700; letter-spacing: .2px; }
.cip-bell-readall { background: transparent; border: 0; color: var(--accent, #0aff9d); font-size: .8rem; cursor: pointer; padding: 4px 6px; border-radius: 6px; }
.cip-bell-readall:hover { background: var(--accent-dim); }
.cip-bell-tabs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px; padding: 4px 12px 10px; border-bottom: 1px solid rgba(255, 255, 255, .06); overflow: hidden; }
.cip-bell-tab {
  display: inline-flex; align-items: center; justify-content: center; gap: 4px; background: transparent; color: var(--text-muted, #8b92a8);
  border: 1px solid transparent; border-radius: 999px; padding: 5px 4px; font-size: .78rem; cursor: pointer; white-space: nowrap; min-width: 0;
}
.cip-bell-tab:hover { background: var(--bg-hover, #1e222b); }
.cip-bell-tab.active { color: var(--accent, #0aff9d); background: var(--accent-dim); border-color: rgba(10, 255, 157, .25); }
.cip-bell-tabcount { background: rgba(255, 255, 255, .12); border-radius: 8px; padding: 0 5px; font-size: .68rem; line-height: 15px; }
.cip-bell-list { overflow-y: auto; overflow-x: hidden; flex: 1; padding: 6px 0; overscroll-behavior: contain;
  scrollbar-width: thin; scrollbar-color: rgba(255, 255, 255, .18) transparent; }
.cip-bell-list::-webkit-scrollbar { width: 6px; }
.cip-bell-list::-webkit-scrollbar-track { background: transparent; }
.cip-bell-list::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, .16); border-radius: 6px; }
.cip-bell-list::-webkit-scrollbar-thumb:hover { background: rgba(255, 255, 255, .3); }
.cip-bell-tabs, .cip-bell-panel { scrollbar-width: none; }
.cip-bell-tabs::-webkit-scrollbar { display: none; }

.cip-bell-item {
  position: relative; display: flex; gap: 11px; align-items: flex-start; padding: 11px 16px; cursor: pointer;
  border-left: 3px solid transparent;
}
.cip-bell-item:hover, .cip-bell-item:focus { background: var(--bg-hover, #1e222b); outline: none; }
.cip-bell-item.sev-critical { border-left-color: #ff4d4f; }
.cip-bell-item.sev-warning { border-left-color: #f5a524; }
.cip-bell-item.read { opacity: .55; }
.cip-bell-ico {
  flex: 0 0 34px; width: 34px; height: 34px; border-radius: 10px; display: flex; align-items: center; justify-content: center;
  background: rgba(255, 255, 255, .06); font-size: 1.1rem;
}
.cip-bell-item.sev-critical .cip-bell-ico { background: rgba(255, 77, 79, .15); color: #ff7a7c; }
.cip-bell-item.sev-warning .cip-bell-ico { background: rgba(245, 165, 36, .15); color: #f5a524; }
.cip-bell-main { min-width: 0; flex: 1; }
.cip-bell-row { display: flex; align-items: center; gap: 8px; }
.cip-bell-itemtitle { font-size: .88rem; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cip-bell-count { background: var(--accent, #0aff9d); color: #04210f; border-radius: 9px; font-size: .68rem; font-weight: 700; padding: 0 6px; line-height: 16px; }
.cip-bell-body { font-size: .8rem; color: var(--text-muted, #8b92a8); margin-top: 2px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.cip-bell-time { font-size: .7rem; color: var(--text-muted, #8b92a8); margin-top: 4px; opacity: .8; }
.cip-bell-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent, #0aff9d); margin-top: 6px; flex: 0 0 8px; }
.cip-bell-empty { text-align: center; padding: 40px 20px; color: var(--text-muted, #8b92a8); }
.cip-bell-empty .ti { font-size: 2.2rem; color: var(--accent, #0aff9d); }
.cip-bell-empty div { margin-top: 8px; font-weight: 600; color: var(--text, #e8eaf0); }

@media (max-width: 768px) {
  .cip-bell-panel { top: auto; bottom: 0; left: 0; right: 0; width: 100%; max-width: 100%; max-height: 78vh; border-radius: 18px 18px 0 0; }
  .cip-bell-item { padding: 14px 16px; }
}

.cip-bell-foot { border-top: 1px solid rgba(255, 255, 255, .06); padding: 8px 12px; display: flex; justify-content: center; }
.cip-bell-test { background: transparent; border: 1px dashed rgba(255, 255, 255, .18); color: var(--text-muted, #8b92a8); border-radius: 8px; padding: 6px 12px; font-size: .78rem; cursor: pointer; }
.cip-bell-test:hover { color: var(--accent, #0aff9d); border-color: var(--accent, #0aff9d); }

/* 31-oct-2026: silencio general desde la campanita */
.cip-bell-foot { flex-wrap: wrap; gap: 8px; }
.cip-bell-mute { background: transparent; border: 1px solid rgba(255, 255, 255, .18); color: var(--text, #e8eaf0); border-radius: 8px; padding: 6px 12px; font-size: .78rem; cursor: pointer; }
.cip-bell-mute:hover { color: var(--accent, #0aff9d); border-color: var(--accent, #0aff9d); }
.cip-bell-banner { background: rgba(245, 165, 36, .12); color: #f5a524; font-size: .76rem; padding: 7px 14px; border-bottom: 1px solid rgba(245, 165, 36, .25); }
.cip-bell-banner.hidden, .cip-bell-test.hidden { display: none; }
.cip-bell-btn.muted { opacity: .65; }

/* 31-oct-2026: barra de filtros activos sobre la lista de conversaciones */
.active-filters-bar { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 14px; background: rgba(245, 165, 36, .12); border-bottom: 1px solid rgba(245, 165, 36, .3); color: #f5a524; font-size: .8rem; }
.active-filters-bar.hidden { display: none; }
.active-filters-bar .afb-text { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.active-filters-bar .afb-clear { flex: 0 0 auto; background: #f5a524; color: #1a1205; border: 0; border-radius: 8px; padding: 5px 10px; font-size: .78rem; font-weight: 600; cursor: pointer; }
