.ac-shell{
  display:grid;
  gap:16px;
}

#view-alertas-chats #alertas-chats-root.metrics-section{
  margin:0;
  padding:0;
  background:transparent;
  border:0;
  box-shadow:none;
  backdrop-filter:none;
  -webkit-backdrop-filter:none;
}

.ac-toolbar{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:16px;
  flex-wrap:wrap;
}

.ac-toolbar-copy{
  max-width:760px;
}

.ac-toolbar-copy h3{
  margin:0 0 8px 0;
}

.ac-toolbar-filters{
  display:flex;
  gap:12px;
  flex-wrap:wrap;
  align-items:flex-end;
}

.ac-filter{
  display:grid;
  gap:6px;
  min-width:200px;
}

.ac-filter span{
  font-size:12px;
  font-weight:800;
  color:rgba(255,255,255,.72);
}

.ac-filter select{
  border-radius:14px;
  border:1px solid rgba(255,255,255,.12);
  background:rgba(255,255,255,.04);
  color:rgba(255,255,255,.95);
  padding:10px 12px;
}

.ac-summary-grid{
  display:grid;
  grid-template-columns:repeat(4, minmax(0, 1fr));
  gap:12px;
}

.ac-summary-card{
  border-radius:18px;
  border:1px solid rgba(255,255,255,.10);
  background:rgba(255,255,255,.04);
  padding:16px;
  display:grid;
  gap:8px;
}

.ac-summary-card small{
  color:rgba(255,255,255,.68);
  font-size:12px;
  font-weight:800;
}

.ac-summary-card strong{
  color:rgba(255,255,255,.96);
  font-size:26px;
  line-height:1;
}

.ac-summary-card.accent{
  background:linear-gradient(180deg, rgba(59,130,246,.18), rgba(59,130,246,.08));
  border-color:rgba(59,130,246,.35);
}

.ac-summary-card.accent strong{
  font-size:18px;
  line-height:1.25;
}

.ac-layout{
  display:grid;
  grid-template-columns:minmax(0, .92fr) minmax(0, 1.08fr);
  gap:16px;
  align-items:stretch;
}

.ac-panel{
  border-radius:var(--radius-lg, 18px);
  border:1px solid var(--border, rgba(255,255,255,.10));
  background:rgba(255,255,255,.025);
  padding:16px;
  height:min(72vh, 820px);
  max-height:min(72vh, 820px);
  min-height:0;
  display:flex;
  flex-direction:column;
  gap:12px;
  overflow:hidden;
}

.ac-panel-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:12px;
  flex-wrap:wrap;
}

.ac-panel-head h3{
  margin:0 0 6px 0;
}

.ac-alerts-list{
  display:grid;
  gap:12px;
  overflow:auto;
  min-height:0;
  padding-right:4px;
}

.ac-alert-card{
  border-radius:var(--radius-md, 14px);
  border:1px solid var(--border, rgba(255,255,255,.08));
  background:rgba(255,255,255,.025);
  padding:14px;
  display:grid;
  gap:10px;
}

.ac-alert-head,
.ac-alert-footer{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  flex-wrap:wrap;
}

.ac-alert-tags{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
}

.ac-badge{
  display:inline-flex;
  align-items:center;
  padding:6px 10px;
  border-radius:999px;
  border:1px solid rgba(59,130,246,.32);
  background:rgba(59,130,246,.12);
  color:rgba(228,240,255,.96);
  font-size:12px;
  font-weight:900;
}

.ac-badge.secondary{
  border-color:rgba(16,185,129,.28);
  background:rgba(16,185,129,.10);
}

.ac-badge.subtle{
  border-color:rgba(255,255,255,.10);
  background:rgba(255,255,255,.05);
  color:rgba(255,255,255,.76);
}

.ac-badge.human-attention{
  color:#fff;
  background:linear-gradient(135deg,#ef4444,#f97316);
  border-color:rgba(255,255,255,.2);
  box-shadow:0 6px 18px rgba(239,68,68,.22);
}

.ac-alert-note.human-message{
  font-style:italic;
  border-left:3px solid #f97316;
}

.ac-bot-status.human{
  color:#fed7aa;
  background:rgba(249,115,22,.14);
  border-color:rgba(249,115,22,.35);
}

.ac-wait{
  display:inline-flex;
  align-items:center;
  padding:6px 10px;
  border-radius:999px;
  border:1px solid rgba(255,255,255,.12);
  background:rgba(0,0,0,.22);
  color:rgba(255,255,255,.86);
  font-size:12px;
  font-weight:900;
}

.ac-alert-title{
  font-size:16px;
  font-weight:900;
  color:rgba(255,255,255,.96);
}

.ac-alert-text{
  color:rgba(255,255,255,.82);
  line-height:1.45;
}

.ac-alert-note{
  border-radius:14px;
  border:1px solid rgba(255,255,255,.08);
  background:rgba(255,255,255,.04);
  padding:10px 12px;
  color:rgba(255,255,255,.74);
  font-size:13px;
}

.ac-inline-actions{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
}

.ac-chat-layout{
  display:grid;
  grid-template-columns:minmax(0, 1fr);
  min-height:0;
}

.ac-chat-side{
  min-height:0;
  height:100%;
  border:none;
  background:transparent;
  padding:0;
}

.ac-chat-side-top{
  display:grid;
  gap:12px;
  padding:0 0 12px 0;
}

.ac-search-box{
  display:flex;
  align-items:center;
  gap:10px;
  border-radius:16px;
  border:1px solid rgba(255,255,255,.10);
  background:rgba(7,10,18,.64);
  padding:10px 12px;
}

.ac-search-box span{
  color:rgba(255,255,255,.62);
  font-size:14px;
}

.ac-search-box input{
  width:100%;
  border:none;
  outline:none;
  background:transparent;
  color:rgba(255,255,255,.94);
  font-size:14px;
}

.ac-search-box input::placeholder{
  color:rgba(255,255,255,.44);
}

.ac-chat-item-meta{
  color:rgba(255,255,255,.62);
  font-size:12px;
  margin-top:6px;
  text-align:left;
}

.ac-mini-status{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width:40px;
  padding:4px 8px;
  border-radius:999px;
  font-size:11px;
  font-weight:900;
}

.ac-mini-status.on{
  border:1px solid rgba(16,185,129,.32);
  background:rgba(16,185,129,.10);
  color:rgba(216,255,241,.96);
}

.ac-mini-status.off{
  border:1px solid rgba(239,68,68,.35);
  background:rgba(239,68,68,.10);
  color:rgba(255,225,225,.96);
}

.ac-mini-status.blocked{
  border:1px solid rgba(245,158,11,.35);
  background:rgba(245,158,11,.12);
  color:rgba(255,240,204,.96);
}

.ac-bot-row{
  display:flex;
  align-items:center;
  gap:10px;
  flex-wrap:wrap;
}

.ac-bot-status{
  display:inline-flex;
  align-items:center;
  padding:8px 12px;
  border-radius:999px;
  border:1px solid rgba(255,255,255,.12);
  font-size:12px;
  font-weight:900;
}

.ac-bot-status.on{
  border-color:rgba(16,185,129,.35);
  background:rgba(16,185,129,.10);
  color:rgba(216,255,241,.96);
}

.ac-bot-status.off{
  border-color:rgba(239,68,68,.35);
  background:rgba(239,68,68,.10);
  color:rgba(255,224,224,.96);
}

.ac-bot-status.blocked{
  border-color:rgba(245,158,11,.35);
  background:rgba(245,158,11,.12);
  color:rgba(255,240,204,.96);
}

#ac-chat-messages{
  min-height:320px;
  max-height:520px;
  overflow:auto;
  border:1px solid rgba(255,255,255,.08);
  border-radius:16px;
  padding:12px;
  background:rgba(0,0,0,.18);
}

