/* ============================================
   CubaEmpresarial — Chat
   ============================================ */

/* Panel principal — visibilidad gestionada por PanelManager (ceHidden) */
#Chat {
  flex-direction: column;
  height: 100%;
  overflow: hidden;
}
#Chat.cePanel:not(.ceHidden) { display: flex; }

/* Layout dos columnas */
.ce-chat-layout {
  display: flex;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

/* Sidebar: lista de online + conversaciones */
.ce-chat-sidebar {
  width: 260px;
  flex-shrink: 0;
  border-right: 1px solid var(--ce-border, rgba(255,255,255,.08));
  display: flex;
  flex-direction: column;
  background: var(--ce-surface, #0f172a);
}

/* Botón volver (solo móvil) */
.ce-chat-back-btn {
  display: none;
  background: none;
  border: none;
  color: #38bdf8;
  font-size: 1.25rem;
  cursor: pointer;
  padding: 0 6px 0 0;
  flex-shrink: 0;
}

@media (max-width: 700px) {
  .ce-chat-layout { position: relative; }

  /* Sidebar ocupa todo en móvil */
  .ce-chat-sidebar {
    position: absolute;
    inset: 0;
    width: 100%;
    z-index: 2;
    transition: transform .2s ease;
  }
  .ce-chat-sidebar.ce-hidden-mobile {
    transform: translateX(-100%);
    pointer-events: none;
  }

  /* Chat ocupa todo en móvil */
  .ce-chat-main {
    position: absolute;
    inset: 0;
    z-index: 1;
    transform: translateX(100%);
    transition: transform .2s ease;
  }
  .ce-chat-main.ce-visible-mobile {
    transform: translateX(0);
    z-index: 3;
  }

  .ce-chat-back-btn { display: flex; align-items: center; }
}

.ce-chat-sidebar-header {
  padding: 14px 16px 10px;
  font-weight: 800;
  font-size: 1.0625rem;
  color: var(--ce-text, #e2e8f0);
  border-bottom: 1px solid var(--ce-border, rgba(255,255,255,.08));
  display: flex;
  align-items: center;
  gap: 8px;
}
.ce-chat-online-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: #22c55e;
  flex-shrink: 0;
}

.ce-chat-section-label {
  padding: 10px 16px 4px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: .08em;
  color: rgba(148,163,184,.5);
  text-transform: uppercase;
}

.ce-chat-user-list {
  flex: 1;
  overflow-y: auto;
  padding: 4px 0;
}

.ce-chat-user-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 16px;
  cursor: pointer;
  border-radius: 0;
  transition: background .15s;
}
.ce-chat-user-item:hover { background: rgba(255,255,255,.05); }
.ce-chat-user-item.active { background: rgba(56,189,248,.1); }

.ce-chat-avatar {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg,#38bdf8,#818cf8);
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 0.875rem;
  color: #fff;
  flex-shrink: 0;
  position: relative;
  overflow: hidden;
}
.ce-chat-avatar img {
  width: 100%; height: 100%;
  object-fit: cover;
  border-radius: 50%;
  position: absolute; inset: 0;
}
.ce-chat-avatar .ce-online-badge {
  position: absolute; bottom: 0; right: 0;
  width: 10px; height: 10px;
  border-radius: 50%;
  background: #22c55e;
  border: 2px solid var(--ce-surface, #0f172a);
  z-index: 1;
}

/* Badge de notificaciones del menú */
.ce-chat-menu-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #ef4444;
  color: #fff;
  border-radius: 50%;
  font-size: 0.625rem;
  font-weight: 800;
  min-width: 17px; height: 17px;
  padding: 0 3px;
  margin-left: 6px;
  vertical-align: middle;
  animation: ce-badge-pop .2s ease;
}
@keyframes ce-badge-pop {
  0%   { transform: scale(0); }
  80%  { transform: scale(1.2); }
  100% { transform: scale(1); }
}

/* Notificación emergente */
.ce-chat-notif {
  position: fixed;
  bottom: 24px; right: 16px;
  background: #1e293b;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 16px;
  padding: 10px 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  z-index: 9998;
  box-shadow: 0 8px 24px rgba(0,0,0,.4);
  cursor: pointer;
  max-width: 300px;
  animation: ce-notif-in .25s ease;
}
@keyframes ce-notif-in {
  from { transform: translateY(20px); opacity: 0; }
  to   { transform: translateY(0);    opacity: 1; }
}
.ce-chat-notif-avatar {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg,#38bdf8,#818cf8);
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 1.0rem;
  color: #fff;
  flex-shrink: 0;
  overflow: hidden;
  position: relative;
}
.ce-chat-notif-avatar img {
  width: 100%; height: 100%; object-fit: cover; border-radius: 50%;
}
.ce-chat-notif-body { flex: 1; min-width: 0; }
.ce-chat-notif-name {
  font-weight: 700; font-size: 0.9375rem;
  color: #e2e8f0;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.ce-chat-notif-text {
  font-size: 0.875rem;
  color: rgba(148,163,184,.75);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  margin-top: 2px;
}
.ce-chat-notif-close {
  background: none; border: none;
  color: rgba(148,163,184,.5);
  font-size: 1.0rem; cursor: pointer;
  padding: 0 0 0 6px;
  flex-shrink: 0;
}

.ce-chat-user-info { flex: 1; min-width: 0; }
.ce-chat-user-name {
  font-weight: 700; font-size: 0.9375rem;
  color: var(--ce-text, #e2e8f0);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.ce-chat-user-sub {
  font-size: 0.8125rem;
  color: rgba(148,163,184,.6);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

.ce-chat-request-btn {
  background: rgba(56,189,248,.15);
  border: 1px solid rgba(56,189,248,.3);
  color: #38bdf8;
  border-radius: 6px;
  padding: 3px 8px;
  font-size: 0.6875rem;
  font-weight: 700;
  cursor: pointer;
  flex-shrink: 0;
}
.ce-chat-request-btn:hover { background: rgba(56,189,248,.25); }

/* Área de chat principal */
.ce-chat-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  background: var(--ce-bg, #111827);
}

.ce-chat-main-header {
  padding: 12px 16px;
  border-bottom: 1px solid var(--ce-border, rgba(255,255,255,.08));
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--ce-surface, #0f172a);
}
.ce-chat-main-header .ce-chat-with-name {
  font-weight: 800;
  font-size: 1.0rem;
  color: var(--ce-text, #e2e8f0);
}
.ce-chat-main-header .ce-chat-with-status {
  font-size: 0.8125rem;
  color: #22c55e;
}

.ce-chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* Estado vacío */
.ce-chat-empty {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: rgba(148,163,184,.4);
  font-size: 1.0rem;
}
.ce-chat-empty-icon { font-size: 3.0rem; opacity: .3; }

/* Burbujas */
.ce-msg {
  display: flex;
  flex-direction: column;
  max-width: 75%;
}
.ce-msg.mine { align-self: flex-end; align-items: flex-end; }
.ce-msg.theirs { align-self: flex-start; align-items: flex-start; }

.ce-msg-bubble {
  padding: 10px 14px;
  border-radius: 16px;
  font-size: 1.0rem;
  line-height: 1.5;
  word-break: break-word;
}
.ce-msg.mine .ce-msg-bubble {
  background: #38bdf8;
  color: #0f172a;
  border-bottom-right-radius: 4px;
}
.ce-msg.theirs .ce-msg-bubble {
  background: rgba(255,255,255,.08);
  color: var(--ce-text, #e2e8f0);
  border-bottom-left-radius: 4px;
}
.ce-msg-time {
  font-size: 0.75rem;
  color: rgba(148,163,184,.5);
  margin-top: 2px;
  padding: 0 4px;
}

/* Typing */
.ce-chat-typing {
  font-size: 0.8125rem;
  color: #38bdf8;
  padding: 0 14px 6px;
  min-height: 20px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 2px;
}
.ce-chat-typing:empty { visibility: hidden; }
.ce-chat-typing-dots {
  display: inline-flex;
  gap: 3px;
  margin-left: 4px;
}
.ce-chat-typing-dots span {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #38bdf8;
  animation: ce-typing-bounce 1.4s infinite ease-in-out both;
}
.ce-chat-typing-dots span:nth-child(1) { animation-delay: 0s; }
.ce-chat-typing-dots span:nth-child(2) { animation-delay: 0.2s; }
.ce-chat-typing-dots span:nth-child(3) { animation-delay: 0.4s; }
@keyframes ce-typing-bounce {
  0%, 80%, 100% { transform: scale(0.4); opacity: 0.4; }
  40% { transform: scale(1); opacity: 1; }
}

/* Input */
.ce-chat-input-row {
  display: flex;
  gap: 8px;
  padding: 10px 12px;
  border-top: 1px solid var(--ce-border, rgba(255,255,255,.08));
  background: var(--ce-surface, #0f172a);
  align-items: flex-end;
}
.ce-chat-input {
  flex: 1;
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 20px;
  padding: 10px 16px;
  color: var(--ce-text, #e2e8f0);
  font-size: 1.0rem;
  resize: none;
  max-height: 100px;
  min-height: 38px;
  outline: none;
  font-family: inherit;
  line-height: 1.4;
  -webkit-user-select: text;
  user-select: text;
}
.ce-chat-input:focus { border-color: rgba(56,189,248,.4); }
.ce-chat-send-btn {
  width: 38px; height: 38px;
  border-radius: 50%;
  background: #38bdf8;
  border: none;
  color: #0f172a;
  font-size: 1.125rem;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  transition: background .15s;
}
.ce-chat-send-btn:hover { background: #7dd3fc; }
.ce-chat-send-btn:disabled { background: rgba(56,189,248,.3); cursor: default; }
.ce-chat-send-btn { margin-bottom: 14px; }

/* Botones media (foto/audio) */
.ce-chat-media-btn {
  background: none;
  border: none;
  font-size: 1.25rem;
  cursor: pointer;
  padding: 4px 2px;
  margin-bottom: 14px;
  flex-shrink: 0;
  opacity: .75;
  transition: opacity .15s;
  touch-action: none;  /* necesario para pointerdown en móvil */
  user-select: none;
  -webkit-user-select: none;
}
.ce-chat-media-btn:hover { opacity: 1; }

/* Botón scroll-to-bottom (estilo WhatsApp) */
.ce-chat-scroll-bottom {
  position: absolute;
  bottom: 90px;
  right: 16px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--ce-surface, #0f172a);
  border: 1px solid rgba(255,255,255,.12);
  color: var(--ce-text, #e2e8f0);
  font-size: 1.25rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(0,0,0,.35);
  z-index: 10;
  opacity: 0;
  transform: scale(0.7);
  pointer-events: none;
  transition: opacity .2s, transform .2s;
}
.ce-chat-scroll-bottom.visible {
  opacity: 1;
  transform: scale(1);
  pointer-events: auto;
}
.ce-chat-scroll-bottom:active {
  transform: scale(0.9);
}

/* Indicador de carga gradual */
.ce-chat-load-more {
  text-align: center;
  font-size: 0.75rem;
  color: rgba(148,163,184,.5);
  padding: 10px;
}

/* Mensaje pendiente (enviando...) */
.ce-msg-pending .ce-msg-bubble { opacity: .6; }

/* Cita / quote dentro de burbuja */
.ce-msg-quote {
  background: rgba(255,255,255,.08);
  border-left: 3px solid #38bdf8;
  border-radius: 4px;
  padding: 6px 10px;
  margin-bottom: 6px;
  font-size: 0.82rem;
  color: rgba(226,232,240,.7);
  line-height: 1.3;
  max-height: 60px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: pre-wrap;
  word-break: break-word;
}
.ce-msg.mine .ce-msg-quote {
  background: rgba(0,0,0,.1);
  border-left-color: rgba(0,0,0,.3);
  color: rgba(15,23,42,.6);
}

/* Barra de respuesta encima del input */
.ce-chat-reply-bar {
  display: none;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  background: rgba(30,41,59,.95);
  border-top: 1px solid rgba(148,163,184,.15);
  border-left: 3px solid #38bdf8;
  margin: 0 8px;
  border-radius: 8px 8px 0 0;
}
.ce-chat-reply-preview {
  flex: 1;
  font-size: 0.82rem;
  color: rgba(226,232,240,.7);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.3;
}
.ce-chat-reply-close {
  background: none;
  border: none;
  color: rgba(148,163,184,.6);
  font-size: 18px;
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 4px;
}
.ce-chat-reply-close:hover {
  color: #e2e8f0;
  background: rgba(148,163,184,.12);
}

/* Menú contextual de mensaje */
.ce-msg-ctx-menu button:hover {
  background: rgba(148,163,184,.12);
}

/* Barra de emojis rápidos en el menú */
.ce-msg-emoji-bar {
  display: flex;
  justify-content: center;
  gap: 2px;
  padding: 8px 10px;
  border-bottom: 1px solid rgba(148,163,184,.15);
}
.ce-msg-emoji-btn {
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  padding: 4px 6px;
  border-radius: 8px;
  transition: background .12s, transform .12s;
  line-height: 1;
}
.ce-msg-emoji-btn:hover {
  background: rgba(148,163,184,.15);
  transform: scale(1.25);
}
.ce-msg-emoji-btn:active {
  transform: scale(1.1);
}

/* Reacciones debajo del texto en la burbuja */
.ce-msg-reactions {
  display: flex;
  gap: 4px;
  margin-top: 4px;
  flex-wrap: wrap;
}
.ce-msg-reaction-badge {
  display: inline-block;
  font-size: 16px;
  background: rgba(255,255,255,.1);
  border-radius: 12px;
  padding: 1px 6px;
  line-height: 1.4;
  cursor: default;
}
.ce-msg.mine .ce-msg-reaction-badge {
  background: rgba(0,0,0,.12);
}

/* Modal de petición de chat entrante */
.ce-chat-request-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(0,0,0,.6);
  align-items: center;
  justify-content: center;
}
.ce-chat-request-modal.open { display: flex; }
.ce-chat-request-card {
  background: var(--ce-surface, #1e293b);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 20px;
  padding: 28px 24px;
  text-align: center;
  max-width: 320px;
  width: 90%;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.ce-chat-request-card h3 {
  font-size: 1.1875rem;
  font-weight: 800;
  color: var(--ce-text, #e2e8f0);
}
.ce-chat-request-card p {
  font-size: 1.0rem;
  color: rgba(148,163,184,.75);
}
.ce-chat-request-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
}
.ce-chat-accept-btn {
  flex: 1;
  padding: 10px;
  border-radius: 12px;
  border: none;
  background: #22c55e;
  color: #fff;
  font-weight: 700;
  font-size: 1.0rem;
  cursor: pointer;
}
.ce-chat-reject-btn {
  flex: 1;
  padding: 10px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,.15);
  background: transparent;
  color: rgba(148,163,184,.8);
  font-weight: 700;
  font-size: 1.0rem;
  cursor: pointer;
}

/* Notificación badge */
.ce-chat-badge {
  background: #ef4444;
  color: #fff;
  border-radius: 50%;
  font-size: 0.625rem;
  font-weight: 800;
  width: 18px; height: 18px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}

/* ── Campanita de notificaciones ─────────────── */
.ce-notif-bell-wrap {
  position: relative;
  display: flex;
  align-items: center;
}
.ce-notif-bell-btn {
  background: none;
  border: none;
  font-size: 1.25rem;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 8px;
  position: relative;
  transition: background .15s;
  display: flex;
  align-items: center;
  gap: 4px;
  color: var(--ce-text, #e2e8f0);
}
.ce-notif-bell-btn:hover { background: rgba(255,255,255,.07); }

.ce-notif-bell-count {
  background: #ef4444;
  color: #fff;
  border-radius: 50%;
  font-size: 0.625rem;
  font-weight: 800;
  min-width: 18px; height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 3px;
  animation: ce-badge-pop .2s ease;
}

/* Dropdown panel */
.ce-notif-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  width: 320px;
  max-height: 420px;
  background: var(--ce-surface, #1e293b);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 16px;
  box-shadow: 0 12px 36px rgba(0,0,0,.45);
  z-index: 9990;
  overflow: hidden;
  flex-direction: column;
}
.ce-notif-dropdown.open { display: flex; }

@media (max-width: 400px) {
  .ce-notif-dropdown { width: 95vw; right: -8px; }
}

.ce-notif-dropdown-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid rgba(255,255,255,.08);
  font-weight: 800;
  font-size: 1.0rem;
  color: var(--ce-text, #e2e8f0);
  flex-shrink: 0;
}
.ce-notif-clear-all {
  background: none;
  border: none;
  color: rgba(148,163,184,.6);
  font-size: 0.6875rem;
  cursor: pointer;
  font-weight: 600;
  padding: 0;
}
.ce-notif-clear-all:hover { color: #ef4444; }

.ce-notif-list {
  overflow-y: auto;
  flex: 1;
}
.ce-notif-empty {
  padding: 32px 16px;
  text-align: center;
  color: rgba(148,163,184,.4);
  font-size: 0.9375rem;
}

/* Item individual de notificación */
.ce-notif-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  cursor: pointer;
  border-bottom: 1px solid rgba(255,255,255,.05);
  transition: background .15s;
  position: relative;
}
.ce-notif-item:hover { background: rgba(255,255,255,.05); }
.ce-notif-item:last-child { border-bottom: none; }

.ce-notif-item-avatar {
  width: 38px; height: 38px;
  border-radius: 50%;
  background: linear-gradient(135deg,#38bdf8,#818cf8);
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 0.9375rem;
  color: #fff;
  flex-shrink: 0;
  overflow: hidden;
  position: relative;
}
.ce-notif-item-avatar img {
  width: 100%; height: 100%; object-fit: cover; border-radius: 50%;
}
.ce-notif-item-body { flex: 1; min-width: 0; }
.ce-notif-item-name {
  font-weight: 700; font-size: 0.9375rem;
  color: var(--ce-text, #e2e8f0);
  margin-bottom: 2px;
}
.ce-notif-item-text {
  font-size: 0.875rem;
  color: rgba(148,163,184,.75);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.ce-notif-item-time {
  font-size: 0.75rem;
  color: rgba(148,163,184,.4);
  margin-top: 3px;
}
.ce-notif-item-del {
  background: none; border: none;
  color: rgba(148,163,184,.3);
  font-size: 0.875rem; cursor: pointer;
  padding: 0; flex-shrink: 0;
  line-height: 1;
  align-self: center;
}
.ce-notif-item-del:hover { color: #ef4444; }

/* ── Grupos de Chat ───────────────────────────────────── */
.ce-chat-sidebar-top {
  display: flex;
  align-items: center;
  padding: 0 4px 0 0;
}
.ce-chat-new-group-btn {
  background: rgba(56,189,248,.15);
  border: 1px solid rgba(56,189,248,.3);
  color: #38bdf8;
  border-radius: 10px;
  padding: 4px 10px;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  transition: background .15s;
}
.ce-chat-new-group-btn:hover { background: rgba(56,189,248,.28); }
.ce-chat-group-item { cursor: pointer; }

/* Pestañas Todo / Grupos */
.ce-chat-tabs {
  display: flex;
  gap: 4px;
  padding: 6px 8px 2px;
  border-bottom: 1px solid rgba(255,255,255,.06);
  flex-shrink: 0;
}
.ce-chat-tab {
  flex: 1;
  padding: 6px 0;
  background: transparent;
  border: none;
  border-radius: 8px;
  color: rgba(148,163,184,.6);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: background .15s, color .15s;
}
.ce-chat-tab.active {
  background: rgba(56,189,248,.15);
  color: #38bdf8;
}
.ce-chat-tab:hover:not(.active) { background: rgba(255,255,255,.05); }
.ce-grupo-admin-btn {
  background: rgba(167,139,250,.15);
  border: 1px solid rgba(167,139,250,.3);
  color: #a78bfa;
  border-radius: 8px;
  padding: 4px 10px;
  font-size: 14px;
  cursor: pointer;
  margin-left: auto;
  transition: background .15s;
}
.ce-grupo-admin-btn:hover { background: rgba(167,139,250,.28); }

/* ── Modales (crear grupo, miembros) ─────────────────── */
.ce-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.6);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.ce-modal-card {
  background: #1e293b;
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 18px;
  padding: 24px 20px 20px;
  width: 100%;
  max-width: 400px;
  max-height: 80vh;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.ce-modal-card h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  color: #e2e8f0;
}
.ce-modal-input {
  width: 100%;
  background: rgba(255,255,255,.07);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 10px;
  padding: 10px 12px;
  color: #e2e8f0;
  font-size: 13px;
  outline: none;
  box-sizing: border-box;
}
.ce-modal-input:focus { border-color: rgba(56,189,248,.5); }
.ce-modal-resultados {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 200px;
  overflow-y: auto;
}
.ce-modal-resultado {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  background: rgba(255,255,255,.04);
  border-radius: 10px;
}
.ce-modal-res-av {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg,#38bdf8,#818cf8);
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 700; color: #fff;
  flex-shrink: 0; overflow: hidden;
}
.ce-modal-res-av img { width: 100%; height: 100%; object-fit: cover; }
.ce-modal-res-info { flex: 1; min-width: 0; }
.ce-modal-res-nombre { font-size: 13px; font-weight: 600; color: #e2e8f0; }
.ce-modal-res-sub { font-size: 11px; color: rgba(148,163,184,.6); }
.ce-modal-add-btn {
  background: rgba(56,189,248,.15);
  border: 1px solid rgba(56,189,248,.3);
  color: #38bdf8;
  border-radius: 8px;
  width: 28px; height: 28px;
  font-size: 16px; font-weight: 700;
  cursor: pointer; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  transition: background .15s;
}
.ce-modal-add-btn:hover { background: rgba(56,189,248,.28); }
.ce-modal-kick-btn {
  background: rgba(239,68,68,.12);
  border: 1px solid rgba(239,68,68,.25);
  color: #ef4444;
  border-radius: 8px;
  width: 28px; height: 28px;
  font-size: 14px; cursor: pointer; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  transition: background .15s;
}
.ce-modal-kick-btn:hover { background: rgba(239,68,68,.25); }
.ce-modal-seleccionados {
  display: flex; flex-wrap: wrap; gap: 6px;
}
.ce-sel-chip {
  display: flex; align-items: center; gap: 4px;
  background: rgba(56,189,248,.15);
  border: 1px solid rgba(56,189,248,.25);
  border-radius: 20px;
  padding: 3px 8px;
  font-size: 12px; color: #38bdf8;
}
.ce-sel-chip button {
  background: none; border: none;
  color: #38bdf8; cursor: pointer;
  font-size: 13px; padding: 0; line-height: 1;
}
.ce-modal-btns {
  display: flex; gap: 8px;
}
.ce-modal-btn {
  flex: 1; padding: 10px;
  border-radius: 10px; border: none;
  font-size: 13px; font-weight: 700;
  cursor: pointer; transition: background .15s;
}
.ce-modal-btn.primary { background: #38bdf8; color: #0f172a; }
.ce-modal-btn.primary:hover { background: #7dd3fc; }
.ce-modal-btn.secondary { background: rgba(255,255,255,.08); color: #e2e8f0; }
.ce-modal-btn.secondary:hover { background: rgba(255,255,255,.14); }
.ce-modal-empty { font-size: 12px; color: rgba(148,163,184,.5); text-align: center; padding: 8px 0; }
