/* ============================================================
   HYDRASTORE — CHAT & REPORTS CSS v2.0 (FIXED)
   ============================================================ */

.chat-panel{
  position:fixed;bottom:20px;right:20px;z-index:9997;
  width:380px;max-width:calc(100vw - 24px);
  max-height:70vh;
  background:linear-gradient(135deg,#0f1424,#000);
  border:1px solid rgba(139,92,246,.4);
  border-radius:20px;
  display:flex;flex-direction:column;
  box-shadow:0 30px 80px rgba(0,0,0,.9),0 0 60px rgba(139,92,246,.3);
  transform:translateY(120%) scale(.9);
  opacity:0;pointer-events:none;
  transition:all .35s cubic-bezier(.34,1.56,.64,1);
  overflow:hidden;
}
.chat-panel.on{transform:translateY(0) scale(1);opacity:1;pointer-events:auto}
.chat-head{
  padding:14px 16px;
  background:linear-gradient(135deg,rgba(139,92,246,.25),rgba(6,182,212,.15));
  border-bottom:1px solid rgba(139,92,246,.3);
  display:flex;align-items:center;gap:10px;
}
.chat-head-icon{
  width:40px;height:40px;border-radius:12px;
  background:linear-gradient(135deg,#8b5cf6,#06b6d4);
  color:#fff;display:flex;align-items:center;justify-content:center;
  font-size:18px;flex-shrink:0;
}
.chat-status{
  font-size:10px;color:#94a3b8;margin-top:2px;
  display:flex;align-items:center;gap:5px;
}
.chat-dot{width:7px;height:7px;border-radius:50%;background:#64748b}
.chat-dot.on{background:#10b981;box-shadow:0 0 8px #10b981;animation:pulse 1.5s infinite}
.chat-close{
  width:32px;height:32px;border-radius:10px;
  background:rgba(239,68,68,.15);
  border:1px solid rgba(239,68,68,.3);
  color:#fb7185;font-size:14px;cursor:pointer;
  display:flex;align-items:center;justify-content:center;
  transition:.2s;
}
.chat-close:hover{background:rgba(239,68,68,.3)}

.chat-body{
  flex:1;overflow-y:auto;padding:14px;
  display:flex;flex-direction:column;gap:10px;
  min-height:200px;max-height:340px;
  background:radial-gradient(ellipse at top,rgba(139,92,246,.05),transparent 70%);
}
.chat-empty{text-align:center;padding:40px 20px;color:#cbd5e1}

.chat-day{
  text-align:center;font-size:10px;color:#64748b;
  font-weight:800;letter-spacing:1px;
  padding:6px 0;text-transform:uppercase;
}

.chat-msg{display:flex;flex-direction:column;max-width:80%}
.chat-msg.me{align-self:flex-end;align-items:flex-end}
.chat-msg.them{align-self:flex-start;align-items:flex-start}
.chat-bubble-msg{
  padding:10px 14px;border-radius:14px;
  font-size:13px;line-height:1.5;
  word-wrap:break-word;word-break:break-word;
}
.chat-msg.me .chat-bubble-msg{
  background:linear-gradient(135deg,#8b5cf6,#6366f1);
  color:#fff;border-bottom-right-radius:4px;
}
.chat-msg.them .chat-bubble-msg{
  background:rgba(30,41,59,.9);
  color:#e2e8f0;border:1px solid rgba(139,92,246,.2);
  border-bottom-left-radius:4px;
}
.chat-time{font-size:9px;color:#64748b;margin-top:3px;font-weight:700}

.chat-quick{
  padding:8px 14px;display:flex;gap:6px;flex-wrap:wrap;
  border-top:1px solid rgba(139,92,246,.15);
  background:rgba(0,0,0,.3);
}
.chat-quick button{
  padding:5px 10px;border-radius:8px;font-size:10px;
  font-weight:800;cursor:pointer;font-family:inherit;
  border:1px solid rgba(139,92,246,.3);
  background:rgba(139,92,246,.1);color:#c084fc;
  transition:.2s;
}
.chat-quick button:hover{background:rgba(139,92,246,.25);transform:translateY(-1px)}

.chat-input-wrap{
  padding:10px 12px;border-top:1px solid rgba(139,92,246,.2);
  display:flex;gap:8px;align-items:flex-end;
  background:rgba(0,0,0,.3);
}
.chat-input{
  flex:1;background:rgba(8,11,20,.9);
  border:1px solid rgba(139,92,246,.2);
  border-radius:12px;padding:10px 14px;
  color:#fff;font-size:14px;font-family:inherit;
  resize:none;outline:none;
  max-height:100px;overflow-y:auto;line-height:1.4;
}
.chat-input:focus{border-color:#8b5cf6;box-shadow:0 0 0 3px rgba(139,92,246,.15)}
.chat-send{
  width:40px;height:40px;border-radius:12px;
  background:linear-gradient(135deg,#8b5cf6,#06b6d4);
  border:none;color:#fff;font-size:15px;
  cursor:pointer;flex-shrink:0;
  display:flex;align-items:center;justify-content:center;
  transition:.2s;
}
.chat-send:hover{transform:scale(1.08) rotate(-5deg)}

.chat-unread{
  position:absolute;top:-6px;right:-6px;
  min-width:20px;height:20px;padding:0 6px;
  border-radius:10px;
  background:linear-gradient(135deg,#ef4444,#dc2626);
  color:#fff;font-size:11px;font-weight:900;
  display:flex;align-items:center;justify-content:center;
  border:2px solid #05070f;
  box-shadow:0 4px 12px rgba(239,68,68,.7);
}

.admin-chat-list{
  background:#111827;
  border:1px solid rgba(255,255,255,.08);
  border-radius:16px;overflow:hidden;
}
.admin-chat-item{
  padding:12px 14px;
  display:flex;gap:10px;align-items:center;
  border-bottom:1px solid rgba(255,255,255,.05);
  cursor:pointer;transition:.2s;
}
.admin-chat-item:hover{background:rgba(139,92,246,.1)}
.admin-chat-avatar{
  width:40px;height:40px;border-radius:12px;
  background:linear-gradient(135deg,#8b5cf6,#06b6d4);
  color:#fff;display:flex;align-items:center;justify-content:center;
  font-weight:900;font-size:16px;flex-shrink:0;
}
.chat-badge{
  min-width:20px;height:20px;padding:0 6px;
  border-radius:10px;
  background:linear-gradient(135deg,#ef4444,#dc2626);
  color:#fff;font-size:10px;font-weight:900;
  display:flex;align-items:center;justify-content:center;
  border:1.5px solid #0a0d18;
}

.admin-chat-panel{
  position:fixed;top:0;right:0;bottom:0;z-index:9998;
  width:420px;max-width:100vw;
  background:linear-gradient(135deg,#0f1424,#000);
  border-left:1px solid rgba(139,92,246,.4);
  display:flex;
  flex-direction:column;
  transform:translateX(100%);
  transition:transform .35s cubic-bezier(.34,1.56,.64,1);
  box-shadow:-20px 0 60px rgba(0,0,0,.7);
}
.admin-chat-panel.on{transform:translateX(0)}
.admin-chat-panel .chat-head{
  background:linear-gradient(135deg,rgba(239,68,68,.25),rgba(245,158,11,.15));
}
.admin-chat-panel .chat-body{max-height:none;flex:1}

@media(max-width:768px){
  .chat-panel{
    bottom:0;right:0;left:0;top:0;
    width:100%;max-width:100%;max-height:100vh;
    border-radius:0;border:none;
    transform:translateY(100%);
  }
  .chat-panel.on{transform:translateY(0)}
  .admin-chat-panel{width:100%}
}