body {
  margin: 0;
  font-family: 'Inter', sans-serif;
  background-color: #101B1A;
  color: white;
  display: flex;
  flex-direction: column;
    height: 100vh;
  height: var(--app-height, 100vh);
  height: 100dvh;
  overflow: hidden;
}

#cabecera {
  background-color: #182927;
  color: white;
  padding: 15px;
  text-align: center;
}

#chat {
  background-color: #152321;
  min-height: 400px;
 padding: 15px;
  display: flex;
  flex-direction: column;
  flex: 1;
overflow-y: auto;
}

#chat p {
  background-color: #33504A;
  color: white;
  padding: 10px 15px;
  border-radius: 15px;
  max-width: 70%;
 display: block;
}

#entrada {
  display: flex;
  padding: 10px;
  padding-bottom: calc(10px + env(safe-area-inset-bottom));
  background-color: #182927;
}

#textoUsuario {
  flex: 1;
  padding: 10px;
  border-radius: 20px;
  border: none;
  margin-right: 8px;
}

#botonEnviar {
  background-color: #D6A24C;
  border: none;
  color: black;
  padding: 10px 18px;
  border-radius: 20px;
  cursor: pointer;
}

.mensaje-usuario {
  background-color: #E9DFC7 !important;
  color: #1C1710 !important;
  align-self: flex-end;
  margin-left: auto;
  position: relative;
  margin-bottom: 14px;
}

.mensaje-eco {
  align-self: flex-start;
  position: relative;
  margin-bottom: 14px;
}

.menu-overlay {
  position: fixed;
  inset: 0;
  background-color: rgba(0,0,0,0.5);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  z-index: 100;
}

.menu-caja {
  background-color: #182927;
  width: 100%;
  max-width: 500px;
  border-radius: 16px 16px 0 0;
  padding: 20px;
}

.menu-boton {
  width: 100%;
  padding: 14px;
  margin-bottom: 8px;
  border: none;
  border-radius: 10px;
  font-size: 15px;
  cursor: pointer;
  background-color: #22332F;
  color: white;
}

.menu-boton.eliminar {
  color: #E58F7C;
}

.menu-boton.guardar {
  background-color: #D6A24C;
  color: black;
  font-weight: bold;
}

.menu-textarea {
  width: 100%;
  padding: 10px;
  border-radius: 10px;
  border: none;
  margin-bottom: 12px;
  font-family: sans-serif;
  font-size: 14px;
  resize: vertical;
  min-height: 60px;
}.reaccion-caja {
  background-color: #182927;
  border-radius: 30px;
  padding: 12px 18px;
  display: flex;
  gap: 12px;
  margin-bottom: 24px;
}

.reaccion-boton {
  font-size: 26px;
  background: none;
  border: none;
  cursor: pointer;
  transition: transform 0.1s;
}

.reaccion-boton:active {
  transform: scale(1.3);
}

.reaccion-mostrada {
  position: absolute;
  bottom: -14px;
  background-color: #182927;
  border-radius: 12px;
  padding: 2px 7px;
  font-size: 14px;
  border: 1px solid #22332F;
}

.mensaje-eco .reaccion-mostrada {
  left: 6px;
}

.mensaje-usuario .reaccion-mostrada {
  right: 6px;
}
#botonMic {
  background-color: #33504A;
  border: none;
  color: white;
  padding: 10px 14px;
  border-radius: 50%;
  cursor: pointer;
  margin-right: 8px;
  font-size: 16px;
}

#botonMic.escuchando {
  background-color: #E58F7C;
}
#cabecera {
  position: relative;
}

#botonMenu {
  position: absolute;
  right: 15px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: white;
  font-size: 22px;
  cursor: pointer;
  padding: 4px 10px;
}

.ayuda-caja {
  background-color: #182927;
  border-radius: 14px;
  padding: 18px;
  max-width: 320px;
  line-height: 1.5;
  font-size: 14px;
}

.ayuda-caja h3 {
  margin-top: 0;
  color: #D6A24C;
}

.ayuda-caja b {
  color: #E9DFC7;
}
.overlay-transparente {
  position: fixed;
  inset: 0;
  z-index: 100;
}

.menu-desplegable {
  position: absolute;
  top: 55px;
  right: 15px;
  background-color: #182927;
  border-radius: 10px;
  padding: 6px;
  min-width: 160px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.4);
}

.menu-desplegable button {
  display: block;
  width: 100%;
  text-align: left;
  padding: 10px 12px;
  border: none;
  background: none;
  color: white;
  font-size: 14px;
  cursor: pointer;
  border-radius: 6px;
}

.menu-desplegable button:hover {
  background-color: #22332F;
}
/* ============ NUEVA INTERFAZ CON BARRA LATERAL ============ */

#appLayout {
  display: flex;
  flex-direction: row;
  flex: 1;
  overflow: hidden;
  width: 100%;
}

