/* ========================================================================
   BEEBOT - CONSOLA WEB REAL (basada en WEBTEST REV 00009, 15/11/2026)
   Archivo independiente; los estilos solo afectan .beebot-console.
   MODIFICAR AQUÍ: tamaño del chat, colores y mensajes.
   No altera las demás páginas ni los servicios interactivos.
   ======================================================================== */
.beebot-console {
  --navy: #071f39;
  --deep: #00152c;
  --blue: #09375a;
  --gold: #efb634;
  --paper: #f4f7fb;
  --ink: #1d3043;
  --muted: #677789;
  --border: #dce5ef;
  --shadow: 0 15px 42px rgba(13,38,64,.09);
  min-width: 0;
  width: 100%;
  font-family: Inter,Segoe UI,Arial,sans-serif;
  line-height: 1.5;
  color: var(--ink);
}
.beebot-console button,
.beebot-console textarea {
  font: inherit;
}
.beebot-console button {
  cursor: pointer;
}
.beebot-console img {
  display: block;
  max-width: 100%;
}
.beebot-console .sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}
.beebot-console .chat-card {
  border: 1px solid var(--border);
  background: white;
  box-shadow: var(--shadow);
  border-radius: 13px;
  overflow: hidden;
}
.beebot-console .chat-card {
  display: flex;
  flex-direction: column;
  min-height: 595px;
}
.beebot-console .chat-head {
  padding: 16px 19px;
  background: #fff;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 9px;
}
.beebot-console .chat-head-title {
  display: flex;
  align-items: center;
  gap: 11px;
}
.beebot-console .chat-head-title strong {
  display: block;
  font-size: 16px;
}
.beebot-console .chat-head-title small {
  display: block;
  color: var(--muted);
  font-size: 11px;
}
.beebot-console .chat-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: #e7eef5;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.beebot-console .chat-avatar img {
  width: 41px;
  height: 41px;
  object-fit: contain;
}
.beebot-console .btn-quiet {
  border: 1px solid #cadbe9;
  background: #f7fafc;
  color: #194464;
  border-radius: 8px;
  padding: 9px 12px;
  font-size: 12px;
  font-weight: 700;
}
.beebot-console .btn-quiet:hover {
  background: #edf5fb;
}
.beebot-console .btn-quiet:disabled,
.beebot-console .btn-send:disabled {
  opacity: .58;
  cursor: not-allowed;
}
.beebot-console .messages {
  background: radial-gradient(circle at 10% 20%,rgba(214,231,241,.27),transparent 40%),#f8fafc;
  flex: 1;
  overflow-y: auto;
  padding: 23px 19px;
  min-height: 350px;
  max-height: 590px;
  display: flex;
  flex-direction: column;
  gap: 15px;
}
.beebot-console .intro-message {
  max-width: 370px;
  margin: auto;
  text-align: center;
  color: #5c7082;
}
.beebot-console .intro-icon {
  width: 48px;
  height: 48px;
  margin: 0 auto 14px;
  border: 1px solid #e0c682;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #fff9e9;
  color: #c89828;
  font-size: 22px;
}
.beebot-console .intro-message h3 {
  font: 700 22px Georgia,serif;
  margin: 0 0 9px;
  color: #113752;
}
.beebot-console .intro-message p {
  font-size: 13px;
  margin: 0 0 13px;
}
.beebot-console .intro-message small {
  font-size: 11px;
}
.beebot-console .msg {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  max-width: 88%;
}
.beebot-console .msg.user {
  align-self: flex-end;
  flex-direction: row-reverse;
}
.beebot-console .msg.system {
  align-self: center;
  max-width: 94%;
  text-align: center;
}
.beebot-console .msg-avatar {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: #e7eff7;
  flex: 0 0 46px;
  overflow: hidden;
  display: grid;
  place-items: center;
  border: 2px solid #d5e2ec;
  box-shadow: 0 4px 12px rgba(2,27,46,.10);
}
.beebot-console .msg-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}
.beebot-console .msg.beebot .msg-avatar {
  background: #061f35;
  border: 2px solid #f0b935;
  box-shadow: 0 0 0 3px rgba(240,185,53,.13),0 4px 14px rgba(2,27,46,.16);
}
.beebot-console .msg.user .msg-avatar {
  background: linear-gradient(150deg,#eaf1f6,#cbdce8);
  border: 2px solid #bed1df;
}
.beebot-console .msg-avatar svg {
  width: 31px;
  height: 31px;
  display: block;
}
.beebot-console .msg.beebot .msg-content {
  flex: 1;
  min-width: 0;
}
.beebot-console .msg.user .msg-content {
  min-width: 0;
}
.beebot-console .msg-content {
  min-width: 0;
}
.beebot-console .msg-author {
  font-size: 11px;
  font-weight: 800;
  color: #2e5673;
  display: flex;
  gap: 11px;
  align-items: center;
  margin-bottom: 5px;
}
.beebot-console .msg.user .msg-author {
  justify-content: end;
}
.beebot-console .msg-author small {
  color: #8191a0;
  font-size: 10px;
  font-weight: 500;
}
.beebot-console .msg-bubble {
  background: white;
  border: 1px solid #e0e9f0;
  border-radius: 3px 14px 14px 14px;
  padding: 12px 14px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-size: 14px;
  line-height: 1.55;
  box-shadow: 0 5px 15px rgba(0,25,44,.04);
}
.beebot-console .msg.user .msg-bubble {
  background: #082b4a;
  color: white;
  border-color: #082b4a;
  border-radius: 14px 3px 14px 14px;
}
.beebot-console .msg.system .msg-bubble {
  background: #fff3df;
  color: #745323;
  border-color: #f2ddb5;
  border-radius: 12px;
  font-size: 12px;
}
.beebot-console .msg-foot {
  margin-top: 5px;
  color: #778b9b;
  font-size: 10px;
}
.beebot-console .msg.user .msg-foot {
  text-align: right;
}
.beebot-console .typing {
  align-self: flex-start;
  color: #46647d;
  background: white;
  border: 1px solid var(--border);
  padding: 10px 13px;
  border-radius: 8px;
  font-size: 12px;
}
.beebot-console .typing .spinner {
  display: inline-block;
  width: 12px;
  height: 12px;
  border: 2px solid #d8e7ee;
  border-top-color: #e3b545;
  border-radius: 100%;
  animation: beebot-console-spin 1s linear infinite;
  vertical-align: middle;
  margin-right: 8px;
}
@keyframes beebot-console-spin {
  to {
    transform: rotate(360deg);
  }
}
.beebot-console .composer {
  background: #fff;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: end;
  gap: 11px;
  padding: 14px 15px;
}
.beebot-console .composer textarea {
  flex: 1;
  resize: vertical;
  min-height: 57px;
  max-height: 150px;
  border: 1px solid #cbd9e5;
  background: #fafcff;
  border-radius: 9px;
  padding: 12px 14px;
  outline: none;
  color: #15334b;
  font-size: 14px;
}
.beebot-console .composer textarea:focus {
  border-color: #356c95;
  box-shadow: 0 0 0 3px rgba(53,108,149,.11);
}
.beebot-console .btn-send {
  background: #f1bb3e;
  border: 0;
  color: #1c2731;
  padding: 16px 18px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 900;
  white-space: nowrap;
  min-height: 54px;
}
.beebot-console .btn-send:hover {
  background: #ffca52;
}
.beebot-console .chat-bottom {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  color: #8896a3;
  font-size: 10px;
  padding: 0 16px 13px;
  flex-wrap: wrap;
}
@media (max-width:740px) {
  .beebot-console .chat-card {
    min-height: 550px;
  }
  .beebot-console .messages {
    min-height: 350px;
    max-height: 58vh;
    padding: 14px 10px;
  }
  .beebot-console .msg {
    max-width: 95%;
  }
  .beebot-console .chat-head {
    padding: 11px;
  }
  .beebot-console .btn-quiet {
    font-size: 11px;
    padding: 8px;
  }
  .beebot-console .msg-bubble {
    font-size: 13px;
  }
  .beebot-console .composer {
    padding: 10px;
  }
  .beebot-console .composer textarea {
    min-height: 58px;
  }
  .beebot-console .btn-send {
    min-height: 50px;
    padding: 12px;
  }
  .beebot-console .chat-bottom {
    font-size: 9px;
  }
}
@media (max-width:640px) {
  .beebot-console .msg-avatar {
    width: 40px;
    height: 40px;
    flex-basis: 40px;
  }
  .beebot-console .msg-avatar svg {
    width: 27px;
    height: 27px;
  }
  .beebot-console .msg {
    max-width: 99%;
    gap: 8px;
  }
}
.beebot-console .chat-avatar img {
  object-fit: cover;
  object-position: 50% 36%;
}
.beebot-console .msg.beebot {
  max-width: 92%;
  gap: 13px;
}
.beebot-console .msg.beebot .msg-avatar {
  width: 78px;
  height: 78px;
  flex: 0 0 78px;
  border: 3px solid #eeb93f;
  box-shadow: 0 0 0 4px rgba(239,182,52,.13),0 8px 23px rgba(12,40,64,.17);
  background: #061b30;
}
.beebot-console .msg.beebot .msg-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 39%;
}
.beebot-console .msg.beebot .msg-bubble {
  background: linear-gradient(155deg,#fffdf6,#fff2da);
  border: 1px solid #f2cf88;
  color: #20344b;
  box-shadow: 0 5px 15px rgba(116,83,21,.07);
}
.beebot-console .msg.beebot .msg-author {
  color: #092f4f;
}
.beebot-console .msg.user .msg-avatar {
  width: 47px;
  height: 47px;
  flex: 0 0 47px;
}
.beebot-console .msg.user .msg-avatar svg {
  width: 32px;
  height: 32px;
}
@media (max-width:740px) {
  .beebot-console .msg.beebot {
    max-width: 100%;
    gap: 9px;
  }
  .beebot-console .msg.beebot .msg-avatar {
    width: 58px;
    height: 58px;
    flex: 0 0 58px;
  }
  .beebot-console .msg.user {
    max-width: 99%;
  }
  .beebot-console .msg-bubble {
    font-size: 13px;
    padding: 10px 12px;
  }
}
@media (max-width:400px) {
  .beebot-console .msg.beebot .msg-avatar {
    width: 48px;
    height: 48px;
    flex: 0 0 48px;
  }
}
/* Mantiene intacta la caja de escritura original del laboratorio. */
.beebot-console .chat-card {
  min-width: 0;
  border-radius: 0;
  border: 0;
  box-shadow: none;
}
.beebot-console .messages {
  min-height: 360px;
}
.beebot-console .chat-bottom {
  flex-wrap: wrap;
}
.beebot-console .chat-controls {
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  border-top: 1px solid var(--border);
  padding: 11px 16px 14px;
}
.beebot-console .chat-control-button {
  border: 1px solid #cbd9e5;
  background: #f7fafc;
  border-radius: 8px;
  padding: 8px 11px;
  font-size: 12px;
  color: #24445e;
}
.beebot-console .chat-control-button:hover {
  background: #eef4f9;
}
.beebot-console .chat-control-button:focus-visible {
  outline: 2px solid #225a89;
  outline-offset: 2px;
}
.beebot-console .chat-card .msg-bubble {
  overflow-wrap: anywhere;
}
@media (max-width:620px) {
  .beebot-console .composer {
    flex-wrap: wrap;
  }
  .beebot-console .composer textarea {
    min-width: 0;
    flex-basis: 100%;
  }
  .beebot-console .btn-send {
    margin-left: auto;
    min-height: 45px;
    padding: 10px 20px;
  }
  .beebot-console .chat-head {
    flex-wrap: wrap;
  }
}
/* Indicador de estado de conexión. No muestra rutas internas. */
.beebot-console .chat-head-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 9px;
}
.beebot-console .status {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  color: #65758a;
}
.beebot-console .status-dot {
  width: 9px;
  height: 9px;
  background: #98a9b7;
  border-radius: 50%;
  display: inline-block;
}
.beebot-console .status.online .status-dot {
  background: #27a266;
  box-shadow: 0 0 0 4px #e4f7eb;
}
.beebot-console .status.error .status-dot {
  background: #da5151;
  box-shadow: 0 0 0 4px #fce8e8;
}

