@import url('https://fonts.googleapis.com/css2?family=Notable&display=swap');

/* =========================================================
   💻 COMPUTADORA (ESTILOS GENERALES DESKTOP)
   ========================================================= */

.main-content {
  width: 100%;
  min-height: auto;
  display: none;
  justify-content: center;
  align-items: flex-start;
  padding: 8px;
  box-sizing: border-box;
}

.layout {
  width: 100%;
  max-width: 1280px;
  display: flex;
  gap: 25px;
  align-items: stretch;
}

.col {
  background: #ffffff;
  border-radius: 20px;
  border: 1px solid rgba(0,0,0,0.08);
  box-shadow:
  0 8px 20px rgba(0,0,0,0.08),
  0 2px 6px rgba(0,0,0,0.05);
  display: flex;
  justify-content: center;
  align-items: center;
  transition: all 0.3s ease;
}

.left,
.right {
  flex: 0 0 330px;
  max-width: 330px;
  border: 2px solid #000000;
  border-radius: 20px;
  box-shadow:
    0 12px 30px rgba(0,0,0,0.18),
    0 4px 10px rgba(0,0,0,0.12);

    overflow-y: auto;      /* ← activa scroll si el contenido es muy alto */
  overflow-x: hidden;    /* ← evita scroll horizontal */
}

.center{
  flex: 0 0 auto;
  position: relative;
  border-radius: 0;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  padding: 0;
  overflow: hidden;
  width: fit-content;
  height: fit-content;
  border: none;
}

/* =========================================================
   🎨 PANEL IZQUIERDO
   ========================================================= */

.left-panel {
  flex-direction: column;
  justify-content: flex-start;
  padding: 30px;
  gap: 20px;
  text-align: center;
}

.logo-img {
  width: 240px;
  height: 110px;
  object-fit: contain;
  display: block;
  margin: -25px auto 0 auto;
}

.titulo-app {
  font-family: "Playwrite NZ Basic", cursive;
  font-size: 18px;
  font-weight: 700;
  color: #000000;
  margin-top: -16px;
  margin-bottom: 15px;
  text-align: center;
}

/* =========================================================
   🌐 TRADUCTOR
   ========================================================= */

.language-row {
  margin-top: -16px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 15px;
}

.translate-label {
  display: flex;
  align-items: center;
  gap: 5px;
  font-weight: 600;
  color: #0d6efd;
}

/* =========================================================
   📦 COMBO PRINCIPAL
   ========================================================= */

.combo-principal {
  margin-top: -25px;
  width: 100%;
  margin-bottom: 15px;
}

/* =========================================================
   🔘 BOTONES
   ========================================================= */

.botones-row {
  margin-top: -25px;
  display: flex;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
}

.botones-row .btn {
  flex: 1;
  font-size: 13px;
  padding: 6px 8px;
  border-radius: 8px;
  font-weight: 600;
  white-space: nowrap;
  transition: all 0.3s ease;
}

.botones-row .btn i {
  font-size: 14px;
}

.botones-row .btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 15px rgba(0,0,0,0.2);
}

.botones-row .btn-secondary {
  background-color: #e0e0e0;
  color: #000000;
  border: 2px solid #000000;
  font-weight: 700;
  font-size: 14px;
  cursor: default;
}

.botones-row .btn-secondary:hover {
  background-color: #e0e0e0;
  color: #000000;
  border: 2px solid #000000;
  transform: none;
  box-shadow: none;
}

.botones-row .btn-secondary i {
  font-size: 16px;
  color: #000000;
}

/* =========================================================
   🎮 CONTROLES DEL ROBOT
   ========================================================= */

.control-box {
  width: 100%;
  margin-top: -11px;
  display: flex;
  justify-content: center;
}

.control-grid-3x3 {
  display: grid;
  grid-template-columns: repeat(3, 72px);  /* antes: 60px ↑ más grandes */
  grid-template-rows: repeat(3, 72px);     /* antes: 60px ↑ más grandes */
  column-gap: 8px;                          /* antes: 18px ↓ menos espacio */
  row-gap: 6px;                             /* antes: 14px ↓ menos espacio */
}

.control-btn {
  border: none;
  background: transparent;
  box-shadow: none;
  padding: 0;
  cursor: pointer;
  transition: transform 0.12s ease;
  display: flex;
  justify-content: center;
  align-items: center;
}