#sidebar {
  width: 240px;
  flex-shrink: 0;
  background-color: #10281C;
  display: flex;
  flex-direction: column;
  padding: 18px 14px;
  gap: 10px;
  overflow-y: auto;
}

#sidebarLogo {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

#sidebarIcono { display: flex; align-items: center; justify-content: center; }
#sidebarNombre { font-weight: bold; font-size: 17px; color: #E8FBEF; }
#sidebarSubtitulo { font-size: 11px; color: #7FB89A; }

#botonNuevaConversacionLateral {
  background-color: #34D399;
  color: #06231A;
  border: none;
  padding: 10px;
  border-radius: 10px;
  font-weight: bold;
  cursor: pointer;
  margin-bottom: 10px;
}

#sidebarNav { display: flex; flex-direction: column; gap: 4px; }

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  background: none;
  border: none;
  color: #B8C4C9;
  text-align: left;
  padding: 10px 12px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
  width: 100%;
  transition: background-color 0.15s ease, padding-left 0.15s ease, color 0.15s ease, transform 0.1s ease;
}

.nav-item svg {
  flex-shrink: 0;
  transition: transform 0.2s ease;
}

.nav-item:hover svg {
  transform: scale(1.12);
}
.nav-item:hover, .nav-item.activo { background-color: #1B3A28; }

#sidebarUsuario {
  margin-top: auto;
  padding: 10px 12px;
  border-top: 1px solid #1B3A28;
  color: #C9E9D6;
  font-size: 14px;
}

#panelPrincipal {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  position: relative;
  background-color: #0B1F17;
}

#pantallaInicio {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 30px 20px;
  overflow-y: auto;
}

#pantallaInicio.oculto { display: none; }

#inicioIcono { display: flex; align-items: center; justify-content: center; margin-bottom: 14px; }
#pantallaInicio h1 { color: #E8FBEF; margin: 0 0 8px; }
#inicioSubtexto { color: #9FCBB0; margin-bottom: 26px; max-width: 400px; }

#tarjetasInicio {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  max-width: 520px;
  width: 100%;
}

.tarjeta-inicio {
  background-color: #10281C;
  border: 1px solid #1B3A28;
  border-radius: 14px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  cursor: pointer;
  text-align: left;
  transition: border-color 0.15s;
}

.tarjeta-inicio:hover { border-color: #34D399; }
.tarjeta-icono { font-size: 22px; }
.tarjeta-titulo { color: #E8FBEF; font-weight: bold; font-size: 14.5px; }
.tarjeta-desc { color: #8FBFA3; font-size: 12.5px; }

#appChat { flex: 1; display: flex; flex-direction: column; overflow: hidden; }
#appChat.oculto { display: none; }

@media (max-width: 768px) {
 
  #sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 200;
    transform: translateX(-100%);
    transition: transform 0.2s;
    box-shadow: 4px 0 16px rgba(0,0,0,0.5);
  }

  #sidebar.abierto { transform: translateX(0); }

  #tarjetasInicio { grid-template-columns: 1fr; }
}

/* ---- Paleta de colores nueva (verde menta) ---- */
body { background-color: #0B1F17; }
#cabecera { background-color: #10281C; }
#chat { background-color: #0F241A; }
#chat p { background-color: #1E3A2A; color: #E8FBEF; }
#entrada { background-color: #10281C; }
#botonEnviar { background-color: #34D399; color: #06231A; }
#botonMic { background-color: #1B3A28; }
#botonMic.escuchando { background-color: #E58F7C; }
.mensaje-usuario { background-color: #DFF5E8 !important; color: #0B1F17 !important; }
.menu-caja, .menu-desplegable, .ayuda-caja { background-color: #10281C; }
.menu-boton { background-color: #1B3A28; }
.menu-boton.guardar { background-color: #34D399; color: #06231A; }
.ayuda-caja h3 { color: #34D399; }

/* ============ ANIMACIONES Y PULIDO VISUAL ============ */

@keyframes aparecer {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.mensaje-usuario, .mensaje-eco {
  animation: aparecer 0.25s ease-out;
}

@keyframes pantallaAparecer {
  from { opacity: 0; }
  to { opacity: 1; }
}

#pantallaInicio, #appChat {
  animation: pantallaAparecer 0.3s ease-out;
}

.tarjeta-inicio {
  transition: transform 0.15s ease, border-color 0.15s ease, background-color 0.15s ease;
}

.tarjeta-inicio:hover {
  transform: translateY(-3px);
  background-color: #14351F;
}

.tarjeta-inicio:active {
  transform: translateY(0px) scale(0.98);
}

#botonEnviar, #botonMic, .round-btn {
  transition: transform 0.1s ease, background-color 0.15s ease;
}

#botonEnviar:active, #botonMic:active {
  transform: scale(0.92);
}

.nav-item {
  transition: background-color 0.15s ease, padding-left 0.15s ease;
}

.nav-item:hover {
  padding-left: 16px;
}

#botonNuevaConversacionLateral {
  transition: transform 0.1s ease, filter 0.15s ease;
}

#botonNuevaConversacionLateral:hover {
  filter: brightness(1.08);
}

#botonNuevaConversacionLateral:active {
  transform: scale(0.97);
}

.menu-caja, .menu-desplegable, .ayuda-caja {
  animation: menuAparecer 0.18s ease-out;
}

@keyframes menuAparecer {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.menu-boton {
  transition: background-color 0.15s ease, transform 0.1s ease;
}

.menu-boton:active {
  transform: scale(0.97);
}

#chat::-webkit-scrollbar, #sidebar::-webkit-scrollbar {
  width: 6px;
}

#chat::-webkit-scrollbar-thumb, #sidebar::-webkit-scrollbar-thumb {
  background-color: #1E3A2A;
  border-radius: 10px;
}

#chat::-webkit-scrollbar-track, #sidebar::-webkit-scrollbar-track {
  background: transparent;
}

.puntos-escribiendo {
  display: inline-flex;
  gap: 4px;
  padding: 4px 0;
}

.puntos-escribiendo span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background-color: #9FCBB0;
  animation: rebotarPunto 1.1s infinite ease-in-out;
}

