:root {
  --vs: #dc2626;
  --vsd: #b91c1c;
}

.bg-vs {
  background-color: var(--vs);
}

.bg-vs-dark {
  background-color: var(--vsd);
}

.text-vs {
  color: var(--vs);
}

.card {
  background: #0f172a;
  border: 1px solid #334155;
}

.soft {
  background: #111827;
  border: 1px solid #374151;
}

.pill {
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
}

.row:hover {
  background-color: rgba(55, 65, 81, 0.35);
}

dialog::backdrop {
  background: rgba(0, 0, 0, 0.55);
}
.soft {
  background: #111827;
  border: 1px solid #374151;
}

/* 🔥 A partir de acá, lo nuevo */
input.soft,
select.soft,
textarea.soft {
  color: #e5e7eb;           /* texto blanco/gris claro */
}

input.soft::placeholder,
textarea.soft::placeholder {
  color: #9ca3af;           /* placeholder gris clarito */
}

/* ================== SIDEBAR BOT COMISIONES ================== */

.bot-sidebar {
  position: fixed;
  top: 0;
  right: -500px;
  width: 500px;
  height: 100vh;
  background: #020617;
  border-left: 1px solid #1f2937;
  z-index: 100;
  transition: right 0.3s ease;
  display: flex;
  flex-direction: column;
  box-shadow: -6px 0 18px rgba(0, 0, 0, 0.7);
}

.bot-sidebar.open {
  right: 0;
}

.bot-sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: #0f172a;
  border-bottom: 1px solid #1f2937;
}

.bot-sidebar-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  font-size: 1rem;
}

.bot-sidebar-title .dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: #22c55e;
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.15);
}

.bot-sidebar-close {
  background: transparent;
  border: none;
  color: #9ca3af;
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.bot-sidebar-close:hover {
  background: rgba(255, 255, 255, 0.07);
  color: #fff;
}

.bot-sidebar-body {
  flex: 1;
  overflow: auto;
  padding: 16px;
}

.bot-sidebar-chat {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 100%;
}

.bot-sidebar-message {
  display: flex;
  gap: 8px;
}

.bot-sidebar-message.user {
  flex-direction: row-reverse;
}

.bot-sidebar-avatar {
  width: 32px;
  height: 32px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #0b1220;
  border: 1px solid #1f2937;
  font-size: 1rem;
  flex-shrink: 0;
}

.bot-sidebar-bubble {
  max-width: 80%;
  padding: 9px 13px;
  border-radius: 14px;
  background: #020617;
  border: 1px solid #1f2937;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.35);
}

.bot-sidebar-message.user .bot-sidebar-bubble {
  background: #1e3a8a;
  border-color: #3b82f6;
}

.bot-sidebar-message-time {
  font-size: 0.75rem;
  color: #6b7280;
  margin-top: 4px;
}

.bot-sidebar-typing {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #6b7280;
  font-size: 0.85rem;
  margin-top: 8px;
}

.bot-sidebar-typing-dots {
  display: inline-flex;
  gap: 4px;
}

.bot-sidebar-typing-dots span {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: #6b7280;
  display: inline-block;
  opacity: 0.7;
  animation: blink 1.2s infinite;
}

.bot-sidebar-typing-dots span:nth-child(2) {
  animation-delay: 0.2s;
}

.bot-sidebar-typing-dots span:nth-child(3) {
  animation-delay: 0.4s;
}

@keyframes blink {
  0%,
  80%,
  100% {
    opacity: 0.2;
  }
  40% {
    opacity: 1;
  }
}

.bot-sidebar-composer {
  padding: 16px;
  border-top: 1px solid #1f2937;
  background: #020617;
}

.bot-sidebar-form {
  display: flex;
  gap: 8px;
}

.bot-sidebar-input {
  flex: 1;
  min-height: 40px;
  max-height: 120px;
  resize: none;
  padding: 8px 12px;
  font-size: 0.95rem;
  border-radius: 8px;
  border: 1px solid #1f2937;
  background: #020617;
  color: #e5e7eb;
  outline: none;
}

.bot-sidebar-send {
  padding: 8px 16px;
  border-radius: 8px;
  border: 1px solid #20416e;
  background: #1e3a8a;
  color: #fff;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.bot-sidebar-send:hover:not(:disabled) {
  background: #1e40af;
}

.bot-sidebar-send:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.bot-sidebar-resizer {
  position: absolute;
  left: -4px;
  top: 0;
  width: 8px;
  height: 100%;
  cursor: col-resize;
  z-index: 101;
}

.bot-sidebar-resizer:hover,
.bot-sidebar-resizer.dragging {
  background: rgba(59, 130, 246, 0.3);
}

/* Botón para abrir la sidebar */
.bot-sidebar-launcher {
  position: fixed;
  top: 50%;
  right: 0;
  transform: translateY(-50%);
  background: #1e3a8a;
  color: white;
  border: none;
  border-radius: 8px 0 0 8px;
  padding: 12px 8px;
  cursor: pointer;
  z-index: 99;
  box-shadow: -2px 0 8px rgba(0, 0, 0, 0.3);
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
  font-size: 0.9rem;
}

.bot-sidebar-launcher:hover {
  background: #1e40af;
  padding-right: 12px;
}

.bot-sidebar-launcher-icon {
  font-size: 1.2rem;
}

/* Overlay para cuando está abierta */
.bot-sidebar-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.35);
  z-index: 90;
  display: none;
}

.bot-sidebar-overlay.open {
  display: block;
}

/* Responsive sidebar bot */

@media (max-width: 768px) {
  .bot-sidebar {
    width: 100%;
    right: -100%;
  }

  .bot-sidebar.open {
    right: 0;
  }

  .bot-sidebar-resizer {
    display: none;
  }
}