.control-btn img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  pointer-events: none;
  transition: filter 0.2s ease;
}

.control-btn:hover img {
  filter: brightness(1.2);
}

.control-btn:active {
  transform: scale(0.85);
}

/* =========================================================
   📜 PANEL INFERIOR (COMANDOS)
   ========================================================= */

.panel-inferior {
  position: relative;
  width: 97%;
  margin-top: -10px;
  background: #ffffff;
  border: 3px solid #b5b5b5;
  border-radius: 14px;
  height: 138px;
  padding: 13px;
  overflow-y: auto;
  overflow-x: hidden;
  box-sizing: border-box;
  scrollbar-width: thin;
  padding-right: calc(1px + 8px);
  text-align: left;
  font-size: 14px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.12);
}

.panel-inferior::-webkit-scrollbar { width: 8px; }
.panel-inferior::-webkit-scrollbar-track { background: #f1f1f1; border-radius: 4px; }
.panel-inferior::-webkit-scrollbar-thumb { background: #888; border-radius: 4px; }

.command-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding-left: 5px;
  margin-top: -8px;
}

.command-item {
  padding: 3px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.command-item img {
  width: 32px;
  height: 32px;
  object-fit: contain;
}

.command-item.active {
  background-color: #ff3b3b;
  box-shadow: 0 0 8px rgba(255, 0, 0, 0.5);
  transform: scale(1.08);
}

/* =========================================================
   💧 MARCA DE AGUA TECH HOME
========================================================= */

.watermark-techhome{
   position:absolute;
   inset:0;
   display:flex;
   justify-content:center;
   align-items:center;
   pointer-events:none;
   z-index:0;
}

.watermark-techhome img{
   width:240px;
   opacity:0.28;
   object-fit:contain;
   mix-blend-mode:multiply;
}

/* contenido encima del logo */
.command-list{
   position:relative;
   z-index:2;
}

/* =========================================================
   🗣️ HÁBLAME
   ========================================================= */

.hablame-container {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: #ffffff;
  border-radius: 6px;
  padding: 3px 8px;
  border: none;
  flex: 1;
}

.hablame-container .form-check-label {
  font-size: 1.05rem;
  font-weight: 600;
  color: #000000;
  cursor: pointer;
}

.hablame-container .form-check-input {
  width: 20px;
  height: 20px;
  cursor: pointer;
  border: 2px solid #000000;
  margin: 0;
}

/* =========================================================
   🔤 LOGO TEXTO
   ========================================================= */

/* CONTENEDOR */
.logo-text {
  font-family: 'Bungee', sans-serif;
  font-size: 38px;
  letter-spacing: 3px;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin: -10px auto 30px auto;
  transform: scaleY(1.7);
  perspective: 500px;
}

/* EDU */
.logo-edu {
  color: #cc0000;
  transform: scaleX(1.17);
  display: inline-block;
}

/* BOT */
.logo-bot {
  color: #000000;
  transform: scaleX(1.1);
  display: inline-block;
}

/* ICONO */
.logo-icon {
  width: 42px;
  height: 36px;
  object-fit: contain;
  margin: 0 6px;
  transform-style: preserve-3d;
  animation: girar3d 3s linear infinite;
}

/* ANIMACIÓN */
@keyframes girar3d {
  0%   { transform: rotateY(0deg); }
  25%  { transform: rotateY(90deg); }
  50%  { transform: rotateY(180deg); }
  75%  { transform: rotateY(270deg); }
  100% { transform: rotateY(360deg); }
}

.footer-copy {
  display: block;
  text-align: center;
  font-size: 10.5px;
  color: #555;
  font-family: Arial, sans-serif;

  margin-top: -10px;   /* 🔼 súbelo más */
  margin-bottom: 0;
  padding: 0;
  line-height: 10px;
}
/* =========================================================
   📲 TABLET GRANDE HORIZONTAL (1200×1300)
   ========================================================= */

@media (min-width: 1200px) and (max-width: 1300px) and (orientation: landscape) {

  /* Oculta el panel derecho fijo */
  .right {
    display: none !important;
  }

  .main-content {
    padding: 6px !important;
    height: 100vh !important;
    overflow: hidden !important;
    box-sizing: border-box !important;
    transform: none !important;
  }

  .layout {
    max-width: 100% !important;
    gap: 8px !important;
    align-items: center !important;
    justify-content: center !important;
    height: 100vh !important;
    overflow: hidden !important;
    padding: 0 70px !important;
    margin: 0 auto !important;
    display: flex !important;        /* ✅ asegura que sea flex */
  }
  .left {
    flex: 0 0 340px !important;
    max-width: 340px !important;
    height: calc(100vh - 20px) !important;
    align-self: center !important;
    overflow: hidden !important;
    background: #ffffff !important;
    border: 2px solid #000000 !important;
    box-shadow: 0 12px 30px rgba(0,0,0,0.18), 0 4px 10px rgba(0,0,0,0.12) !important;
    border-radius: 20px !important;
  }

   .center {
    flex: 0 0 auto !important;       /* ✅ era 1 1 auto, no se expande */
    min-width: 0 !important;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    overflow: hidden !important;
    padding: 0 !important;
    margin: 0 !important;
  }

  .center .mapa {
    max-width: 100% !important;
    max-height: 95vh !important;
    width: auto !important;
    height: auto !important;
    object-fit: contain !important;
    display: block !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  .left-panel {
    padding: 12px 10px !important;
    gap: 12px !important;
    display: flex !important;
    flex-direction: column !important;
  }

  .logo-text {
    font-size: 1.9rem !important;
    letter-spacing: 2px !important;
    transform: scaleY(1.2) !important;
    margin-bottom: 25px !important;
    margin-top: 8px !important;
  }

  .logo-text i {
    font-size: 1.3rem !important;
    margin-top: 4px !important;
  }

  .panel-inferior {
    height: 225px !important;
  }

  /* ── Botón flotante ── */
  .btn-flotante-right {
    display: flex !important;
    position: fixed;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 1000;
    width: 65px !important;       /* ✅ era 50px */
    height: 65px !important;      /* ✅ era 50px */
    border-radius: 50%;
    background: linear-gradient(135deg, #1a6fd4, #4da3ff) ;  
    color: #ffffff;
    border: none;
    cursor: pointer;
    align-items: center;
    justify-content: center;
	box-shadow: none;
    transition: background 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
  }

  .btn-flotante-right:hover {
    background: linear-gradient(135deg, #4da3ff, #1a6fd4) ;
    transform: translateY(-50%);
    box-shadow:none;  /* ✅ cambia esta línea */
  }

  .btn-flotante-right i {
    font-size: 28px !important;   /* ✅ era 22px */
    pointer-events: none;
  }

  /* ── Overlay oscuro ── */
  .overlay-right {
    display: block !important;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    z-index: 998;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.35s ease;
    backdrop-filter: blur(3px);
  }

  .overlay-right.abierto {
    opacity: 1;
    pointer-events: all;
  }

  /* ── Panel deslizable ── */
  .panel-right-slide {
    display: block !important;
    position: fixed;
    top: 50%;
    right: -600px;
    transform: translateY(-50%);
    width: 400px !important;
    height: 85vh;
    background: #ffffff !important;
    border: 1.5px solid rgba(0, 0, 0, 0.12) !important;
    border-radius: 24px;
    box-shadow:
      -10px 0 40px rgba(0, 0, 0, 0.15),
      0 0 0 1px rgba(0, 0, 0, 0.05) !important;
    z-index: 999;
    transition: right 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    overflow-y: auto;
    overflow-x: hidden;
    box-sizing: border-box;
    padding: 24px 16px 20px 16px;
    scrollbar-width: thin;
  }

  .panel-right-slide p,
  .panel-right-slide span,
  .panel-right-slide div,
  .panel-right-slide label {
    font-size: 16px !important;
  }

  .panel-right-slide.abierto {
    right: 83px;
  }

  .panel-right-slide::-webkit-scrollbar { width: 4px; }
  .panel-right-slide::-webkit-scrollbar-track { background: transparent; }
  .panel-right-slide::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.2) !important;
    border-radius: 4px;
  }

  .panel-right-slide * {
    color: #000000 !important;
    border-color: rgba(0, 0, 0, 0.15) !important;
  }



  .panel-right-slide .btn {
      
    background: rgba(0, 0, 0, 0.06) !important;
  }
    
  .panel-right-slide button {
    font-size: 14px !important;
    padding: 6px 14px !important;
    border: 1.5px solid #000000 !important;
  }
    
    .panel-right-slide input[type="checkbox"] {
    width: 18px !important;
    height: 18px !important;
  }

  .panel-right-slide .btn:hover {
      
    background: rgba(0, 0, 0, 0.12) !important;
  }

  .btn-cerrar-panel {
    position: absolute;
    top: 14px;
    left: 14px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    border: 1.5px solid rgba(255, 255, 255, 0.25) !important;
    color: #ffffff !important;
    font-size: 15px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease, transform 0.2s ease;
  }

  .btn-cerrar-panel:hover {
    background: rgba(204, 0, 0, 0.55);
    transform: scale(1.1);
  }
    
    .combo-principal {
    margin-bottom: 20px !important;  /* ✅ sube este número al gusto */
  }
    
    .botones-row {
    margin-bottom: 20px !important;  /* ✅ sube este número al gusto */
  }
    
    .control-box {
    margin-bottom: 15px !important;  /* ✅ sube este número al gusto */
  }
    
    .panel-inferior {
    height: 220px !important;  /* ✅ era 225px, sube al gusto */
  }
    
  .control-grid-3x3 {
    grid-template-columns: repeat(3, 70px) !important;  /* ✅ era 44px */
    grid-template-rows: repeat(3, 70px) !important;     /* ✅ era 44px */
    column-gap: 12px !important;
    row-gap: 10px !important;
  }
    
    .command-item img {
    width: 42px !important;   /* ✅ era 32px, sube al gusto */
    height: 42px !important;
  }

}



/* =========================================================
   📲 TABLET VERTICAL GRANDE (800×1280)
   ========================================================= */
@media (min-width: 750px) and (max-width: 850px) and (orientation: portrait) {

  body {
    background: #f0f0f0;
  }

  .main-content {
    padding-top: -60px !important;
    align-items: flex-start !important;
  }

  .layout {
    margin-top: -460px !important;
    flex-direction: column !important;
    align-items: center !important;
    gap: 20px !important;
  }

  .left,
  .center {
    width: 92% !important;
    max-width: 720px !important;
  }
    
    .right {
    display: none !important;
    position: fixed !important;
  }

  .botones-row .btn {
    font-size: 15px !important;
    padding: 9px 10px !important;
  }

  .botones-row .btn i {
    font-size: 17px !important;
  }

  .control-grid-3x3 {
    grid-template-columns: repeat(3, 90px) !important;
    grid-template-rows: repeat(3, 90px) !important;
  }
    
    .command-item img {
    width: 45px !important;
    height: 45px !important;
  }

  .panel-inferior {
    height: 180px !important;
  }
    
    /* ── Botón flotante ── */
  .btn-flotante-right {
    display: flex !important;
    position: fixed;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 1000;
    width: 70px !important;
    height: 70px !important;
    border-radius: 50%;
    background: linear-gradient(135deg, #1a6fd4, #4da3ff);
    color: #ffffff;
    border: none;
    cursor: pointer;
    align-items: center;
    justify-content: center;
    box-shadow: none;
    transition: background 0.3s ease, transform 0.3s ease;
  }

  .btn-flotante-right:hover {
    background: linear-gradient(135deg, #4da3ff, #1a6fd4);
    transform: translateY(-50%);
  }
    
    .btn-flotante-right i {
    font-size: 30px !important;
    pointer-events: none;
  }

  /* ── Overlay oscuro ── */
  .overlay-right {
    display: block !important;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    z-index: 998;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.35s ease;
    backdrop-filter: blur(3px);
  }
    
    .overlay-right.abierto {
    opacity: 1;
    pointer-events: all;
  }

  /* ── Panel deslizable ── */
  .panel-right-slide {
    display: block !important;
    position: fixed;
    top: 50%;
    right: -600px;
    transform: translateY(-50%);
    width: 480px !important;
    height: 60vh !important;
    background: #ffffff !important;
    border: 1.5px solid rgba(0, 0, 0, 0.12) !important;
    border-radius: 24px;
    box-shadow:
      -10px 0 40px rgba(0, 0, 0, 0.15),
      0 0 0 1px rgba(0, 0, 0, 0.05) !important;
    z-index: 999;
    transition: right 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    overflow-y: auto;
    overflow-x: hidden;
    box-sizing: border-box;
    padding: 24px 16px 20px 16px;
    scrollbar-width: thin;
  }
    
     .panel-right-slide.abierto {
    right: 100px;
  }

  .panel-right-slide::-webkit-scrollbar { width: 4px; }
  .panel-right-slide::-webkit-scrollbar-track { background: transparent; }
  .panel-right-slide::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.2) !important;
    border-radius: 4px;
  }
    
    .panel-right-slide * {
    color: #000000 !important;
    border-color: rgba(0, 0, 0, 0.15) !important;
  }

    
    
  .panel-right-slide p,
  .panel-right-slide span,
  .panel-right-slide div,
  .panel-right-slide label {
    font-size: 16px !important;
  }

    .panel-right-slide button {
    font-size: 14px !important;
    padding: 6px 14px !important;
    border: 1.5px solid #000000 !important;
  }

  .panel-right-slide .btn {
    background: rgba(0, 0, 0, 0.06) !important;
  }

  .panel-right-slide .btn:hover {
    background: rgba(0, 0, 0, 0.12) !important;
  }
    
.panel-right-slide input[type="checkbox"] {
    width: 18px !important;
    height: 18px !important;
  }

}

/* =========================================================
   📱 CELULAR
   ========================================================= */

@media (max-width: 749px) and (orientation: portrait),
       (max-width: 767px) and (orientation: landscape) {

  .layout {

    flex-direction: column;
    align-items: center;
    gap: 20px;
  }

  .left,
  .center {
    width: 95%;
    max-width: 500px;
  }

  .left {
    margin-top: 30px;
  }

  /* Oculta el panel derecho fijo */
  .right {
    display: none !important;
    position: fixed !important;
  }

  /* ── Botón flotante ── */
  .btn-flotante-right {
    display: flex !important;
    position: fixed;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 1000;
    width: 50px !important;
    height: 50px !important;
    border-radius: 50%;
    background: linear-gradient(135deg, #1a6fd4, #4da3ff);
    color: #ffffff;
    border: none;
    cursor: pointer;
    align-items: center;
    justify-content: center;
    box-shadow: none;
    transition: background 0.3s ease, transform 0.3s ease;
  }

  .btn-flotante-right:hover {
    background: linear-gradient(135deg, #4da3ff, #1a6fd4);
    transform: translateY(-50%);
  }

  .btn-flotante-right i {
    font-size: 22px !important;
    pointer-events: none;
  }

  /* ── Overlay oscuro ── */
  .overlay-right {
    display: block !important;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    z-index: 998;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.35s ease;
    backdrop-filter: blur(3px);
  }

  .overlay-right.abierto {
    opacity: 1;
    pointer-events: all;
  }

  /* ── Panel deslizable ── */
  .panel-right-slide {
    display: block !important;
    position: fixed;
    top: 50%;
    right: -600px;
    transform: translateY(-50%);
    width: 78vw !important;       /* se adapta al ancho del celular */
    max-width: 360px !important;
    height: 75vh !important;
    background: #ffffff !important;
    border: 1.5px solid rgba(0, 0, 0, 0.12) !important;
    border-radius: 24px;
    box-shadow:
      -10px 0 40px rgba(0, 0, 0, 0.15),
      0 0 0 1px rgba(0, 0, 0, 0.05) !important;
    z-index: 999;
    transition: right 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    overflow-y: auto;
    overflow-x: hidden;
    box-sizing: border-box;
    padding: 24px 16px 20px 16px;
    scrollbar-width: thin;
  }

  /* Abierto: deja un pequeño margen al botón flotante */
  .panel-right-slide.abierto {
    right: 68px;
  }

  .panel-right-slide::-webkit-scrollbar { width: 4px; }
  .panel-right-slide::-webkit-scrollbar-track { background: transparent; }
  .panel-right-slide::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.2) !important;
    border-radius: 4px;
  }

  .panel-right-slide * {
    color: #000000 !important;
    border-color: rgba(0, 0, 0, 0.15) !important;
  }


  .panel-right-slide p,
  .panel-right-slide span,
  .panel-right-slide div,
  .panel-right-slide label {
    font-size: 15px !important;
  }

  .panel-right-slide button {
    font-size: 13px !important;
    padding: 6px 12px !important;
    border: 1.5px solid #000000 !important;
  }

  .panel-right-slide .btn {
    background: rgba(0, 0, 0, 0.06) !important;
  }

  .panel-right-slide .btn:hover {
    background: rgba(0, 0, 0, 0.12) !important;
  }

  .panel-right-slide input[type="checkbox"] {
    width: 18px !important;
    height: 18px !important;
  }

  /* ── Botón cerrar dentro del panel ── */
  .btn-cerrar-panel {
    position: absolute;
    top: 14px;
    left: 14px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    border: 1.5px solid rgba(0, 0, 0, 0.25) !important;
    color: #000000 !important;
    font-size: 15px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease, transform 0.2s ease;
  }

  .btn-cerrar-panel:hover {
    background: rgba(204, 0, 0, 0.55);
    transform: scale(1.1);
  }

}

/* =========================================================
   🔘 BOTÓN FLOTANTE + PANEL DESLIZABLE (tablet pequeña horizontal)
   ========================================================= */

.btn-flotante-right,
.panel-right-slide,
.overlay-right {
  display: none;
}

@media (min-width: 768px) and (max-width: 932px) and (orientation: landscape) {

  /* Oculta el panel derecho fijo del layout */
  .right {
    display: none !important;
  }

  /* Quita fondo, borde y sombra solo del centro */
  .center {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
  }

  /* El layout — juntos y centrados */
  .layout {
    gap: 10px !important;
    max-width: 100% !important;
    padding: 0 6px !important;
    margin: 0 !important;
    align-items: center !important;
    justify-content: center !important;
    height: 100vh !important;
    overflow: hidden !important;
  }

  /* Panel izquierdo — con bordes, altura completa, empujado a la derecha */
  .left {
    flex: 0 0 250px !important;
    max-width: 250px !important;
    overflow: hidden !important;
    background: #ffffff !important;
    border: 2px solid #000000 !important;
    box-shadow: 0 12px 30px rgba(0,0,0,0.18), 0 4px 10px rgba(0,0,0,0.12) !important;
    border-radius: 20px !important;
    height: calc(100vh - 20px) !important;
    align-self: center !important;
    margin-left: 70px !important;
  }

  /* Centro — ocupa el resto sin pasarse */
  .center {
    flex: 1 1 auto !important;
    min-width: 0 !important;
    max-width: calc(100vw - 220px - 80px) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
    overflow: hidden !important;
    padding: 0 !important;
    margin: 0 !important;
  }

  /* El mapa no se sale */
  .center .mapa {
    max-width: 100% !important;
    max-height: 95vh !important;
    width: auto !important;
    height: auto !important;
    object-fit: contain !important;
    display: block !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  /* main-content sin padding extra */
  .main-content {
    padding: 6px !important;
    height: 100vh !important;
    overflow: hidden !important;
    box-sizing: border-box !important;
  }

  /* Panel izquierdo interno */
  .left-panel {
    padding: 12px 10px !important;
    gap: 12px !important;
    display: flex !important;
    flex-direction: column !important;
  }

  .logo-text {
    font-size: 1.3rem !important;
    letter-spacing: 1px !important;
    margin-bottom: 4px !important;
    margin-top: 8px !important;
    transform: scaleY(1.3) !important;
  }

  .logo-text i {
    font-size: 1.3rem !important;
    margin-top: 2px !important;
  }

  .combo-principal {
    margin-top: -8px !important;
    font-size: 11px !important;
    padding: 3px 6px !important;
  }

  .botones-row {
    margin-top: -19px !important;
  }

  .botones-row .btn {
    font-size: 10px !important;
    padding: 3px 5px !important;
  }

  .hablame-container {
    padding: 2px 4px !important;
  }

  .hablame-container .form-check-label {
    font-size: 0.72rem !important;
  }

  .hablame-container .form-check-input {
    width: 13px !important;
    height: 13px !important;
  }

  .control-grid-3x3 {
    grid-template-columns: repeat(3, 54px) !important;
    grid-template-rows: repeat(3, 54px) !important;
    column-gap: 8px !important;
    row-gap: 6px !important;
  }

  .panel-inferior {
    height: 190px !important;
    padding: 8px !important;
  }

  .btn-guia,
  [class*="btn-guia"],
  .botones-row .btn:first-child {
    margin-top: 6px !important;
    margin-right: 6px !important;
  }

  /* ── Botón flotante ── */
  .btn-flotante-right {
    display: flex !important;
    position: fixed;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 1000;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, #1a6fd4, #4da3ff);
    color: #ffffff;
    border: none;
    cursor: pointer;
    align-items: center;
    justify-content: center;
    box-shadow: none;
    transition: background 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
  }

  .btn-flotante-right:hover {
    background: linear-gradient(135deg, #4da3ff, #1a6fd4);
    transform: translateY(-50%);
    box-shadow: none;
  }

  .btn-flotante-right i {
    font-size: 22px;
    pointer-events: none;
  }

  /* ── Overlay oscuro ── */
  .overlay-right {
    display: block !important;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    z-index: 998;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.35s ease;
    backdrop-filter: blur(3px);
  }

  .overlay-right.abierto {
    opacity: 1;
    pointer-events: all;
  }

  /* ── Panel deslizable ── */
  .panel-right-slide {
    display: block !important;
    position: fixed;
    top: 50%;
    right: -500px;
    transform: translateY(-50%);
    width: 380px;
    height: 86vh;
    background: #ffffff !important;
    border: 1.5px solid rgba(0, 0, 0, 0.12) !important;
    border-radius: 24px;
    box-shadow:
      -10px 0 40px rgba(0, 0, 0, 0.15),
      0 0 0 1px rgba(0, 0, 0, 0.05) !important;
    z-index: 999;
    transition: right 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    overflow-y: auto;
    overflow-x: hidden;
    box-sizing: border-box;
    padding: 24px 16px 20px 16px;
    scrollbar-width: thin;
  }

  .panel-right-slide.abierto {
    right: 68px;
  }

  /* ── Scrollbar del panel ── */
  .panel-right-slide::-webkit-scrollbar {
    width: 4px;
  }

  .panel-right-slide::-webkit-scrollbar-track {
    background: transparent;
  }

  .panel-right-slide::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.2) !important;
    border-radius: 4px;
  }

  /* ── Contenido dentro del panel ── */
  .panel-right-slide * {
    color: #000000 !important;
    border-color: rgba(0, 0, 0, 0.15) !important;
  }

  .panel-right-slide .btn {
    background: rgba(0, 0, 0, 0.06) !important;
  }

  .panel-right-slide .btn:hover {
    background: rgba(0, 0, 0, 0.12) !important;
  }

  .panel-right-slide button {
    font-size: 14px !important;
    padding: 6px 14px !important;
    border: 1.5px solid #000000 !important;
  }

  .panel-right-slide input[type="checkbox"] {
    width: 18px !important;
    height: 18px !important;
  }

  .panel-right-slide p,
  .panel-right-slide span,
  .panel-right-slide div,
  .panel-right-slide label {
    font-size: 16px !important;
  }

  /* ── Botón cerrar dentro del panel ── */
  .btn-cerrar-panel {
    position: absolute;
    top: 14px;
    left: 14px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    border: 1.5px solid rgba(0, 0, 0, 0.25) !important;
    color: #000000 !important;
    font-size: 15px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease, transform 0.2s ease;
  }

  .btn-cerrar-panel:hover {
    background: rgba(204, 0, 0, 0.55);
    transform: scale(1.1);
  }

}

/* =========================================================
   📲 TABLET PEQUEÑA VERTICAL (582×931)
   ========================================================= */

@media (min-width: 500px) and (max-width: 749px) and (orientation: portrait) {

  .main-content {
    padding-top: 5px !important;
    align-items: flex-start !important;
  }

  .layout {
    margin-top: 2px !important;
    flex-direction: column !important;
    align-items: center !important;
    gap: 20px !important;
  }

  .left,
  .center {
    width: 95% !important;
    max-width: 500px !important;
  }
  
    .right {
  display: none !important;
  position: fixed !important;
}
    
    
    /* ── Botón flotante ── */
  .btn-flotante-right {
    display: flex !important;
    position: fixed;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 1000;
    width: 55px !important;
    height: 55px !important;
    border-radius: 50%;
    background: linear-gradient(135deg, #1a6fd4, #4da3ff);
    color: #ffffff;
    border: none;
    cursor: pointer;
    align-items: center;
    justify-content: center;
    box-shadow: none;
    transition: background 0.3s ease, transform 0.3s ease;
  }

  .btn-flotante-right:hover {
    background: linear-gradient(135deg, #4da3ff, #1a6fd4);
    transform: translateY(-50%);
  }

  .btn-flotante-right i {
    font-size: 24px !important;
    pointer-events: none;
  }

  /* ── Overlay oscuro ── */
  .overlay-right {
    display: block !important;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    z-index: 998;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.35s ease;
    backdrop-filter: blur(3px);
  }

  .overlay-right.abierto {
    opacity: 1;
    pointer-events: all;
  }

  /* ── Panel deslizable ── */
  .panel-right-slide {
    display: block !important;
    position: fixed;
    top: 50%;
    right: -600px;
    transform: translateY(-50%);
    width: 400px !important;
    height: 70vh !important;
    background: #ffffff !important;
    border: 1.5px solid rgba(0, 0, 0, 0.12) !important;
    border-radius: 24px;
    box-shadow:
      -10px 0 40px rgba(0, 0, 0, 0.15),
      0 0 0 1px rgba(0, 0, 0, 0.05) !important;
    z-index: 999;
    transition: right 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    overflow-y: auto;
    overflow-x: hidden;
    box-sizing: border-box;
    padding: 24px 16px 20px 16px;
    scrollbar-width: thin;
  }

  .panel-right-slide.abierto {
    right: 75px;
  }

  .panel-right-slide::-webkit-scrollbar { width: 4px; }
  .panel-right-slide::-webkit-scrollbar-track { background: transparent; }
  .panel-right-slide::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.2) !important;
    border-radius: 4px;
  }

  .panel-right-slide * {
    color: #000000 !important;
    border-color: rgba(0, 0, 0, 0.15) !important;
  }

  .panel-right-slide p,
  .panel-right-slide span,
  .panel-right-slide div,
  .panel-right-slide label {
    font-size: 16px !important;
  }

  .panel-right-slide button {
    font-size: 14px !important;
    padding: 6px 14px !important;
    border: 1.5px solid #000000 !important;
  }

  .panel-right-slide .btn {
    background: rgba(0, 0, 0, 0.06) !important;
  }

  .panel-right-slide .btn:hover {
    background: rgba(0, 0, 0, 0.12) !important;
  }

  .panel-right-slide input[type="checkbox"] {
    width: 18px !important;
    height: 18px !important;
  }


  /* Botón guía más angosto en tablet */
#btnGuia{
   width: 42px !important;
   min-width: 42px !important;
   padding-left: 0 !important;
   padding-right: 0 !important;
}

}

/* =========================================================
   BOTON GUIA Y COMBO DEL ROBOT
   ========================================================= */

#btnGuia {
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border-radius: 10px;
  border: 1.5px solid #111111;
  background: #ffffff;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
  transition: all 0.2s ease;
  cursor: pointer;
}

#btnGuia:hover {
  background: #f8fafc;
  box-shadow: 0 2px 6px rgba(0,0,0,0.15);
  transform: translateY(-1px);
}