.puntos-escribiendo span:nth-child(2) { animation-delay: 0.15s; }
.puntos-escribiendo span:nth-child(3) { animation-delay: 0.3s; }

@keyframes rebotarPunto {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.5; }
  30% { transform: translateY(-5px); opacity: 1; }
}

#sidebarIcono {
  display: inline-block;
  animation: flotar 3s ease-in-out infinite;
}

@keyframes flotar {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}
/* ============ FONDO CON PROFUNDIDAD ============ */

body {
  background: radial-gradient(ellipse at top left, #123725 0%, #0B1F17 55%, #081712 100%);
}

#panelPrincipal {
  background: radial-gradient(ellipse at bottom right, #0F2A1D 0%, #0B1F17 60%);
}

#chat {
  background-color: transparent;
  background-image:
    radial-gradient(circle at 20% 20%, rgba(52, 211, 153, 0.035) 0%, transparent 40%),
    radial-gradient(circle at 80% 70%, rgba(52, 211, 153, 0.025) 0%, transparent 40%),
    linear-gradient(180deg, #0F241A 0%, #0B1E15 100%);
}

#sidebar {
  background: linear-gradient(180deg, #10281C 0%, #0C2016 100%);
}

#pantallaInicio {
  background: radial-gradient(circle at 50% 30%, rgba(52, 211, 153, 0.05) 0%, transparent 55%);
}
/* ============ TIPOGRAFÍA ============ */

#sidebarNombre, .tarjeta-titulo, #cabecera h2, .ayuda-caja h3, .menu-caja h3 {
  font-family: 'Poppins', sans-serif;
}

#pantallaInicio h1 {
  font-family: 'Poppins', sans-serif;
  font-weight: 600;
  letter-spacing: -0.5px;
}

#sidebarNombre {
  font-weight: 700;
  letter-spacing: -0.3px;
}
/* ============ BURBUJAS DE CHAT MEJORADAS ============ */

#chat p {
  padding: 10px 14px;
  border-radius: 16px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.25);
  line-height: 1.4;
  font-size: 14.5px;
  position: relative;
}

#chat .mensaje-eco {
  border-bottom-left-radius: 4px !important;
}


#chat .mensaje-usuario {
  border-bottom-right-radius: 4px !important;
}

#chat {
  gap: 3px;
}

#chat p + p {
  margin-top: 2px;
}
#inicioIcono svg {
  animation: flotar 3s ease-in-out infinite;
}
#sidebarIcono svg, #inicioIcono svg {
  filter: drop-shadow(0 3px 8px rgba(52, 211, 153, 0.35));
}
/* ============ PANTALLA DE INICIO REDISEÑADA ============ */

/* ============ PANTALLA DE INICIO REDISEÑADA (SIN SCROLL) ============ */

#pantallaInicio {
  padding: clamp(10px, 3vh, 40px) 20px;
  gap: 0;
  justify-content: center;
  min-height: 0;
}

#inicioHero {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: clamp(10px, 3vh, 40px);
  flex-shrink: 0;
}

#inicioIconoGlow {
  position: relative;
  margin-bottom: clamp(14px, 2.2vh, 28px);
  width: clamp(100px, 13vh, 150px);
  height: clamp(100px, 13vh, 150px);
  flex-shrink: 0;
}

#inicioIconoGlow::before {
  content: "";
  position: absolute;
  inset: clamp(-22px, -3.5vh, -42px);
  background: radial-gradient(circle, rgba(31, 191, 158, 0.4) 0%, rgba(31, 191, 158, 0.12) 45%, transparent 72%);
  border-radius: 50%;
  z-index: -1;
  filter: blur(2px);
}

#inicioIcono {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

#inicioIcono svg {
  width: 100%;
  height: 100%;
  filter: drop-shadow(0 8px 26px rgba(31, 191, 158, 0.55));
}

