/* FAB + panel flotante */
.adc-fab{
  position:fixed; right:18px; bottom:18px; z-index:9999;
  width:56px; height:56px; border-radius:50%;
  background:#111; color:#fff; display:flex; align-items:center; justify-content:center;
  font-size:22px; cursor:pointer; box-shadow:0 6px 16px rgba(0,0,0,.2);
}
.adc-fab:hover{transform:translateY(-1px)}
.adc-disabled{opacity:.5; cursor:not-allowed}

.adc-panel{
  position:fixed; right:18px; bottom:86px; width:320px; max-width:90vw;
  background:#fff; border:1px solid #eee; border-radius:12px;
  box-shadow:0 10px 30px rgba(0,0,0,.15); overflow:hidden; display:none; z-index:9999;
}
.adc-head{display:flex; justify-content:space-between; align-items:center; padding:.6rem .8rem; border-bottom:1px solid #eee; background:#fafafa}
.adc-close{background:transparent;border:0;font-size:20px;cursor:pointer}
.adc-body{max-height:50vh; overflow:auto; padding:.6rem}
.adc-empty{color:#777; font-size:.9rem; text-align:center; padding:1rem 0}
.adc-msg{margin:.35rem 0;}
.adc-msg.me{justify-content:flex-end}
.adc-bubble{max-width:78%; padding:.45rem .6rem; border-radius:10px}
.adc-msg.me .adc-bubble{background:#111; color:#fff; border-top-right-radius:4px}
.adc-msg.other .adc-bubble{background:#f2f2f2; color:#111; border-top-left-radius:4px}

.adc-send{display:flex; gap:.4rem; padding:.6rem; border-top:1px solid #eee; background:#fff}
.adc-send input{flex:1; border:1px solid #ddd; border-radius:8px; padding:.55rem}
.adc-send button{border:0; background:#111; color:#fff; border-radius:8px; padding:.55rem .8rem; cursor:pointer}

/* Inbox */
.adc-inbox{display:grid; grid-template-columns:260px 1fr; gap:16px}
.adc-inbox-list{border:1px solid #eee; border-radius:12px; overflow:hidden}
.adc-inbox-list h3{margin:0; padding:.6rem .8rem; border-bottom:1px solid #eee; background:#fafafa}
#adcConvList{max-height:70vh; overflow:auto}
.adc-conv{padding:.55rem .7rem; border-bottom:1px solid #f2f2f2; cursor:pointer}
.adc-conv:hover{background:#fafafa}
.adc-conv .name{font-weight:600}
.adc-conv .last{font-size:.88rem; color:#666}
.adc-conv .unread{background:#111; color:#fff; font-size:.75rem; padding:.1rem .4rem; border-radius:12px; margin-left:.4rem}

.adc-inbox-chat{border:1px solid #eee; border-radius:12px; overflow:hidden}
.adc-inbox-chat .adc-body{max-height:70vh; overflow:auto}


/* tabs */
.adc-tabs{display:flex; gap:8px; margin-bottom:8px; display: none}
.adc-tab{padding:6px 10px; border:1px solid #ddd; background:#f7f7f7; border-radius:8px; cursor:pointer}
.adc-tab-active{background:#1e90ff; color:#fff; border-color:#1e90ff}

/* lista convs */
.adc-conv-list{border:1px solid #eee; border-radius:10px; padding:8px; background:#fff}
.adc-conv-item{padding:8px; border-bottom:1px solid #f3f3f3; position:relative; cursor:pointer}
.adc-conv-item:last-child{border-bottom:none}
.adc-conv-item.active{background:#f0f7ff}
.adc-conv-top{justify-content:space-between; gap:8px}
.adc-conv-name{font-weight:600}
.adc-conv-last{color:#555; font-size:.9rem; margin-top:2px}
.adc-badge{position:absolute; right:8px; top:8px; background:#ff4d4f; color:#fff; border-radius:999px; padding:2px 8px; font-size:.75rem}

/* mensajes */
.adc-msg{max-width:70%; margin:6px 0; padding:8px 12px; border-radius:12px; background:#fff}
.adc-me{margin-left:auto; background:#dcf8c6}
.adc-them{margin-right:auto; background:#fff}
.adc-msg-time{font-size:.78rem; color:#777; margin-top:3px}
.adc-empty{padding:10px; color:#666}
.adc-body{height:60vh; overflow:auto}


  /* botón flotante */
  .adc-fab{
    position:fixed; right:20px; bottom:20px; width:56px; height:56px;
    border-radius:50%; background:#1e90ff; color:#fff; display:flex;
    align-items:center; justify-content:center; font-size:22px; cursor:pointer;
    z-index:99998; box-shadow:0 6px 18px rgba(0,0,0,.16);
  }
  .adc-fab.adc-disabled{ background:#ccc; cursor:not-allowed; }

  /* panel */
  #adcPanel{
    position:fixed; right:20px; bottom:84px; width:340px; max-height:70vh;
    background:#fff; border:1px solid #e7e7e7; border-radius:12px; display:none;
    flex-direction:column; overflow:hidden; z-index:99999;
    box-shadow:0 14px 30px rgba(0,0,0,.18);
  }
  /* fuerza mostrar aunque otro CSS lo oculte */
  #adcPanel.adc-open{ display:flex !important; }

  .adc-head{display:flex;justify-content:space-between;align-items:center;padding:10px 12px;border-bottom:1px solid #eee;background:#f9fafb}
  .adc-body{padding:10px; overflow:auto; min-height:160px; max-height:48vh}
  .adc-send{display:flex; gap:8px; padding:10px; border-top:1px solid #eee; background:#fff}
  #adcInput{flex:1; border:1px solid #ddd; border-radius:8px; padding:.55rem}
  #adcSendBtn{border:1px solid #1e90ff; background:#1e90ff; color:#fff; border-radius:8px; padding:.55rem .9rem; cursor:pointer}

  .open {display: block !important}