.ac-chat-modal{
  position:fixed;
  inset:0;
  z-index:1200;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:20px;
}

.ac-chat-modal.hidden{
  display:none !important;
}

.ac-chat-modal-backdrop{
  position:absolute;
  inset:0;
  background:rgba(0,0,0,.72);
  backdrop-filter:blur(6px);
  -webkit-backdrop-filter:blur(6px);
}

.ac-chat-modal-card{
  position:relative;
  width:min(860px, calc(100vw - 32px));
  max-height:min(88vh, 880px);
  border-radius:24px;
  border:1px solid rgba(255,255,255,.12);
  background:linear-gradient(180deg, rgba(17,18,28,.98), rgba(8,10,16,.98));
  box-shadow:0 28px 70px rgba(0,0,0,.45);
  padding:18px;
  display:flex;
  flex-direction:column;
  gap:12px;
  overflow:hidden;
}

.ac-chat-modal-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:12px;
}

.ac-chat-modal-close{
  width:42px;
  height:42px;
  border-radius:50%;
  border:1px solid rgba(255,255,255,.10);
  background:rgba(255,255,255,.06);
  color:#fff;
  cursor:pointer;
  font-size:18px;
}

.ac-chat-modal-close:hover{
  background:rgba(255,255,255,.12);
}

.ac-blocked-modal-card{
  width:min(640px, calc(100vw - 32px));
}

.ac-blocked-top{
  display:flex;
  align-items:center;
  gap:10px;
  flex-wrap:wrap;
}

.ac-blocked-form{
  display:grid;
  grid-template-columns:minmax(0, 1fr) auto;
  gap:10px;
}

.ac-blocked-form input{
  width:100%;
  border-radius:16px;
  border:1px solid rgba(255,255,255,.10);
  background:rgba(7,10,18,.64);
  color:rgba(255,255,255,.94);
  padding:12px 14px;
  outline:none;
}

.ac-blocked-list{
  display:grid;
  gap:10px;
  max-height:340px;
  overflow:auto;
}

.ac-block-item{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding:12px 14px;
  border-radius:16px;
  border:1px solid rgba(255,255,255,.08);
  background:rgba(7,10,18,.58);
}

.ac-block-item strong{
  display:block;
  color:rgba(255,255,255,.96);
}

.ac-block-item small{
  display:block;
  margin-top:4px;
  color:rgba(255,255,255,.62);
}

.ac-chat-modal .chat-viewer{
  min-height:0;
  height:100%;
}

.ac-chat-modal .chat-messages{
  min-height:0;
  flex:1 1 auto;
}

body.ac-chat-modal-open{
  overflow:hidden;
}

@media (max-width: 1100px){
  .ac-summary-grid{
    grid-template-columns:repeat(2, minmax(0, 1fr));
  }
  .ac-layout{
    grid-template-columns:1fr;
  }
}

@media (max-width: 760px){
  .ac-toolbar-filters,
  .ac-filter{
    width:100%;
  }
  .ac-summary-grid{
    grid-template-columns:1fr;
  }
  .ac-panel{
    height:auto;
    max-height:none;
  }
  .ac-chat-modal{
    padding:12px;
  }
  .ac-chat-modal-card{
    width:100%;
    max-height:92vh;
    padding:14px;
  }
  .ac-blocked-form{
    grid-template-columns:1fr;
  }
  .ac-block-item{
    align-items:flex-start;
    flex-direction:column;
  }
}

/* WhatsApp-style Alertas y chats refresh */
.ac-shell{
  display:grid;
  gap:16px;
  width:100%;
  max-width:1480px;
  margin:0 auto;
}

.ac-page-head{
  display:grid;
  gap:16px;
}

.ac-page-copy{
  max-width:900px;
}

.ac-page-copy h3{
  margin:0 0 8px;
  font-size:24px;
  line-height:1.1;
  font-weight:900;
  color:rgba(255,255,255,.96);
  letter-spacing:0;
}

.ac-page-copy p{
  margin:0;
  color:rgba(255,255,255,.62);
  font-size:14px;
  line-height:1.45;
}

.ac-top-controls{
  display:flex;
  align-items:end;
  gap:12px;
  flex-wrap:wrap;
}

.ac-top-controls .btn,
.ac-filter select{
  height:44px;
  min-height:44px;
}

.ac-filter{
  display:grid;
  gap:6px;
  min-width:240px;
}

.ac-filter span{
  font-size:11px;
  font-weight:800;
  color:rgba(255,255,255,.58);
  text-transform:uppercase;
  letter-spacing:.08em;
}

.ac-filter select{
  border-radius:14px;
  border:1px solid rgba(255,255,255,.10);
  background:rgba(5,6,8,.72);
  color:rgba(255,255,255,.92);
  padding:0 14px;
  font-size:14px;
  font-weight:700;
}

.ac-summary-pills,
.ac-summary-grid{
  display:flex;
  align-items:center;
  gap:10px;
  flex-wrap:wrap;
}

.ac-summary-pill,
.ac-summary-card{
  min-height:46px;
  display:inline-flex;
  align-items:center;
  gap:10px;
  padding:0 16px;
  border-radius:999px;
  border:1px solid rgba(255,255,255,.10);
  background:rgba(255,255,255,.035);
  color:rgba(255,255,255,.88);
  box-shadow:none;
}

.ac-summary-pill small,
.ac-summary-card small{
  font-size:13px;
  font-weight:750;
  color:rgba(255,255,255,.58);
}

.ac-summary-pill strong,
.ac-summary-card strong,
.ac-summary-card.accent strong{
  font-size:16px;
  line-height:1;
  font-weight:900;
  color:rgba(255,255,255,.96);
}

.ac-summary-pill.accent,
.ac-summary-card.accent{
  border-color:rgba(59,130,246,.30);
  background:rgba(59,130,246,.10);
}

.ac-whatsapp-layout{
  display:grid;
  grid-template-columns:minmax(320px, 420px) minmax(0, 1fr);
  min-height:min(72vh, 780px);
  height:min(72vh, 780px);
  border:1px solid rgba(255,255,255,.08);
  border-radius:22px;
  overflow:hidden;
  background:rgba(0,0,0,.18);
}

