body {
    font-family: Arial, sans-serif;
    margin: 2em;
    background: #f5f5f5;
    text-align: left;
}
h1, label, #result, input, #teclado-numerico {
    text-align: left;
}
#result {
    background: #fff;
    padding: 1em;
    border-radius: 5px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    margin-top: 1em;
    display: block;
}
/* Eliminar el teclado numérico principal de la vista principal */
#teclado-numerico {
    display: none !important;
}

.teclado-flotante {
    display: grid;
    grid-template-columns: repeat(3,60px);
    gap: 10px;
    justify-content: center;
    margin-bottom: 1em;
}
.teclado-flotante button {
    font-size: 1.2em;
    padding: 0.5em 0;
}
label[for="codigoArticulo"] {
    margin-top: 0.7em;
    margin-bottom: 0;
    display: block;
}
#codigoArticulo {
    margin-top: 0;
    margin-bottom: 0.3em;
}
label[for="codbarra"] {
    margin-top: 0.7em;
    margin-bottom: 0;
    display: block;
}
#codbarra {
    margin-top: 0;
    margin-bottom: 0.3em;
}
#btnLeer {
    margin-left: 0.5em;
    font-size: 1em;
    padding: 0.4em 1em;
    vertical-align: middle;
}
#btnLeerCodBarra {
    margin-left: 0.5em;
    font-size: 1em;
    padding: 0.4em 1em;
    vertical-align: middle;
}
.popup-oculto {
    display: none;
}
.popup-contenido {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
    padding: 2em 2em 1em 2em;
    max-width: 320px;
    margin: 10vh auto;
    position: relative;
    text-align: center;
}
.popup-cerrar {
    position: absolute;
    top: 0.5em;
    right: 1em;
    font-size: 1.5em;
    cursor: pointer;
}
#popupLeer {
    position: fixed;
    left: 0; top: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.3);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
}
#popupLeerCodBarra {
    position: fixed;
    left: 0; top: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.3);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
}
#popupIngresarArticulo, #popupIngresarCodBarra {
    position: fixed;
    left: 0; top: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.3);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
}