#inicioSaludo {
  color: #1FBF9E;
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  margin: 0 0 6px;
}

#pantallaInicio h1 {
  font-size: clamp(18px, 2.6vh, 28px);
  margin: 0 0 8px;
  max-width: 480px;
  line-height: 1.25;
}

#inicioSubtexto {
  font-size: clamp(12.5px, 1.6vh, 14.5px);
  max-width: 380px;
  line-height: 1.4;
}

#tarjetasInicio {
  max-width: 620px;
  gap: clamp(8px, 1.4vh, 16px);
  margin-bottom: clamp(10px, 2.4vh, 30px);
  flex-shrink: 0;
}

.tarjeta-inicio {
  padding: clamp(12px, 1.8vh, 22px);
  gap: 10px;
  border-radius: 16px;
}

.tarjeta-chip {
  width: clamp(36px, 5vh, 48px);
  height: clamp(36px, 5vh, 48px);
  border-radius: 12px;
}

.tarjeta-titulo { font-size: clamp(13.5px, 1.6vh, 15.5px); }
.tarjeta-desc { font-size: clamp(11px, 1.3vh, 12.5px); line-height: 1.3; }

#enlaceAyudaInicio {
  background: none;
  border: 1px solid #1B3A28;
  color: #9FCBB0;
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 12.5px;
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s;
  flex-shrink: 0;
}

#enlaceAyudaInicio:hover {
  border-color: #1FBF9E;
  color: #1FBF9E;
}
/* ============ EFECTO VIDRIO ESMERILADO (GLASSMORPHISM) ============ */

.menu-caja, .menu-desplegable, .ayuda-caja {
  background-color: rgba(16, 40, 28, 0.75) !important;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.tarjeta-inicio {
  background-color: rgba(16, 40, 28, 0.55);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.tarjeta-inicio:hover {
  background-color: rgba(20, 53, 31, 0.65);
  border-color: rgba(52, 211, 153, 0.5);
}

.tarjeta-chip {
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

#sidebar {
  background: rgba(16, 40, 28, 0.7);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-right: 1px solid rgba(255, 255, 255, 0.06);
}

#topbarMovil {
  background: rgba(16, 40, 28, 0.7);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

#cabecera {
  background: rgba(16, 40, 28, 0.7) !important;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

#entrada {
  background: rgba(16, 40, 28, 0.7) !important;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}
/* ============ PALETA PREMIUM (neutro + acento refinado) ============ */

body {
  background: radial-gradient(ellipse at top left, #131A20 0%, #0B0F12 55%, #060809 100%) !important;
}

#panelPrincipal {
  background: radial-gradient(ellipse at bottom right, #10161B 0%, #0B0F12 60%) !important;
}

#sidebar {
  background: rgba(13, 18, 22, 0.75) !important;
}

#chat {
  background-color: transparent !important;
  background-image:
    radial-gradient(circle at 20% 20%, rgba(31, 191, 158, 0.03) 0%, transparent 40%),
    radial-gradient(circle at 80% 70%, rgba(31, 191, 158, 0.02) 0%, transparent 40%),
    linear-gradient(180deg, #0D1216 0%, #0A0D10 100%) !important;
}

#pantallaInicio {
  background: radial-gradient(circle at 50% 30%, rgba(31, 191, 158, 0.06) 0%, transparent 55%) !important;
}

#cabecera, #entrada {
  background: rgba(13, 18, 22, 0.75) !important;
}

.menu-caja, .menu-desplegable, .ayuda-caja {
  background-color: rgba(13, 18, 22, 0.8) !important;
}

.tarjeta-inicio {
  background-color: rgba(16, 22, 27, 0.6) !important;
  border-color: rgba(255, 255, 255, 0.05) !important;
}

.tarjeta-inicio:hover {
  background-color: rgba(20, 27, 33, 0.7) !important;
  border-color: rgba(31, 191, 158, 0.5) !important;
}

#chat p {
  background-color: #1A2229 !important;
  color: #EDEAE3 !important;
}

.mensaje-usuario {
  background-color: #EDEAE3 !important;
  color: #10151A !important;
}

#botonEnviar, .menu-boton.guardar, #botonNuevaConversacionLateral {
  background-color: #1FBF9E !important;
  color: #06231A !important;
}

#botonMic { background-color: #1A2229 !important; }

.ayuda-caja h3 { color: #1FBF9E !important; }

#inicioSaludo { color: #1FBF9E !important; }

#inicioIconoGlow::before {
  background: radial-gradient(circle, rgba(31, 191, 158, 0.22) 0%, transparent 70%) !important;
}

#sidebarIcono svg circle, #inicioIcono svg circle {
  fill: #1FBF9E !important;
}

.nav-item:hover {
  background-color: rgba(31, 191, 158, 0.08);
}

.nav-item.activo {
  background-color: rgba(31, 191, 158, 0.16) !important;
  color: #1FBF9E !important;
  box-shadow: inset 3px 0 0 #1FBF9E;
}