.ac-conversations-pane{
  min-width:0;
  min-height:0;
  display:flex;
  flex-direction:column;
  border-right:1px solid rgba(255,255,255,.08);
  background:rgba(0,0,0,.22);
}

.ac-conversation-pane{
  min-width:0;
  min-height:0;
  display:flex;
  flex-direction:column;
  background:
    radial-gradient(circle at 16px 16px, rgba(255,255,255,.035) 1px, transparent 1.5px),
    linear-gradient(180deg, rgba(18,19,22,.96), rgba(13,14,16,.96));
  background-size:42px 42px, auto;
}

.ac-pane-tabs{
  display:flex;
  align-items:center;
  gap:8px;
  padding:14px 14px 8px;
}

.ac-main-tab{
  height:38px;
  padding:0 16px;
  border-radius:999px;
  border:1px solid rgba(255,255,255,.10);
  background:rgba(255,255,255,.035);
  color:rgba(255,255,255,.72);
  font-size:14px;
  font-weight:850;
  cursor:pointer;
}

.ac-main-tab.active{
  color:#fff;
  border-color:rgba(59,130,246,.42);
  background:rgba(59,130,246,.16);
}

.ac-channel-tabs,
.chat-filters{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
  padding:0 14px 12px;
}

.chat-filter-btn{
  height:34px;
  padding:0 13px;
  border-radius:999px;
  border:1px solid rgba(255,255,255,.10);
  background:rgba(255,255,255,.035);
  color:rgba(255,255,255,.70);
  font-size:13px;
  font-weight:800;
}

.chat-filter-btn.active{
  color:#fff;
  border-color:rgba(59,130,246,.42);
  background:rgba(59,130,246,.14);
}

.ac-search-box{
  margin:0 14px 12px;
  display:flex;
  align-items:center;
  gap:10px;
  height:44px;
  min-height:44px;
  border-radius:16px;
  border:1px solid rgba(255,255,255,.10);
  background:rgba(255,255,255,.045);
  padding:0 14px;
}

.ac-search-box span{
  color:rgba(255,255,255,.56);
  font-size:13px;
  font-weight:750;
}

.ac-search-box input{
  width:100%;
  min-width:0;
  border:0;
  outline:0;
  background:transparent;
  color:rgba(255,255,255,.94);
  font-size:14px;
}

#ac-chat-list{
  flex:1 1 auto;
  min-height:0;
  overflow:auto;
  padding:0 8px 10px;
}

.chat-item{
  width:100%;
  display:grid;
  gap:7px;
  padding:13px 12px;
  border:0;
  border-bottom:1px solid rgba(255,255,255,.055);
  background:transparent;
  color:inherit;
  text-align:left;
  cursor:pointer;
  border-radius:14px;
}

.chat-item:hover{
  background:rgba(255,255,255,.045);
}

.chat-item.active{
  background:rgba(255,255,255,.075);
}

.chat-item.has-alert{
  border:1px solid rgba(239,68,68,.38);
  background:rgba(239,68,68,.075);
}

.chat-item-top,
.chat-item-sub{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  min-width:0;
}

.chat-item-title,
.chat-item-msg{
  min-width:0;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}

.chat-item-time{
  flex:0 0 auto;
  color:rgba(255,255,255,.48);
  font-size:12px;
}

.ac-alert-dot{
  display:inline-flex;
  align-items:center;
  height:22px;
  padding:0 8px;
  border-radius:999px;
  border:1px solid rgba(239,68,68,.40);
  background:rgba(239,68,68,.14);
  color:rgba(255,225,225,.96);
  font-size:11px;
  font-weight:900;
}

.ac-conversation-head{
  min-height:72px;
  display:flex;
  align-items:center;
  gap:12px;
  padding:14px 18px;
  border-bottom:1px solid rgba(255,255,255,.08);
  background:rgba(0,0,0,.22);
}

.ac-conversation-avatar{
  width:44px;
  height:44px;
  border-radius:50%;
  display:grid;
  place-items:center;
  flex:0 0 44px;
  background:linear-gradient(145deg, rgba(59,130,246,.85), rgba(16,185,129,.75));
  color:#fff;
  font-weight:900;
}

.ac-conversation-title{
  min-width:0;
  display:grid;
  gap:3px;
  flex:1 1 auto;
}

.ac-conversation-title strong{
  color:rgba(255,255,255,.96);
  font-size:17px;
  font-weight:900;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}

.ac-conversation-title small{
  color:rgba(255,255,255,.56);
  font-size:13px;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}

.ac-bot-row{
  display:flex;
  align-items:center;
  justify-content:flex-end;
  gap:10px;
  flex-wrap:wrap;
}

.ac-chat-alert-actions{
  display:flex;
  align-items:center;
  justify-content:flex-end;
  gap:8px;
  flex-wrap:wrap;
}

.ac-chat-alert-actions.hidden{
  display:none !important;
}

.ac-chat-alert-actions .btn{
  height:34px;
  min-height:34px;
  padding:0 12px;
  border-radius:999px;
  font-size:12px;
  font-weight:850;
}

.ac-bot-status{
  height:34px;
  display:inline-flex;
  align-items:center;
  padding:0 11px;
  border-radius:999px;
  border:1px solid rgba(255,255,255,.12);
  font-size:12px;
  font-weight:900;
  white-space:nowrap;
}

#ac-chat-bot-toggle{
  height:38px;
  min-height:38px;
  padding:0 14px;
  border-radius:999px;
  font-size:13px;
  font-weight:850;
}

#ac-chat-messages{
  flex:1 1 auto;
  min-height:0;
  max-height:none;
  overflow:auto;
  border:0;
  border-radius:0;
  padding:22px;
  background:transparent;
}

.chat-placeholder{
  flex:1 1 auto;
  display:grid;
  place-items:center;
  color:rgba(255,255,255,.56);
  text-align:center;
  padding:24px;
}

.chat-bubble{
  max-width:min(72%, 640px);
  margin:8px 0;
  display:grid;
  gap:5px;
}

.chat-bubble.bot{
  margin-right:auto;
}

.chat-bubble.user{
  margin-left:auto;
}

.chat-bubble-text{
  padding:10px 13px;
  border-radius:17px;
  line-height:1.38;
  font-size:14px;
  border:1px solid rgba(255,255,255,.08);
}

.chat-bubble.bot .chat-bubble-text{
  background:rgba(255,255,255,.075);
  color:rgba(255,255,255,.90);
  border-bottom-left-radius:6px;
}

.chat-bubble.user .chat-bubble-text{
  background:rgba(16,185,129,.28);
  color:rgba(255,255,255,.96);
  border-color:rgba(16,185,129,.24);
  border-bottom-right-radius:6px;
}

.chat-bubble-time{
  font-size:11px;
  color:rgba(255,255,255,.42);
}

.chat-bubble.user .chat-bubble-time{
  text-align:right;
}

.ac-shell > #ac-alerts-list,
.ac-shell > #ac-alerts-empty{
  display:none !important;
}

@media (min-width: 981px){
  #ac-chat-modal{
    display:none !important;
  }
}