/* V7 UPGRADE — Controles y mensajes de espera SOLO en la consola. */
.beebot-console .chat-wait-guidance {padding:10px 15px 0;background:#fff;display:grid;gap:7px;}
.beebot-console .chat-wait-guidance [hidden] {display:none!important;}
.beebot-console .chat-startup-note,.beebot-console .chat-processing-note {margin:0;display:flex;align-items:flex-start;gap:10px;border-radius:8px;padding:10px 12px;font-size:12px;line-height:1.55;}
.beebot-console .chat-startup-note {background:#f7f9fb;color:#536577;border:1px solid #e4ebf1;}
.beebot-console .chat-startup-note>span:first-child {color:#be8e39;font-size:20px;line-height:1;}
.beebot-console .chat-processing-note {background:#fff8e9;color:#69502d;border:1px solid #eddaa9;}
.beebot-console .chat-processing-pulse {width:9px;height:9px;flex:0 0 9px;border-radius:50%;margin-top:5px;background:#e1ac3d;box-shadow:0 0 0 4px rgba(225,172,61,.15);}
.beebot-console .btn-stop {display:inline-flex;justify-content:center;align-items:center;gap:8px;min-height:54px;border-radius:8px;border:1px solid #cf9c90;background:#fff8f6;color:#8a3f30;font-size:13px;font-weight:900;padding:14px 15px;white-space:nowrap;}
.beebot-console .btn-stop:not(:disabled):hover {background:#ffe9e4;border-color:#aa6555;}
.beebot-console .btn-stop:disabled {opacity:.45;cursor:not-allowed;background:#f5f6f6;border-color:#dde3e7;color:#7b8993;}
.beebot-console .stop-symbol {width:11px;height:11px;border-radius:2px;background:currentColor;display:inline-block;}
.beebot-console .btn-stop:focus-visible {outline:3px solid #ac604f;outline-offset:2px;}
@media(max-width:740px) {.beebot-console .chat-startup-note,.beebot-console .chat-processing-note {font-size:11px;}.beebot-console .btn-stop {min-height:50px;padding:12px 13px;}}
@media(max-width:620px) {.beebot-console .composer textarea{flex-basis:100%;}.beebot-console .btn-send{margin-left:auto;}.beebot-console .btn-stop{min-height:45px;padding:10px 15px;}}