.nav-item:active {
  transform: scale(0.97);
}

.chip-1 { background-color: rgba(31, 191, 158, 0.18) !important; }

#sidebarSubtitulo, .tarjeta-desc, #inicioSubtexto {
  color: #8A99A0 !important;
}

#sidebarNombre, #pantallaInicio h1, #cabecera h2, .tarjeta-titulo {
  color: #EDEAE3 !important;
}

.nav-item {
  color: #B8C4C9 !important;
}
/* ============ CABECERA TIPO CONTACTO ============ */

#cabecera {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 15px !important;
}

#cabeceraPerfil {
  display: flex;
  align-items: center;
  gap: 10px;
}

#cabeceraLogo {
  display: flex;
  filter: drop-shadow(0 2px 6px rgba(31, 191, 158, 0.35));
}

#cabeceraTextos {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
}

#cabeceraNombre {
  font-family: 'Poppins', sans-serif;
  font-weight: 600;
  font-size: 15.5px;
  color: #EDEAE3;
}

#cabeceraEstado {
  font-size: 11.5px;
  color: #8A99A0;
  transition: color 0.2s;
}
/* ============ AVATARES DE CHAT ============ */

.fila-mensaje {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  max-width: 100%;
}

.fila-eco {
  align-self: flex-start;
}

.fila-usuario {
  align-self: flex-end;
}

.avatar-chat {
  flex-shrink: 0;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.fila-usuario .mensaje-usuario,
.fila-eco .mensaje-eco {
  margin-left: 0 !important;
}
/* ============ LISTA DE CONVERSACIONES ============ */

.historial-fecha {
  color: #8A99A0;
  font-size: 11.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 10px 4px 6px;
}

.historial-item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px;
  margin-bottom: 4px;
  border: none;
  border-radius: 10px;
  background: none;
  cursor: pointer;
  text-align: left;
}

.historial-item:hover, .historial-item.activo {
  background-color: rgba(31, 191, 158, 0.1);
}

.historial-icono {
  font-size: 20px;
  flex-shrink: 0;
}

.historial-textos {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.historial-titulo {
  color: #EDEAE3;
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.historial-previa {
  color: #8A99A0;
  font-size: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
/* ============ PANTALLA DE LLAMADA DE VOZ ============ */

#pantallaLlamada {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 30px;
}

#pantallaLlamada.oculto { display: none; }

#llamadaOrbContenedor {
  position: relative;
  width: 180px;
  height: 180px;
  display: flex;
  align-items: center;
  justify-content: center;
}

#llamadaOrb {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #3DE0BB, #0E8F73 70%);
  box-shadow: 0 0 40px rgba(31, 191, 158, 0.5);
  transition: all 0.3s ease;
  animation: orbReposo 3s ease-in-out infinite;
}

@keyframes orbReposo {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.04); }
}

#llamadaOrb.escuchando {
  animation: orbEscuchando 1s ease-in-out infinite;
  box-shadow: 0 0 60px rgba(31, 191, 158, 0.8);
}

@keyframes orbEscuchando {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.12); }
}

#llamadaOrb.hablando {
  animation: orbHablando 0.6s ease-in-out infinite;
  background: radial-gradient(circle at 35% 30%, #5FF0D0, #1FBF9E 70%);
}

@keyframes orbHablando {
  0%, 100% { transform: scale(1) rotate(0deg); }
  25% { transform: scale(1.08) rotate(2deg); }
  75% { transform: scale(1.08) rotate(-2deg); }
}

#llamadaEstado {
  color: #C9E9D6;
  font-size: 15px;
  font-weight: 500;
}

#botonFinalizarLlamada {
  background-color: #E5484D;
  color: white;
  border: none;
  padding: 12px 28px;
  border-radius: 24px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}
/* ============ RESPONSIVE COMPLETO ============ */

#tarjetasInicio {
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

@media (min-width: 1200px) {
  #tarjetasInicio { max-width: 680px; }
}

@media (max-width: 900px) {
  #sidebar { width: 210px; }
  #pantallaInicio h1 { font-size: clamp(20px, 4vw, 28px); }
  #inicioSubtexto { font-size: 13.5px; }
}