@media (max-width: 1100px){
  .ac-whatsapp-layout{
    grid-template-columns:minmax(300px, 380px) minmax(0, 1fr);
  }
}

@media (max-width: 980px){
  .ac-whatsapp-layout{
    grid-template-columns:1fr;
    height:auto;
    min-height:0;
  }

  .ac-conversation-pane{
    display:none;
  }

  .ac-mobile-chat-card .ac-conversation-pane{
    display:flex;
    height:min(78vh, 720px);
    border-radius:18px;
    overflow:hidden;
  }

  .ac-conversations-pane{
    border-right:0;
  }
}

@media (max-width: 760px){
  .ac-top-controls,
  .ac-filter{
    width:100%;
  }

  .ac-summary-pill{
    width:100%;
    justify-content:space-between;
  }

  .ac-conversation-head{
    align-items:flex-start;
    flex-wrap:wrap;
  }

  .ac-bot-row{
    width:100%;
    justify-content:flex-start;
  }

  .ac-chat-alert-actions{
    width:100%;
    justify-content:flex-start;
  }
}

/* Compact fixed-height chat surface */
#view-alertas-chats,
#alertas-chats-root{
  min-height:0;
}

#view-alertas-chats{
  height:calc(100dvh - 72px);
  overflow:hidden;
}

#view-alertas-chats.workspace-page,
#view-alertas-chats .panel,
#view-alertas-chats .screen-plain{
  min-height:0;
  overflow:hidden;
}

#alertas-chats-root{
  height:100%;
  overflow:hidden;
}

.ac-shell.ac-shell-chat-full,
.ac-shell{
  width:100%;
  max-width:1480px;
  height:100%;
  min-height:0;
  margin:0 auto;
  display:grid;
  grid-template-rows:auto auto minmax(0, 1fr);
  gap:10px;
  overflow:hidden;
}

.ac-page-copy{
  display:none !important;
}

.ac-page-head{
  margin:0;
  padding:0;
}

.ac-topbar-compact{
  width:100%;
  display:flex;
  align-items:end;
  justify-content:flex-start;
  gap:12px;
  min-height:0;
}

.ac-top-controls{
  display:flex;
  align-items:end;
  gap:12px;
  flex-wrap:wrap;
}

.ac-action-control,
.ac-filter{
  display:grid;
  gap:6px;
}

.ac-action-control span,
.ac-filter span{
  font-size:11px;
  line-height:1;
  font-weight:800;
  letter-spacing:.08em;
  text-transform:uppercase;
  color:rgba(255,255,255,.52);
}

.ac-action-control-button span{
  visibility:hidden;
}

#ac-blocked-open,
.ac-filter select{
  height:42px;
  min-height:42px;
  border-radius:14px;
}

#ac-blocked-open{
  padding:0 16px;
  font-size:14px;
  font-weight:750;
  display:inline-flex;
  align-items:center;
  justify-content:center;
}

.ac-filter{
  min-width:240px;
}

.ac-filter select{
  border:1px solid rgba(255,255,255,.10);
  background:rgba(5,6,8,.72);
  color:rgba(255,255,255,.92);
  padding:0 14px;
  font-size:14px;
  font-weight:700;
}

.ac-summary-strip,
.ac-summary-pills,
.ac-summary-grid{
  width:100%;
  display:flex;
  align-items:center;
  gap:0;
  flex-wrap:wrap;
  padding:4px 0 8px;
  border-bottom:1px solid rgba(255,255,255,.07);
}

.ac-summary-stat,
.ac-summary-pill,
.ac-summary-card{
  min-height:32px;
  display:inline-flex;
  align-items:baseline;
  gap:8px;
  padding:0 16px;
  border:0 !important;
  border-radius:0 !important;
  background:transparent !important;
  box-shadow:none !important;
  color:rgba(255,255,255,.86);
  position:relative;
}

.ac-summary-stat:not(:last-child)::after,
.ac-summary-pill:not(:last-child)::after,
.ac-summary-card:not(:last-child)::after{
  content:"";
  position:absolute;
  right:0;
  top:7px;
  bottom:7px;
  width:1px;
  background:rgba(255,255,255,.12);
}

.ac-summary-stat:first-child,
.ac-summary-pill:first-child,
.ac-summary-card:first-child{
  padding-left:0;
}

.ac-summary-stat span,
.ac-summary-stat small,
.ac-summary-pill small,
.ac-summary-card small{
  font-size:13px;
  font-weight:750;
  color:rgba(255,255,255,.52);
  white-space:nowrap;
}

.ac-summary-stat strong,
.ac-summary-pill strong,
.ac-summary-card strong,
.ac-summary-card.accent strong{
  font-size:16px;
  line-height:1;
  font-weight:900;
  color:rgba(255,255,255,.96);
  white-space:nowrap;
}

.ac-summary-stat-wide strong,
.ac-summary-pill.accent strong,
.ac-summary-card.accent strong{
  color:rgba(255,255,255,.96);
}

.ac-whatsapp-layout{
  min-height:0;
  height:100%;
  display:grid;
  grid-template-columns:minmax(320px, 420px) minmax(0, 1fr);
  border:1px solid rgba(255,255,255,.08);
  border-radius:18px;
  overflow:hidden;
  background:rgba(0,0,0,.18);
}

.ac-conversations-pane{
  min-width:0;
  min-height:0;
  height:100%;
  display:flex;
  flex-direction:column;
  overflow:hidden;
  border-right:1px solid rgba(255,255,255,.08);
  background:rgba(0,0,0,.22);
}

.ac-conversation-pane{
  min-width:0;
  min-height:0;
  height:100%;
  display:flex;
  flex-direction:column;
  overflow:hidden;
  background:
    radial-gradient(circle at 16px 16px, rgba(255,255,255,.03) 1px, transparent 1.5px),
    linear-gradient(180deg, rgba(14,15,17,.98), rgba(10,11,13,.98));
  background-size:42px 42px, auto;
}

.ac-pane-tabs{
  position:relative;
  display:flex;
  justify-content:center;
  align-items:center;
  gap:0;
  padding:12px 14px 8px;
}

.ac-pane-switch{
  width:100%;
}

.ac-pane-tabs::after{
  content:"";
  position:absolute;
  left:50%;
  top:10px;
  transform:translateX(-50%);
  width:210px;
  height:40px;
  border-radius:999px;
  background:rgba(255,255,255,.045);
  border:1px solid rgba(255,255,255,.08);
  z-index:0;
}

.ac-main-tab{
  z-index:1;
  height:36px;
  min-width:96px;
  padding:0 16px;
  border:0 !important;
  border-radius:999px;
  background:transparent;
  color:rgba(255,255,255,.58);
  font-size:14px;
  font-weight:850;
  cursor:pointer;
  position:relative;
  box-shadow:none;
}

.ac-main-tab.active{
  color:#fff;
  background:rgba(59,130,246,.20);
  box-shadow:inset 0 0 0 1px rgba(59,130,246,.30);
}

.ac-channel-tabs,
.chat-filters{
  display:flex;
  align-items:center;
  justify-content:center;
  gap:0;
  flex-wrap:wrap;
  padding:4px 14px 12px;
}