#btnGuia:active {
  transform: translateY(0px);
  box-shadow: 0 1px 2px rgba(0,0,0,0.08);
}

#btnGuia i {
  font-size: 16px;
  color: #111111;
}

#comboRobot {
  height: 38px;
  padding: 0 32px 0 14px;
  border-radius: 10px;
  border: 1.5px solid #111111;
  background: #ffffff;
  color: #111111;
  font-size: 13px;
  font-weight: 600;
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
  transition: all 0.2s ease;
  outline: none;
}

#comboRobot:hover {
  background: #f8fafc;
  box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}

#comboRobot:focus {
  box-shadow: 0 0 0 3px rgba(0,0,0,0.12);
}

#comboRobot option {
  font-size: 14px;
  font-weight: 500;
  color: #111111;
  background: #ffffff;
  padding: 10px 14px;
}

#comboRobot option:hover,
#comboRobot option:checked {
  background: #f1f5f9;
  color: #111111;
}



#modalGuia .modal-body::-webkit-scrollbar { width: 6px; }
#modalGuia .modal-body::-webkit-scrollbar-track { background: #f1f1f1; border-radius: 10px; }
#modalGuia .modal-body::-webkit-scrollbar-thumb { background: #111; border-radius: 10px; }
#modalGuia .modal-body::-webkit-scrollbar-thumb:hover { background: #444; }