@media (max-width: 600px) {
  #pantallaInicio { padding: 30px 16px; }
  #inicioHero { margin-bottom: 26px; }
  #inicioIcono svg { width: 60px; height: 60px; }
  #inicioIconoGlow::before { inset: -12px; }
  #tarjetasInicio { grid-template-columns: 1fr; gap: 12px; max-width: 100%; }
    .tarjeta-inicio {
    flex-direction: row;
    align-items: center;
    padding: 12px 44px 12px 14px;
    gap: 12px;
  }
  .tarjeta-textos {
    gap: 2px;
  }
  .tarjeta-desc {
    display: -webkit-box;
    line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
  .tarjeta-flecha {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    width: 24px;
    height: 24px;
  }
  #chat p { font-size: 13.5px; max-width: 82%; }
  .avatar-chat { width: 26px; height: 26px; }
  #llamadaOrbContenedor { width: 140px; height: 140px; }
  #llamadaOrb { width: 110px; height: 110px; }
}

@media (max-width: 480px) {
  #cabeceraNombre { font-size: 14px; }
  #cabeceraEstado { font-size: 10.5px; }
  #entrada { padding: 8px; }
  #textoUsuario { padding: 8px 12px; font-size: 14px; }
}

/* Bajar el costo de efectos pesados en pantallas chicas (rendimiento) */
@media (max-width: 600px) {
  .menu-caja, .menu-desplegable, .ayuda-caja, #sidebar, #cabecera, #entrada, #topbarMovil {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    background-color: rgba(13, 18, 22, 0.95) !important;
  }
  .tarjeta-inicio {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    background-color: rgba(16, 22, 27, 0.85) !important;
  }
  #inicioIconoGlow::before {
    background: radial-gradient(circle, rgba(31, 191, 158, 0.15) 0%, transparent 70%) !important;
  }
  .mensaje-usuario, .mensaje-eco {
    animation: none !important;
  }
  #sidebarIcono svg, #inicioIcono svg {
    animation: none !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}
/* ============ PANTALLA DE BLOQUEO ============ */

#pantallaBloqueo {
  position: fixed;
  inset: 0;
  z-index: 500;
  background: radial-gradient(ellipse at top left, #131A20 0%, #0B0F12 55%, #060809 100%);
  display: flex;
  align-items: center;
  justify-content: center;
}

#pantallaBloqueo.oculto { display: none; }

#bloqueoCaja {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 30px;
  max-width: 320px;
  width: 90%;
}

#bloqueoIcono {
  margin-bottom: 16px;
  filter: drop-shadow(0 6px 16px rgba(31, 191, 158, 0.4));
}

#bloqueoTitulo {
  color: #EDEAE3;
  font-family: 'Poppins', sans-serif;
  margin: 0 0 6px;
}

#bloqueoSubtexto {
  color: #8A99A0;
  font-size: 13.5px;
  margin: 0 0 22px;
}

#bloqueoInput {
  width: 100%;
  padding: 12px 16px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.1);
  background-color: #10161B;
  color: #EDEAE3;
  font-size: 15px;
  text-align: center;
  letter-spacing: 3px;
  margin-bottom: 14px;
}

#bloqueoBoton {
  width: 100%;
  padding: 12px;
  border-radius: 12px;
  border: none;
  background-color: #1FBF9E;
  color: #06231A;
  font-weight: 700;
  font-size: 14.5px;
  cursor: pointer;
  margin-bottom: 12px;
}

#bloqueoError {
  color: #E5484D;
  font-size: 12.5px;
  min-height: 16px;
  margin: 0 0 10px;
}

#bloqueoOlvide {
  background: none;
  border: none;
  color: #8A99A0;
  font-size: 12px;
  cursor: pointer;
  text-decoration: underline;
}
/* ============ LOBBY REDISEÑADO ============ */

.tarjeta-inicio {
  --acento: #1FBF9E;
  display: flex;
  align-items: center;
  gap: 14px;
  position: relative;
}

.tarjeta-chip {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--acento);
  background-color: color-mix(in srgb, var(--acento) 16%, transparent);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--acento) 25%, transparent), 0 0 14px color-mix(in srgb, var(--acento) 25%, transparent);
  transition: box-shadow 0.25s ease, transform 0.25s ease;
  flex-shrink: 0;
}

.tarjeta-inicio:hover .tarjeta-chip {
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--acento) 40%, transparent), 0 0 22px color-mix(in srgb, var(--acento) 45%, transparent);
  transform: scale(1.05);
}

.tarjeta-textos {
  display: flex;
  flex-direction: column;
  gap: 3px;
  text-align: left;
  flex: 1;
}

.tarjeta-flecha {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 1px solid color-mix(in srgb, var(--acento) 40%, transparent);
  color: var(--acento);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.7;
  transition: opacity 0.25s ease, background-color 0.25s ease;
  flex-shrink: 0;
}

.tarjeta-inicio:hover .tarjeta-flecha {
  opacity: 1;
  background-color: color-mix(in srgb, var(--acento) 12%, transparent);
}

.acento-chat { --acento: #1FBF9E; }
.acento-voz { --acento: #38BDF8; }
.acento-consejo { --acento: #F0B429; }
.acento-sentir { --acento: #F0507A; }

/* ---- Acciones rápidas ---- */

#accionesRapidas {
  margin-top: 26px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  max-width: 620px;
  width: 100%;
}

.acciones-divisor {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  justify-content: center;
}

.acciones-divisor span {
  height: 1px;
  width: 40px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.15), transparent);
}

#accionesTitulo {
  color: #1FBF9E;
  font-size: 12.5px;
  font-weight: 600;
  margin: 0;
  white-space: nowrap;
}