.chat-filter-btn{
  height:30px;
  padding:0 14px;
  border:0 !important;
  border-radius:0 !important;
  background:transparent !important;
  color:rgba(255,255,255,.55);
  font-size:13px;
  font-weight:800;
  cursor:pointer;
  position:relative;
}

.chat-filter-btn:not(:last-child)::after{
  content:"";
  position:absolute;
  right:0;
  top:8px;
  bottom:8px;
  width:1px;
  background:rgba(255,255,255,.12);
}

.chat-filter-btn.active{
  color:rgba(255,255,255,.96);
}

.chat-filter-btn.active::before{
  content:"";
  position:absolute;
  left:14px;
  right:14px;
  bottom:0;
  height:2px;
  border-radius:999px;
  background:#3b82f6;
}

.ac-search-box{
  margin:0 14px 12px;
  display:flex;
  align-items:center;
  gap:10px;
  height:42px;
  min-height:42px;
  border-radius:14px;
  border:1px solid rgba(255,255,255,.08);
  background:rgba(255,255,255,.035);
  padding:0 14px;
}

.ac-search-box span{
  color:rgba(255,255,255,.48);
  font-size:13px;
  font-weight:750;
}

.ac-search-box input{
  width:100%;
  min-width:0;
  border:0;
  outline:0;
  background:transparent;
  color:rgba(255,255,255,.92);
  font-size:14px;
}

#ac-chat-list{
  flex:1 1 auto;
  min-height:0;
  overflow-y:auto;
  overflow-x:hidden;
  padding:0 10px 10px;
}

#ac-chat-list-empty{
  margin:10px 14px;
}

.chat-item{
  width:100%;
  display:grid;
  gap:6px;
  padding:12px 10px;
  border:0 !important;
  border-radius:0 !important;
  border-bottom:1px solid rgba(255,255,255,.065) !important;
  background:transparent !important;
  color:inherit;
  text-align:left;
  cursor:pointer;
  box-shadow:none !important;
}

.chat-item:hover{
  background:rgba(255,255,255,.035) !important;
}

.chat-item.active{
  background:rgba(255,255,255,.065) !important;
}

.chat-item.has-alert{
  background:rgba(239,68,68,.055) !important;
  box-shadow:inset 3px 0 0 rgba(239,68,68,.80) !important;
}

.chat-item-top,
.chat-item-sub{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:8px;
  min-width:0;
}

.chat-item-sub{
  gap:10px;
}

.chat-item-title{
  color:rgba(255,255,255,.92);
  font-size:14px;
  font-weight:850;
  min-width:0;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}

.chat-item-msg{
  min-width:0;
  flex:1 1 auto;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  color:rgba(255,255,255,.58);
  font-size:13px;
}

.chat-item-time{
  flex:0 0 auto;
  color:rgba(255,255,255,.42);
  font-size:12px;
}

.ac-chat-item-meta{
  color:rgba(255,255,255,.44);
  font-size:12px;
}

.chat-item .badge{
  border-color:rgba(255,255,255,.10);
  background:rgba(255,255,255,.045);
}

.ac-alert-dot{
  display:inline-flex;
  align-items:center;
  height:20px;
  padding:0 7px;
  border-radius:999px;
  border:1px solid rgba(239,68,68,.40);
  background:rgba(239,68,68,.12);
  color:rgba(255,225,225,.96);
  font-size:10px;
  font-weight:900;
}

.ac-conversation-head{
  min-height:64px;
  flex:0 0 auto;
  display:flex;
  align-items:center;
  gap:12px;
  padding:10px 16px;
  border-bottom:1px solid rgba(255,255,255,.08);
  background:rgba(0,0,0,.28);
}

.ac-conversation-avatar{
  width:42px;
  height:42px;
  border-radius:50%;
  display:grid;
  place-items:center;
  flex:0 0 42px;
  background:linear-gradient(145deg, rgba(59,130,246,.85), rgba(16,185,129,.75));
  color:#fff;
  font-weight:900;
}

.ac-conversation-title{
  min-width:0;
  display:grid;
  gap:3px;
  flex:1 1 auto;
}

.ac-conversation-title strong{
  color:rgba(255,255,255,.96);
  font-size:16px;
  font-weight:900;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}

.ac-conversation-title small{
  color:rgba(255,255,255,.54);
  font-size:12px;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}

.ac-bot-row{
  display:flex;
  align-items:center;
  justify-content:flex-end;
  gap:8px;
  flex-wrap:wrap;
}

.ac-bot-status{
  height:32px;
  display:inline-flex;
  align-items:center;
  padding:0 10px;
  border-radius:999px;
  border:1px solid rgba(255,255,255,.12);
  font-size:12px;
  font-weight:900;
  white-space:nowrap;
}

#ac-chat-bot-toggle{
  height:36px;
  min-height:36px;
  padding:0 13px;
  border-radius:999px;
  font-size:13px;
  font-weight:850;
}

#ac-chat-messages{
  flex:1 1 auto;
  min-height:0;
  max-height:none !important;
  overflow-y:auto;
  overflow-x:hidden;
  border:0 !important;
  border-radius:0 !important;
  padding:18px 22px;
  background:transparent !important;
}

.chat-placeholder{
  flex:1 1 auto;
  min-height:0;
  display:grid;
  place-items:center;
  color:rgba(255,255,255,.50);
  text-align:center;
  padding:24px;
}

.chat-bubble{
  max-width:min(74%, 680px);
  margin:8px 0;
  display:grid;
  gap:4px;
  background:transparent !important;
  border:0 !important;
  box-shadow:none !important;
}

.chat-bubble.bot{
  margin-right:auto;
  justify-items:start;
}

.chat-bubble.user{
  margin-left:auto;
  justify-items:end;
}

.chat-bubble-text{
  padding:10px 13px;
  border-radius:16px;
  line-height:1.38;
  font-size:14px;
  border:0 !important;
  box-shadow:none !important;
}

.chat-bubble.bot .chat-bubble-text{
  background:#202226 !important;
  color:rgba(255,255,255,.94);
  border-bottom-left-radius:5px;
}

.chat-bubble.user .chat-bubble-text{
  background:#075e4c !important;
  color:rgba(255,255,255,.98);
  border-bottom-right-radius:5px;
}

.chat-bubble-time{
  font-size:11px;
  line-height:1;
  color:rgba(255,255,255,.40);
  padding:0 4px;
}

.chat-bubble.user .chat-bubble-time{
  text-align:right;
}

.chat-bubble.bot .chat-bubble-time{
  text-align:left;
}

@media (max-width: 980px){
  #view-alertas-chats{
    height:auto;
    overflow:hidden;
  }

  #alertas-chats-root{
    height:auto;
    overflow:visible;
  }

  .ac-shell.ac-shell-chat-full,
  .ac-shell{
    height:auto;
    min-height:0;
    overflow:visible;
    grid-template-rows:auto auto auto;
  }

  .ac-whatsapp-layout{
    grid-template-columns:1fr;
    height:auto;
    min-height:0;
  }

  .ac-conversation-pane{
    display:none;
  }

  .ac-mobile-chat-card .ac-conversation-pane{
    display:flex;
    height:min(78vh, 720px);
    border-radius:18px;
    overflow:hidden;
  }

  .ac-conversations-pane{
    border-right:0;
    min-height:520px;
  }
}

