.vp-chat-fab {
  position: fixed;
  right: 1.1rem;
  bottom: 1.1rem;
  z-index: 1200;
  width: 58px;
  height: 58px;
  border: 0;
  border-radius: 50%;
  background: #0d3b32;
  color: #fff;
  box-shadow: 0 10px 28px rgba(8, 42, 36, 0.28);
  cursor: pointer;
  display: grid;
  place-items: center;
}

.vp-chat-fab svg {
  width: 28px;
  height: 28px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
}

.vp-chat-fab__badge {
  position: absolute;
  top: -2px;
  right: -2px;
  min-width: 1.2rem;
  height: 1.2rem;
  padding: 0 0.3rem;
  border-radius: 999px;
  background: #c5a04d;
  color: #082a24;
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1.2rem;
}

.vp-chat-dock {
  position: fixed;
  right: 1.1rem;
  bottom: 5.2rem;
  z-index: 1200;
  width: min(380px, calc(100vw - 1.5rem));
  height: min(540px, calc(100vh - 7rem));
  filter: drop-shadow(0 18px 40px rgba(8, 42, 36, 0.22));
}

.vp-chat {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
  background: #f7faf8;
  border: 1px solid #d8ebe3;
  border-radius: 16px;
  overflow: hidden;
}

.vp-chat__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.8rem 0.9rem;
  background: #0d3b32;
  color: #fff;
}

.vp-chat__who {
  min-width: 0;
}

.vp-chat__title,
.vp-chat__sub {
  display: block;
}

.vp-chat__title {
  font-size: 1rem;
}

.vp-chat__sub {
  color: #dfc98a;
  font-size: 0.78rem;
}

.vp-chat__tools {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.vp-chat__tool,
.vp-chat__close,
.vp-bubble footer button {
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
  font: inherit;
}

.vp-chat__tool {
  color: #dfc98a;
  font-size: 0.75rem;
  font-weight: 700;
}

.vp-chat__close {
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  font-size: 1.4rem;
  line-height: 1;
}

.vp-chat__list {
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding: 0.9rem 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  background:
    linear-gradient(180deg, rgba(216, 235, 227, 0.35), rgba(247, 250, 248, 0.2));
}

.vp-chat__empty,
.vp-chat__login {
  color: #6b7c76;
  text-align: center;
  margin: auto;
  padding: 1rem;
}

.vp-chat__login a,
.vp-chat__form button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 999px;
  background: #c5a04d;
  color: #082a24;
  font: inherit;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}

.vp-chat__login a {
  margin-top: 0.7rem;
  padding: 0.55rem 1rem;
}

.vp-bubble {
  max-width: 86%;
  align-self: flex-start;
  padding: 0.55rem 0.7rem 0.4rem;
  border-radius: 14px 14px 14px 4px;
  background: #fff;
  color: #1a1a1a;
  box-shadow: 0 1px 0 rgba(8, 42, 36, 0.06);
}

.vp-bubble--mine {
  align-self: flex-end;
  border-radius: 14px 14px 4px 14px;
  background: #d8ebe3;
}

.vp-bubble--store.vp-bubble--mine {
  background: #0d3b32;
  color: #fff;
}

.vp-bubble--driver.vp-bubble--mine {
  background: #c5a04d;
  color: #082a24;
}

.vp-bubble header {
  display: flex;
  gap: 0.4rem;
  align-items: baseline;
  margin-bottom: 0.15rem;
}

.vp-bubble header strong {
  font-size: 0.78rem;
}

.vp-bubble header span,
.vp-bubble time {
  font-size: 0.68rem;
  opacity: 0.72;
}

.vp-bubble p {
  margin: 0;
  white-space: pre-wrap;
  word-break: break-word;
  font-size: 0.92rem;
  line-height: 1.4;
}

.vp-bubble footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.2rem;
}

.vp-bubble footer button {
  font-size: 0.68rem;
  font-weight: 700;
  opacity: 0.8;
}

.vp-chat__error {
  margin: 0;
  padding: 0.35rem 0.8rem 0;
  color: #b42318;
  font-size: 0.8rem;
}

.vp-chat__form {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.45rem;
  padding: 0.7rem;
  background: #fff;
  border-top: 1px solid #d8ebe3;
}

.vp-chat__form textarea {
  resize: none;
  border: 1px solid #d8ebe3;
  border-radius: 12px;
  padding: 0.55rem 0.7rem;
  font: inherit;
  min-height: 2.7rem;
}

.vp-chat__form button {
  padding: 0 0.95rem;
}

.chat-admin {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  height: calc(100vh - 150px);
  min-height: 460px;
  border: 1px solid #d8ebe3;
  border-radius: 16px;
  overflow: hidden;
  background: #fff;
}

.chat-admin__list {
  overflow: auto;
  border-right: 1px solid #d8ebe3;
  background: #f7faf8;
}

.chat-admin__item {
  display: block;
  width: 100%;
  text-align: left;
  border: 0;
  border-bottom: 1px solid #eef2f0;
  background: transparent;
  padding: 0.8rem 0.9rem;
  cursor: pointer;
  font: inherit;
}

.chat-admin__item.is-active {
  background: #fff;
  box-shadow: inset 3px 0 0 #c5a04d;
}

.chat-admin__item strong,
.chat-admin__item span {
  display: block;
}

.chat-admin__item span {
  color: #6b7c76;
  font-size: 0.78rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.chat-admin__item em {
  font-style: normal;
  font-size: 0.72rem;
  font-weight: 700;
  color: #082a24;
  background: #c5a04d;
  border-radius: 999px;
  padding: 0.05rem 0.4rem;
}

.chat-admin__pane {
  min-width: 0;
  min-height: 0;
  display: flex;
}

.chat-admin__pane .vp-chat {
  width: 100%;
  border: 0;
  border-radius: 0;
}

.chat-admin__empty {
  margin: auto;
  color: #6b7c76;
  padding: 1.5rem;
}

.chat-nav-badge {
  display: inline-block;
  margin-left: 0.35rem;
  min-width: 1.1rem;
  padding: 0 0.3rem;
  border-radius: 999px;
  background: #c5a04d;
  color: #082a24;
  font-size: 0.72rem;
  line-height: 1.15rem;
}

.entrega-chat-badge {
  display: inline-block;
  margin-left: 0.35rem;
  min-width: 1.1rem;
  padding: 0 0.35rem;
  border-radius: 999px;
  background: #0d3b32;
  color: #fff;
  font-size: 0.75rem;
}

.entrega-btn--outline .entrega-chat-badge {
  background: #c5a04d;
  color: #082a24;
}

@media (max-width: 760px) {
  .chat-admin {
    grid-template-columns: 1fr;
    height: auto;
  }

  .chat-admin__list {
    max-height: 220px;
    border-right: 0;
    border-bottom: 1px solid #d8ebe3;
  }

  .chat-admin__pane {
    height: 68vh;
  }

  .vp-chat-dock {
    right: 0.6rem;
    left: 0.6rem;
    width: auto;
    bottom: 4.8rem;
  }
}