#accionesLista {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
}

.accion-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: 20px;
  border: 1px solid rgba(255,255,255,0.08);
  background-color: rgba(16, 22, 27, 0.6);
  color: #B8C4C9;
  font-size: 13px;
  cursor: pointer;
  transition: border-color 0.2s ease, color 0.2s ease, transform 0.15s ease;
}

.accion-pill:hover {
  border-color: rgba(31, 191, 158, 0.5);
  color: #EDEAE3;
  transform: translateY(-2px);
}

#lobbyFrase {
  color: #6E7B82;
  font-size: 12px;
  margin-top: 4px;
  text-align: center;
}

/* ---- Halo del robot central, más elegante ---- */

#inicioIconoGlow::before {
  animation: haloRespirar 4s ease-in-out infinite;
}

@keyframes haloRespirar {
  0%, 100% { opacity: 0.7; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.08); }
}

/* ---- Partículas ambientales sutiles ---- */

#particulasLobby {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
}

#particulasLobby span {
  position: absolute;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background-color: rgba(31, 191, 158, 0.5);
  opacity: 0;
  animation: particulaFlotar 12s ease-in-out infinite;
}

#particulasLobby span:nth-child(1) { top: 20%; left: 12%; animation-delay: 0s; }
#particulasLobby span:nth-child(2) { top: 65%; left: 85%; animation-delay: 3s; background-color: rgba(56, 189, 248, 0.4); }
#particulasLobby span:nth-child(3) { top: 80%; left: 20%; animation-delay: 6s; background-color: rgba(240, 180, 41, 0.4); }
#particulasLobby span:nth-child(4) { top: 15%; left: 78%; animation-delay: 9s; background-color: rgba(240, 80, 122, 0.4); }

@keyframes particulaFlotar {
  0% { opacity: 0; transform: translateY(0); }
  20% { opacity: 0.6; }
  80% { opacity: 0.6; }
  100% { opacity: 0; transform: translateY(-40px); }
}

#pantallaInicio { position: relative; }
#inicioHero, #tarjetasInicio, #accionesRapidas { position: relative; z-index: 1; }

/* ---- Entrada animada escalonada ---- */

#inicioIconoGlow, #inicioSaludo, #pantallaInicio h1, #inicioSubtexto {
  animation: aparecer 0.4s ease-out backwards;
}
#inicioSaludo { animation-delay: 0.05s; }
#pantallaInicio h1 { animation-delay: 0.1s; }
#inicioSubtexto { animation-delay: 0.15s; }

.tarjeta-inicio { animation: aparecer 0.4s ease-out backwards; }
.tarjeta-inicio:nth-child(1) { animation-delay: 0.2s; }
.tarjeta-inicio:nth-child(2) { animation-delay: 0.26s; }
.tarjeta-inicio:nth-child(3) { animation-delay: 0.32s; }
.tarjeta-inicio:nth-child(4) { animation-delay: 0.38s; }

#accionesRapidas { animation: aparecer 0.4s ease-out backwards; animation-delay: 0.46s; }

/* ---- Responsive del lobby ---- */

@media (max-width: 600px) {
  .tarjeta-chip { width: 40px; height: 40px; border-radius: 12px; }
  .tarjeta-flecha { width: 26px; height: 26px; }
  #accionesLista { flex-direction: column; width: 100%; }
  .accion-pill { justify-content: center; }
  #particulasLobby span { display: none; }
  #particulasLobby span:nth-child(1), #particulasLobby span:nth-child(2) { display: block; }
}

@media (prefers-reduced-motion: reduce) {
  #particulasLobby { display: none; }
  #inicioIconoGlow::before { animation: none !important; }
}
/* ============ CORRECCIÓN DE ANCHO DEL LOBBY ============ */

html, body { max-width: 100vw; overflow-x: hidden; overscroll-behavior-y: contain; }

#appLayout, #panelPrincipal, #pantallaInicio {
  max-width: 100%;
  box-sizing: border-box;
}

#tarjetasInicio {
  width: 100%;
  box-sizing: border-box;
}

.tarjeta-inicio {
  min-width: 0;
  box-sizing: border-box;
}

.tarjeta-desc {
  word-wrap: break-word;
  overflow-wrap: break-word;
}

@media (max-width: 768px) {
  #tarjetasInicio { max-width: 100%; }
  #pantallaInicio { padding-left: 14px; padding-right: 14px; }
}
/* ============ TOPE DE SEGURIDAD ANTI-SCROLL ============ */

#panelPrincipal, #pantallaInicio {
  height: 100%;
  max-height: 100%;
}

#accionesRapidas {
  margin-top: clamp(10px, 2vh, 26px);
  flex-shrink: 0;
}

@media (max-height: 700px) {
  #accionesLista { display: none; }
  .acciones-divisor { display: none; }
  #accionesTitulo { display: none; }
  #lobbyFrase { display: none; }
}
/* ============ LOBBY MÓVIL: SCROLL PROPIO SIN PERDER IDENTIDAD ============ */