@media (max-width: 760px){
  .ac-top-controls,
  .ac-action-control,
  .ac-filter{
    width:100%;
  }

  .ac-summary-strip{
    align-items:flex-start;
  }

  .ac-summary-stat{
    width:100%;
    justify-content:space-between;
    padding:0;
  }

  .ac-summary-stat:not(:last-child)::after{
    display:none;
  }
}

/* Final desktop fit: fixed WhatsApp surface and compact chat rows */
#view-alertas-chats{
  min-height:0;
  overflow:hidden;
}

#view-alertas-chats .panel,
#view-alertas-chats .screen-plain,
#alertas-chats-root{
  min-height:0;
  height:100%;
  overflow:hidden;
}

#view-alertas-chats .ac-shell{
  width:100%;
  max-width:1480px;
  height:calc(100dvh - 92px);
  max-height:calc(100dvh - 92px);
  min-height:0;
  margin:0 auto;
  display:grid;
  grid-template-rows:auto auto minmax(0, 1fr);
  gap:10px;
  overflow:hidden;
}

#view-alertas-chats .ac-top-controls{
  display:flex;
  align-items:end;
  gap:12px;
  flex-wrap:wrap;
}

#view-alertas-chats .ac-action-control,
#view-alertas-chats .ac-filter{
  display:grid;
  grid-template-rows:14px 42px;
  gap:6px;
  align-items:end;
}

#view-alertas-chats .ac-action-control span,
#view-alertas-chats .ac-filter span{
  height:14px;
  line-height:14px;
  font-size:11px;
  font-weight:800;
  letter-spacing:.08em;
  text-transform:uppercase;
  color:rgba(255,255,255,.52);
}

#view-alertas-chats .ac-action-control-button span{
  visibility:hidden;
}

#view-alertas-chats #ac-blocked-open,
#view-alertas-chats .ac-filter select{
  height:42px;
  min-height:42px;
  box-sizing:border-box;
  border-radius:14px;
}

#view-alertas-chats #ac-blocked-open{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:0 18px;
  font-size:14px;
  font-weight:750;
  line-height:1;
}

#view-alertas-chats .ac-filter{
  min-width:260px;
}

#view-alertas-chats .ac-filter select{
  width:100%;
  border:1px solid rgba(255,255,255,.10);
  background:rgba(5,6,8,.72);
  color:rgba(255,255,255,.92);
  padding:0 14px;
  font-size:14px;
  font-weight:700;
}

#view-alertas-chats .ac-whatsapp-layout{
  min-height:0;
  height:100%;
  display:grid;
  grid-template-columns:minmax(300px, 405px) minmax(0, 1fr);
  overflow:hidden;
  border:1px solid rgba(255,255,255,.08);
  border-radius:18px;
  background:rgba(0,0,0,.18);
}

#view-alertas-chats .ac-conversations-pane{
  min-width:0;
  min-height:0;
  height:100%;
  display:flex;
  flex-direction:column;
  overflow:hidden;
  border-right:1px solid rgba(255,255,255,.08);
  background:rgba(0,0,0,.22);
}

#view-alertas-chats #ac-chat-list{
  flex:1 1 auto;
  min-height:0;
  overflow-y:auto;
  overflow-x:hidden;
  padding:0 8px 8px;
}

#view-alertas-chats .ac-conversation-pane{
  min-width:0;
  min-height:0;
  height:100%;
  display:flex;
  flex-direction:column;
  overflow:hidden;
  background:
    radial-gradient(circle at 16px 16px, rgba(255,255,255,.03) 1px, transparent 1.5px),
    linear-gradient(180deg, rgba(14,15,17,.98), rgba(10,11,13,.98));
  background-size:42px 42px, auto;
}

#view-alertas-chats .ac-conversation-head{
  flex:0 0 auto;
}

#view-alertas-chats #ac-chat-messages{
  flex:1 1 auto;
  min-height:0;
  max-height:none !important;
  overflow-y:auto;
  overflow-x:hidden;
}

#view-alertas-chats .ac-pane-tabs{
  padding:8px 12px 6px;
}

#view-alertas-chats .ac-pane-tabs::after{
  top:7px;
  width:186px;
  height:36px;
}

#view-alertas-chats .ac-main-tab{
  height:32px;
  min-width:84px;
  padding:0 13px;
  font-size:13px;
}

#view-alertas-chats .ac-channel-tabs,
#view-alertas-chats .chat-filters{
  padding:2px 12px 8px;
}

#view-alertas-chats .chat-filter-btn{
  height:26px;
  padding:0 12px;
  font-size:12px;
}

#view-alertas-chats .ac-search-box{
  margin:0 12px 9px;
  height:38px;
  min-height:38px;
  border-radius:13px;
  padding:0 12px;
}

#view-alertas-chats .ac-search-box span{
  font-size:12px;
}

#view-alertas-chats .ac-search-box input{
  font-size:13px;
}

#view-alertas-chats .chat-item{
  width:100%;
  display:grid;
  gap:4px;
  padding:9px 10px;
  min-height:72px;
  border:0 !important;
  border-radius:0 !important;
  border-bottom:1px solid rgba(255,255,255,.055) !important;
  background:transparent !important;
  color:inherit;
  text-align:left;
  cursor:pointer;
  box-shadow:none !important;
}

#view-alertas-chats .chat-item:hover{
  background:rgba(255,255,255,.035) !important;
}

#view-alertas-chats .chat-item.active{
  background:rgba(255,255,255,.060) !important;
}

#view-alertas-chats .chat-item.has-alert{
  background:rgba(239,68,68,.050) !important;
  box-shadow:inset 3px 0 0 rgba(239,68,68,.82) !important;
}

#view-alertas-chats .chat-item-top{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:8px;
  min-height:22px;
}

#view-alertas-chats .chat-item-sub{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:8px;
  min-height:18px;
}

#view-alertas-chats .chat-item-title{
  color:rgba(255,255,255,.92);
  font-size:13px;
  line-height:1.15;
  font-weight:850;
  min-width:0;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}

#view-alertas-chats .chat-item-msg{
  min-width:0;
  flex:1 1 auto;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  color:rgba(255,255,255,.58);
  font-size:12px;
  line-height:1.2;
}

#view-alertas-chats .chat-item-time{
  flex:0 0 auto;
  color:rgba(255,255,255,.42);
  font-size:11px;
  line-height:1.2;
}

#view-alertas-chats .ac-chat-item-meta{
  color:rgba(255,255,255,.42);
  font-size:11px;
  line-height:1.2;
}

#view-alertas-chats .chat-item .badge,
#view-alertas-chats .chat-channel-badge,
#view-alertas-chats .ac-mini-status{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  height:22px;
  padding:0 8px;
  border-radius:999px;
  font-size:10px;
  line-height:1;
  font-weight:900;
}

@media (min-width: 981px){
  #view-alertas-chats #ac-chat-modal{
    display:none !important;
  }
}

@media (max-width: 980px){
  #view-alertas-chats{
    overflow:auto;
  }

  #view-alertas-chats .panel,
  #view-alertas-chats .screen-plain,
  #alertas-chats-root{
    height:auto;
    overflow:visible;
  }

  #view-alertas-chats .ac-shell{
    height:auto;
    max-height:none;
    min-height:0;
    overflow:visible;
    display:grid;
  }

  #view-alertas-chats .ac-whatsapp-layout{
    grid-template-columns:1fr;
    height:auto;
    min-height:0;
    overflow:visible;
  }

  #view-alertas-chats .ac-conversation-pane{
    display:none;
  }

  #view-alertas-chats .ac-mobile-chat-card .ac-conversation-pane{
    display:flex;
    height:min(78vh, 720px);
    overflow:hidden;
  }

  #view-alertas-chats .ac-conversations-pane{
    border-right:0;
    min-height:520px;
  }
}

/* Final topbar refinement: horizontal labels, tighter metrics, larger chat workspace */
#view-alertas-chats .ac-shell,
#view-alertas-chats .ac-shell.ac-shell-chat-full{
  height:calc(100dvh - 72px);
  max-height:calc(100dvh - 72px);
  min-height:0;
  grid-template-rows:auto auto minmax(0, 1fr);
  gap:8px;
  overflow:hidden;
}

#view-alertas-chats .ac-topbar-compact{
  width:100%;
  margin:0;
  padding:0;
}

#view-alertas-chats .ac-top-controls{
  display:flex;
  align-items:center;
  justify-content:flex-start;
  gap:0;
  flex-wrap:wrap;
  margin:0;
  padding:0;
}

#view-alertas-chats .ac-top-controls > *{
  position:relative;
  margin-right:16px;
  padding-right:16px;
}

#view-alertas-chats .ac-top-controls > *:not(:last-child)::after{
  content:"";
  position:absolute;
  right:0;
  top:8px;
  bottom:8px;
  width:1px;
  background:rgba(255,255,255,.18);
}

#view-alertas-chats .ac-top-controls > *:last-child{
  margin-right:0;
  padding-right:0;
}

#view-alertas-chats .ac-action-control,
#view-alertas-chats .ac-action-control-button{
  display:inline-flex;
  align-items:center;
  gap:0;
}

#view-alertas-chats .ac-action-control span,
#view-alertas-chats .ac-action-control-button span{
  display:none !important;
}

#view-alertas-chats .ac-filter{
  display:inline-flex;
  align-items:center;
  gap:10px;
  min-width:auto;
}

#view-alertas-chats .ac-filter span{
  height:auto;
  line-height:1;
  font-size:11px;
  font-weight:850;
  letter-spacing:.08em;
  text-transform:uppercase;
  color:rgba(255,255,255,.54);
  white-space:nowrap;
}

#view-alertas-chats #ac-blocked-open,
#view-alertas-chats .ac-filter select{
  height:40px;
  min-height:40px;
  box-sizing:border-box;
  border-radius:14px;
}

#view-alertas-chats #ac-blocked-open{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:0 18px;
  font-size:14px;
  font-weight:800;
  line-height:1;
  white-space:nowrap;
}

#view-alertas-chats .ac-filter select{
  min-width:260px;
  border:1px solid rgba(255,255,255,.10);
  background:rgba(5,6,8,.72);
  color:rgba(255,255,255,.92);
  padding:0 14px;
  font-size:14px;
  font-weight:750;
}

#view-alertas-chats .ac-summary-strip,
#view-alertas-chats .ac-summary-pills,
#view-alertas-chats .ac-summary-grid{
  width:100%;
  display:flex;
  align-items:center;
  gap:0;
  flex-wrap:wrap;
  padding:2px 0 6px;
  margin:0;
  border-bottom:1px solid rgba(255,255,255,.07);
}

#view-alertas-chats .ac-summary-stat,
#view-alertas-chats .ac-summary-pill,
#view-alertas-chats .ac-summary-card{
  min-height:26px;
  display:inline-flex;
  align-items:baseline;
  gap:7px;
  padding:0 14px;
  border:0 !important;
  border-radius:0 !important;
  background:transparent !important;
  box-shadow:none !important;
  color:rgba(255,255,255,.86);
  position:relative;
}

#view-alertas-chats .ac-summary-stat:first-child,
#view-alertas-chats .ac-summary-pill:first-child,
#view-alertas-chats .ac-summary-card:first-child{
  padding-left:0;
}

#view-alertas-chats .ac-summary-stat:not(:last-child)::after,
#view-alertas-chats .ac-summary-pill:not(:last-child)::after,
#view-alertas-chats .ac-summary-card:not(:last-child)::after{
  content:"";
  position:absolute;
  right:0;
  top:5px;
  bottom:5px;
  width:1px;
  background:rgba(255,255,255,.14);
}

#view-alertas-chats .ac-summary-stat span,
#view-alertas-chats .ac-summary-stat small,
#view-alertas-chats .ac-summary-pill small,
#view-alertas-chats .ac-summary-card small{
  font-size:12px;
  line-height:1;
  font-weight:800;
  color:rgba(255,255,255,.52);
  white-space:nowrap;
}

#view-alertas-chats .ac-summary-stat strong,
#view-alertas-chats .ac-summary-pill strong,
#view-alertas-chats .ac-summary-card strong,
#view-alertas-chats .ac-summary-card.accent strong{
  font-size:15px;
  line-height:1;
  font-weight:950;
  color:rgba(255,255,255,.96);
  white-space:nowrap;
}

#view-alertas-chats .ac-whatsapp-layout{
  margin-top:0;
  min-height:0;
  height:100%;
  display:grid;
  grid-template-columns:minmax(300px, 405px) minmax(0, 1fr);
  overflow:hidden;
  border:1px solid rgba(255,255,255,.08);
  border-radius:18px;
  background:rgba(0,0,0,.18);
}

#view-alertas-chats .ac-pane-tabs{
  padding:7px 12px 5px;
}

#view-alertas-chats .ac-pane-tabs::after{
  top:6px;
  width:184px;
  height:34px;
}

#view-alertas-chats .ac-main-tab{
  height:30px;
  min-width:82px;
  padding:0 12px;
  font-size:13px;
}

#view-alertas-chats .ac-channel-tabs,
#view-alertas-chats .chat-filters{
  padding:2px 12px 7px;
}

#view-alertas-chats .chat-filter-btn{
  height:24px;
  padding:0 11px;
  font-size:12px;
}

#view-alertas-chats .ac-search-box{
  margin:0 12px 8px;
  height:36px;
  min-height:36px;
  border-radius:13px;
  padding:0 12px;
}

#view-alertas-chats .ac-search-box span{
  font-size:12px;
}