@media (max-width: 600px) {
  #pantallaInicio {
    overflow-y: auto !important;
    justify-content: flex-start;
    padding-top: clamp(20px, 5vh, 36px);
    padding-bottom: 30px;
    height: auto;
    max-height: none;
    min-height: 100%;
  }

  #panelPrincipal {
    overflow-y: auto;
  }

  #inicioIconoGlow {
    width: 128px;
    height: 128px;
    margin-bottom: 18px;
  }

  #inicioIconoGlow::before {
    inset: -18px;
    filter: none;
  }
  #inicioHero {
    margin-bottom: 22px;
  }

  #pantallaInicio h1 {
    font-size: clamp(19px, 5.5vw, 23px);
  }

  #inicioSubtexto {
    font-size: 13px;
  }

  #tarjetasInicio {
    margin-bottom: 22px;
  }

  .tarjeta-inicio {
    padding: 16px;
  }

  .tarjeta-chip {
    width: 42px;
    height: 42px;
  }

  #accionesRapidas,
  .acciones-divisor,
  #accionesTitulo,
  #accionesLista,
  #lobbyFrase {
    display: flex !important;
  }

  #accionesTitulo { display: block !important; }
  #lobbyFrase { display: block !important; }
}

@media (max-width: 380px) {
  #inicioIconoGlow {
    width: 108px;
    height: 108px;
  }
  .tarjeta-inicio { padding: 13px; }
  .tarjeta-chip { width: 38px; height: 38px; }
  #pantallaInicio h1 { font-size: 18px; }
}
/* ============ BOTÓN MENÚ SOLO EN EL LOBBY (MÓVIL) ============ */

#botonMenuLobby {
  display: none;
  position: absolute;
  top: 16px;
  left: 16px;
  z-index: 5;
  background: rgba(16, 22, 27, 0.6);
  border: 1px solid rgba(255,255,255,0.08);
  color: #EDEAE3;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

@media (max-width: 768px) {
  #botonMenuLobby {
    display: flex;
  }
}
/* ============ OCULTAR SCROLLBAR VISUAL (todo el sitio) ============ */

* {
  scrollbar-width: none;
  -ms-overflow-style: none;
}

*::-webkit-scrollbar {
  display: none;
}
/* ============ AJUSTES DEL LOBBY ============ */

.ajustes-input {
  width: 100%;
  padding: 12px 16px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.1);
  background-color: #10161B;
  color: #EDEAE3;
  font-size: 14.5px;
  margin-bottom: 10px;
  box-sizing: border-box;
}

.ajustes-label {
  color: #8A99A0;
  font-size: 12.5px;
  margin: 0 0 6px;
}

.ajustes-texto {
  color: #B8C4C9;
  font-size: 13.5px;
  line-height: 1.5;
  margin: 0 0 14px;
}

.ajustes-mensaje {
  font-size: 12.5px;
  min-height: 16px;
  margin: 0 0 10px;
}

.ajustes-mensaje.exito { color: #34D399; }
.ajustes-mensaje.error { color: #E5484D; }

.avatar-color-opciones {
  display: flex;
  gap: 10px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.avatar-color-opcion {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  cursor: pointer;
  border: 2px solid transparent;
}

.avatar-color-opcion.seleccionado {
  border-color: white;
}

.firma-eco {
  text-align: center;
  color: #6E7B82;
  font-size: 11.5px;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid rgba(255,255,255,0.08);
}
/* ============ AJUSTES DEL LOBBY ============ */

.ajustes-input {
  width: 100%;
  padding: 12px 16px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.1);
  background-color: #10161B;
  color: #EDEAE3;
  font-size: 14.5px;
  margin-bottom: 10px;
  box-sizing: border-box;
}

.ajustes-label {
  color: #8A99A0;
  font-size: 12.5px;
  margin: 0 0 6px;
}

.ajustes-texto {
  color: #B8C4C9;
  font-size: 13.5px;
  line-height: 1.5;
  margin: 0 0 14px;
}

.ajustes-mensaje {
  font-size: 12.5px;
  min-height: 16px;
  margin: 0 0 10px;
}

.ajustes-mensaje.exito { color: #34D399; }
.ajustes-mensaje.error { color: #E5484D; }

.avatar-color-opciones {
  display: flex;
  gap: 10px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.avatar-color-opcion {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  cursor: pointer;
  border: 2px solid transparent;
}

.avatar-color-opcion.seleccionado {
  border-color: white;
}

.firma-eco {
  text-align: center;
  color: #6E7B82;
  font-size: 11.5px;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid rgba(255,255,255,0.08);
}

.menu-boton-icono {
  display: flex;
  align-items: center;
  gap: 12px;
  text-align: left;
}

.menu-boton-svg {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: #1FBF9E;
}

.menu-boton-icono.eliminar .menu-boton-svg {
  color: #E58F7C;
}