#view-alertas-chats .ac-search-box input{
  font-size:13px;
}

#view-alertas-chats .chat-item{
  width:100%;
  display:grid;
  gap:3px;
  padding:8px 10px;
  min-height:66px;
  border:0 !important;
  border-radius:0 !important;
  border-bottom:1px solid rgba(255,255,255,.055) !important;
  background:transparent !important;
  color:inherit;
  text-align:left;
  cursor:pointer;
  box-shadow:none !important;
}

#view-alertas-chats .chat-item:hover{
  background:rgba(255,255,255,.035) !important;
}

#view-alertas-chats .chat-item.active{
  background:rgba(255,255,255,.060) !important;
}

#view-alertas-chats .chat-item.has-alert{
  background:rgba(239,68,68,.050) !important;
  box-shadow:inset 3px 0 0 rgba(239,68,68,.82) !important;
}

#view-alertas-chats .chat-item-top{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:8px;
  min-height:20px;
}

#view-alertas-chats .chat-item-sub{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:8px;
  min-height:17px;
}

#view-alertas-chats .chat-item-title{
  color:rgba(255,255,255,.92);
  font-size:13px;
  line-height:1.1;
  font-weight:850;
  min-width:0;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}

#view-alertas-chats .chat-item-msg{
  min-width:0;
  flex:1 1 auto;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  color:rgba(255,255,255,.58);
  font-size:12px;
  line-height:1.15;
}

#view-alertas-chats .chat-item-time{
  flex:0 0 auto;
  color:rgba(255,255,255,.42);
  font-size:11px;
  line-height:1.15;
}

#view-alertas-chats .ac-chat-item-meta{
  color:rgba(255,255,255,.42);
  font-size:11px;
  line-height:1.15;
  margin-top:1px;
}

#view-alertas-chats .chat-item .badge,
#view-alertas-chats .chat-channel-badge,
#view-alertas-chats .ac-mini-status{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  height:20px;
  min-height:20px;
  padding:0 7px;
  border-radius:999px;
  font-size:10px;
  line-height:1;
  font-weight:900;
}

#view-alertas-chats .ac-conversations-pane{
  min-width:0;
  min-height:0;
  height:100%;
  display:flex;
  flex-direction:column;
  overflow:hidden;
}

#view-alertas-chats #ac-chat-list{
  flex:1 1 auto;
  min-height:0;
  overflow-y:auto;
  overflow-x:hidden;
  padding:0 8px 8px;
}

#view-alertas-chats .ac-conversation-pane{
  min-width:0;
  min-height:0;
  height:100%;
  display:flex;
  flex-direction:column;
  overflow:hidden;
}

#view-alertas-chats .ac-conversation-head{
  flex:0 0 auto;
}

#view-alertas-chats #ac-chat-messages{
  flex:1 1 auto;
  min-height:0;
  max-height:none !important;
  overflow-y:auto;
  overflow-x:hidden;
}

@media (max-width: 980px){
  #view-alertas-chats{
    overflow:auto;
  }

  #view-alertas-chats .panel,
  #view-alertas-chats .screen-plain,
  #view-alertas-chats #alertas-chats-root{
    height:auto;
    overflow:visible;
  }

  #view-alertas-chats .ac-shell,
  #view-alertas-chats .ac-shell.ac-shell-chat-full{
    height:auto;
    max-height:none;
    min-height:0;
    overflow:visible;
    display:grid;
  }

  #view-alertas-chats .ac-top-controls{
    align-items:stretch;
    gap:10px;
  }

  #view-alertas-chats .ac-top-controls > *{
    width:100%;
    margin-right:0;
    padding-right:0;
  }

  #view-alertas-chats .ac-top-controls > *::after{
    display:none;
  }

  #view-alertas-chats .ac-filter{
    width:100%;
    display:grid;
    gap:6px;
  }

  #view-alertas-chats .ac-filter span{
    white-space:normal;
  }

  #view-alertas-chats .ac-filter select,
  #view-alertas-chats #ac-blocked-open{
    width:100%;
    min-width:0;
  }

  #view-alertas-chats .ac-whatsapp-layout{
    grid-template-columns:1fr;
    height:auto;
    min-height:0;
    overflow:visible;
  }

  #view-alertas-chats .ac-conversation-pane{
    display:none;
  }

  #view-alertas-chats .ac-mobile-chat-card .ac-conversation-pane{
    display:flex;
    height:min(78vh, 720px);
    overflow:hidden;
  }

  #view-alertas-chats .ac-conversations-pane{
    border-right:0;
    min-height:520px;
  }
}

.chat-bubble-media-grid{
  display:grid;
  gap:6px;
  margin-top:2px;
}

.chat-bubble-media-grid.multi{
  grid-template-columns:repeat(2, minmax(0, 1fr));
}

.chat-media-thumb{
  width:min(260px, 100%);
  max-width:100%;
  border:0;
  padding:0;
  border-radius:14px;
  overflow:hidden;
  background:rgba(255,255,255,.08);
  cursor:zoom-in;
  display:block;
  box-shadow:0 10px 24px rgba(0,0,0,.18);
}

.chat-bubble.user .chat-media-thumb{
  margin-left:auto;
}

.chat-media-thumb img{
  display:block;
  width:100%;
  max-height:260px;
  object-fit:cover;
}

.chat-bubble-files{
  display:grid;
  gap:6px;
}

.chat-file-chip{
  display:inline-flex;
  align-items:center;
  gap:6px;
  width:max-content;
  max-width:100%;
  padding:8px 10px;
  border-radius:999px;
  border:1px solid rgba(255,255,255,.12);
  background:rgba(255,255,255,.07);
  color:rgba(255,255,255,.90);
  text-decoration:none;
  font-size:13px;
  font-weight:800;
}

.ac-media-viewer{
  position:fixed;
  inset:0;
  z-index:50000;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:24px;
}

.ac-media-viewer.hidden{
  display:none !important;
}

.ac-media-viewer-backdrop{
  position:absolute;
  inset:0;
  background:rgba(0,0,0,.82);
  backdrop-filter:blur(8px);
  -webkit-backdrop-filter:blur(8px);
}

.ac-media-viewer-card{
  position:relative;
  z-index:1;
  width:min(980px, calc(100vw - 32px));
  max-height:calc(100vh - 32px);
  display:grid;
  gap:10px;
  justify-items:center;
}

.ac-media-viewer-img{
  max-width:100%;
  max-height:calc(100vh - 96px);
  object-fit:contain;
  border-radius:18px;
  box-shadow:0 24px 80px rgba(0,0,0,.48);
}

.ac-media-viewer-close{
  position:absolute;
  top:-12px;
  right:-12px;
  width:42px;
  height:42px;
  border-radius:999px;
  border:1px solid rgba(255,255,255,.16);
  background:rgba(10,10,12,.92);
  color:#fff;
  font-size:24px;
  line-height:1;
  cursor:pointer;
  z-index:2;
}

.ac-media-viewer-caption{
  color:rgba(255,255,255,.72);
  font-size:13px;
  font-weight:700;
  text-align:center;
}
