.html{
    width: 100vw;
    background-color: #FFF;
    border-color:  #888;
    font-family: helvetica;
    font-size: 14px;
    margin:0px;
    padding: 0px;
    height: 100%;
}

body{
    height: 100%;
    width: 100vw;
    background-color: #EEE;
    color: #555;;
    overscroll-behavior: contain;
    margin:0px;
    padding: 0px;
}

.erro {
    color: #AA0800;
}

.campo_errado
{
    background-color: #FFD2BA;
}

div.erro_servidor{
    margin: 50px auto;
    color: #990000;
    font-weight: bold;
}

.inline {
    display: inline !important;
}

.login{
    display:block; 
    background-color: #EEE;
    background-repeat: no-repeat;
    background-position: top;
    padding: 30px;
    height: 110px !important;
    width: 260px !important;
    left: 80px;
    top: 80px;
    box-shadow: 2px 2px 2px rgba(0, 0, 0, 0.3) !important;
    position: fixed;
    float: none;
    border-radius: 20px;
    background-color: gainsboro;
}

.changed {
  background-color: lightsalmon;
  transition: background-color 2s ease; /* smooth fade */
}

.registo-form {
    width: 640px;
    margin: 50px auto;
}
.registo-form form {
    margin-bottom: 15px;
    background: #f7f7f7;
    box-shadow: 0px 2px 2px rgba(0, 0, 0, 0.3);
    padding: 30px;
}
.registo-form h2 {
    margin: 0 0 15px;
}

.form-group label {
    color: #555;
    margin-bottom: 0px;
     margin-top: 5px;
}
.form-group input {
    border-radius: 5px;
    border: 1px solid lightgray;
    box-shadow: 0px 2px 2px rgba(0, 0, 0, 0.3);
    padding: 3px 5px 3px 5px;
        width: -webkit-calc(100% - 10px);
    width: -moz-calc(100% - 10px);
    width: calc(100% - 10px);
}
.btn-primary{color:#fff;background-color:#428bca;border-color:#357ebd; margin-top: 10px}
.btn-primary:hover,.btn-primary:focus,.btn-primary:active,.btn-primary.active,.open>.dropdown-toggle.btn-primary
{
    color:#fff;background-color:#3071a9;border-color:#285e8e
}
.btn-primary:active,.btn-primary.active,.open>.dropdown-toggle.btn-primary{background-image:none}
.btn-primary.disabled,.btn-primary[disabled],fieldset[disabled] .btn-primary,.btn-primary.disabled:hover,.btn-primary[disabled]:hover,fieldset[disabled] .btn-primary:hover,.btn-primary.disabled:focus,.btn-primary[disabled]:focus,fieldset[disabled] .btn-primary:focus,.btn-primary.disabled:active,.btn-primary[disabled]:active,fieldset[disabled] .btn-primary:active,.btn-primary.disabled.active,.btn-primary[disabled].active,fieldset[disabled] .btn-primary.active{
    background-color:#428bca;border-color:#357ebd
}

.btn{display:inline-block;padding:0;margin-bottom:0;font-size:14px;font-weight:400;line-height:40px;text-align:center;white-space:nowrap;vertical-align:middle;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;background-image:none;border:1px solid transparent;border-radius:4px;height:40px;min-height:40px}

#start{
    cursor: pointer;
}
.navbar{
    line-height: 1;
background-image: url('../images/bg_topgrad.png');
background-repeat: repeat-x;
color: white;
}


.navbar-default .navbar-nav > .active{
    color: #000;
    background: transparent;
}
.navbar-default .navbar-nav > .active > a,
.navbar-default .navbar-nav > .active > a:hover,
.navbar-default .navbar-nav > .active > a:focus {
    color: #000;
    background: transparent;
}

#container 
{
    margin-top: 60px;
}

.navbar-brand{
    background-image: url('../images/logo_joaps.png');
background-repeat: no-repeat;
width: 250px;
height: 55px;

}

.wrapper {
    margin: auto;
  display: grid;
  grid-gap: 1px;
  color: #444;
}

.wrapper_button {
    margin: auto;
    width: 125px;
  display: grid;
  grid-template-columns: 125px ;
  grid-gap: 1px;
  color: #444;
}


.separator{
    border-style: none dotted none dotted;
    border-width: 2px;
}
div.main_help{
    text-align: center;
    width: 100%;
}
.hand{
        cursor: pointer;
}

.hidden{
    display: none !important;
}

.topo {
   width: 100%;
   height: 40px;
   background-color: white;
}
.topo_logo 
{
   float: left;
   
    width: -webkit-calc(100% - 80px);
    width:    -moz-calc(100% - 80px);
    width:         calc(100% - 80px);
    
   height: 40px;
   color: black;
}
.logo 
{
   text-align: center;
   width: 100%;
   height: 40px;
   background-image: url('../images/logo_peq.jpg');
   background-position: center;
   background-repeat: no-repeat;
}

.topo_user 
{
   float: left;
   width: 40px;
   height: 40px;
   background-image: url('../images/user.png');
   background-position: center;
   background-repeat: no-repeat;
}

.topo_carrinho 
{
   float: right;
   width: 40px;
   height: 40px;
   background-image: url('../images/shop_bag_peq.png');
   background-position: center;
   background-repeat: no-repeat;
}

.resumo_carrinho 
{
   width: 36px;
   height: 20px;
   padding-top: 14px;
   text-align: center;
   vertical-align: middle;
   color: green;
}



.search_input
{
    background-color: #aaa;
    color: #333;
    margin-right: 10px;
    size: 15px;
}
.search_label{
    font-size: 80%;
    padding-right: 10px;
    padding-left: 10px;
}
.mimicLink
{
    color: #3979ad;
}


div.user_help{
    text-align: center;
    width: 100%;
    height: 20px;
    padding-top: 20px;
    font-weight: bold;
}

div.help_container {
    width: 90%;
    margin: auto;
    text-align: center;
    display:none;
}

div.help{
    text-align: center;
    font-size: 80%;
    float: left;
    width: 33%;
}

div.imprimir{
    
    background-image: url('../images/printer.png');
    background-position: center;
    background-repeat: no-repeat;
    width: 150px;
    height: 150px;
    margin: 50px auto;
}

div.consultar{
    
    width: 380px;
    margin: 50px auto;
    
}

div.consulta_lista{
    overscroll-behavior: contain;
    margin-left: 10px;
    margin-top: 10px;
    width: 450px;
    height: -webkit-calc(100vh - 105px);
    height:    -moz-calc(100vh - 105px);
    height:         calc(100vh - 105px);
    z-index: 1000;
    overflow-y: scroll;
    overflow-x:hidden;
    max-width: 460px;
}

.consulta_procura, .consulta_produto{
    width: 460px;
  text-align: center;
}

.codigo_documento, .referencia_produto{
    width: 250px;
  margin: auto;
}
div.inicio{
    
    background-image: url('../images/taxi_peq.png');
    background-position: center;
    background-repeat: no-repeat;
    width: 150px;
    height: 150px;
    margin: 50px auto;
    
}
div.pedido{
    position:absolute;
    
    height: -webkit-calc(100% - 30px);
    height:    -moz-calc(100% - 30px);
    height:         calc(100% - 30px);
    
    width: -webkit-calc(100% - 10px);
    width:    -moz-calc(100% - 10px);
    width:         calc(100% - 10px);
}
div.categorias{
    background-color: #333;
    overflow: auto;
    white-space: nowrap;
}

div.categoria{
    font-size: 12px;
    display: inline-block;
    color: white;
    text-align: center;
    padding-top: 5px;
    padding-left: 5px;
    padding-right: 5px;
    text-decoration: none;
    width: 100%;
    height: 25%;
    border-radius: 10px;
    border: 1px solid #888888;
    background: #73AD21;
    margin-bottom: 5px;
    background-image: linear-gradient(#CCCCCC, #FF8300);
}
label.categoria
{
    cursor: pointer;
    width: 100%;
    height: 20px;
}

div.opcao_menu label{
    
    clear: both;
    font-size: 12px;
    display: inline-block;
    color: white;
    text-align: center;
    padding-top: 22px;
    padding-left: 5px;
    padding-right: 5px;
    text-decoration: none;
    width: 300px;
    height: 60px;
    border-radius: 10px;
    border: 1px solid #888888;
    background: #73AD21;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 20px;
    background-image: linear-gradient(#CCCCCC, #48484C);
    cursor: pointer;
}

div.lista_mesas{
    height: -webkit-calc(100% - 100px);
    height:    -moz-calc(100% - 100px);
    height:         calc(100% - 100px);
    
}
div.mesa_voltar{
    display: flex;
    align-items: center;
    float: left;
    clear: both;
    color: black;
    background-image: linear-gradient(#3A78FF, #9BCDFF, #9BCDFF, #3A78FF);
    margin-bottom: 5px;
    margin-right: 5px;
    height: 15%;
    font-size: small;
    text-align: center;

    width: -webkit-calc(25% - 5px);
    width:    -moz-calc(25% - 5px);
    width:         calc(25% - 5px);
    
    border-radius: 10px;
    border: 1px solid #888888;
    
    text-align:center;

}

div.consulta{
    position:fixed;
    left: 0px;
    top: 0px;
    
    height: 100%; 
    width: 100%;
    
    z-index: 100;
}

.produto{
    margin-bottom: 5px;
    min-height: 30px;
    display: flex;
    align-items: center;
}

.lista_inventarios{

    margin-top: 20px;
    margin-left: 10px;
}


.inventario{
    
    background-image: linear-gradient(#006EFF, #0047A5);
    background-repeat: no-repeat;
    background-position: center;
    height: 60px;
    text-align: center;
    width: 400px;
    border: 1px solid #888888;
    border-radius: 15px;
    position: relative;
    line-height: 60px;
    cursor: pointer;
    color: white;
    margin-top: 20px;
    margin-left: 25px;
}

#msg_erro{
    color: red;
    font-weight: bold;
}

.codigo_barras
{
    width: -webkit-calc(100% - 10px);
    width:    -moz-calc(100% - 10px);
    width:         calc(100% - 10px);
}

div.codigo_produto{
    width: 100%;
    height: 100%;
    float: left;
    clear: left;
}


div.designacao_produto {
   width: 300px;
   height: 100%;
   float: left;
   clear: both;
   display: flex;
  align-items: center; 
}

div.unidade_produto {
   width: 50px;
   height: 100%;
   float: left;
   text-align: center;
}

.desc_produto{
    width: 100%;
    text-align: left;
    padding-left: 5px;
}

div.quantidade_produto {
   width: 80px;
   min-height: 30px;
   padding-top: 2px;
   float: right;
   text-align: right;
   display: contents;
}

.quant_produto{
    width: 65px;
}

div.linha_escolhida{
    background-color: orange;
}
div.insere_consumos{
    height: 30px;
    position: fixed;
    top: 10px;
    max-width: 460px;
    width: 100%;
}
div.header_produto {
    height: 28px;
    position: fixed;
    top: 50px;
    max-width: 460px;
    height: 20px;
    width: 460px;
    border-bottom: 1px dotted;
}
div.header_designacao_produto {
   width: 300px;
   height: 100%;
   float: left;
   clear: both;
   text-align: center;
margin-bottom: 5px;
}

div.header_unidade_produto {
   width: 50px;
   height: 100%;
   float: left;
   text-align: center;
margin-bottom: 5px;
}

div.header_quantidade_produto {
   width: 85px;
   float: right;
   text-align: center;
margin-bottom: 5px;
 height: 100%;
}


label.descricao_produto {
    text-align:center;
    width: 100%;
    line-height: 75px;


}
label.preco_produto {
    text-align:right;
    width: 100%;
    line-height: 70px;
    padding-right: 10px;
    background-color: rgba(0, 255, 255, 0.5);
    margin: 0px;
}

.lista_clientes, .lista_obras, .lista_fornecedores, .lista_viaturas{
    width: 100%;
}

div.painel_adicional{
    margin-left: 10px;
}
div.lista_opcoes{
    display: grid;
    grid-template-columns: 210px 210px;
    grid-gap: 5px;
}

div.opcoes{
    width: 210px;
    margin-top: 10px;
    margin-left: 15px;
}

div.opcao
{
    background-image: linear-gradient(#006EFF, #0047A5);
    background-repeat: no-repeat;
    background-position: center;
    margin-bottom: 5px;
    margin-right: 5px;
    height: 60px;
    text-align: center;
    width: 200px;
    border: 1px solid #888888;
    border-radius: 15px;
    position: relative;
    line-height: 60px;
    cursor: pointer;
    color: white;
}
label.opcao_lbl{
    cursor: pointer;
    
}

.teclado{
    padding-top: 70px;
    display: grid;
    grid-template-columns: 50px 50px 50px 50px;
    grid-gap: 6px;
    width: 230px;
    margin: auto;
    padding-bottom: 80px;
}

div.tecla_intro{
    cursor: pointer;
    text-align: center;
    line-height: 50px;
    float: left;
    color:white;
    width: 50px;
    height: 50px;
    margin: 8px;
    background-image: url('../images/tecla.png');
    background-size: 50px 50px;
    background-repeat: no-repeat;
}


.introducao_info{
    margin-top: 20px;
    height:100px;
    margin-left: 5px;
}
.introducao_produto_unidade, .introducao_produto_lote, .introducao_produto_stock {
    float: left;
    width: 33%;
}

.quant_introducao{
    width: 150px;
  height: 30px;
  font-size: 20px;
  text-align: center;
}
.introducao_quantidade {
    clear: both;
    margin: auto;
    width: 33%;
    text-align: center;
}

.introducao_info label{
    width: 100%;
display: inline-block;
}
.introducao_info div{

    height:60px;
}


.introducao{
  position: absolute;
  z-index: 9999;
  background-color: white;
  top: 0px;
  left: 0px;
  width: 480px;
  height: 100vh;
  overscroll-behavior: contain;
}

div.dados_doc{
    width: 440px;
    position: absolute;
    z-index: 9999;
    background-color: white;
    left: 10px;
    top: 50px;
    height: 250px;
    border-radius: 20px;
    border: 1px solid #555;
}

input.lista_clientes, input.lista_obras, input.lista_fornecedores{
    margin-top: 30px;
    width: 400px;
    background-color: #FFFCD8;
    border-radius: 5px;
    border: 1px solid orange;
    padding-left: 5px;
    font-size: 16px;
    color: black;
}

.lista_viaturas label{
    margin-top: 20px;
    width: 400px;
    display: inline-block;
}

.lista_viaturas select{
    width: 400px;
    background-color: #FFFCD8;
    border-radius: 5px;
    border: 1px solid orange;
    padding-left: 5px;
    font-size: 16px;
    color: black;
    
}

.resumo_doc_linha{
    width: 420px;
    text-align: center;
    border: solid 1px black;
    border-radius: 10px;
  margin-bottom: 8px;
  cursor: pointer;
  min-height: 38px;
  background-color: beige;
}

.doc_inferior{
    width: 450px;
    display: grid;
    grid-template-columns: 450px;
    text-align: center;
    margin-top: 5px;
    margin-bottom: 5px;
}

.doc_superior{
    width: 450px;
    display: grid;
    grid-template-columns: 140px 140px 140px;
    text-align: center;
}

.docs_linha, .docs_linha_header{
    width: 450px;
    display: grid;
    grid-template-columns: 90px 100px 90px 160px;
    text-align: center;
}

.detalhe_doc_linha{
    width: 450px;
    display: grid;
    grid-template-columns: 380px 50px;
    text-align: center;
    border-bottom: dotted 1px black;
  margin-bottom: 10px;
  cursor: pointer;
  min-height: 38px;
}

.resumo_doc_designacao{
    width: 380px;
    margin-bottom: 5px;
    font-weight: bold;
}

.resumo_doc_val{
    float: left;
    margin-bottom: 3px;
}
.resumo_doc_quant{
    float: right;
    text-align: right;
    width: 95px;
    margin-right: 20px;
}
 .resumo_doc_quant_conf{
    float: right;
    text-align: right;
    width: 95px;
    margin-right: 4px;
}

.resumo_doc_quant_lbl{
    width: 40px;
    display: inline-block;
  text-align: left;

}
.resumo_doc_quant_val, .resumo_doc_quant_val_conf{
    width: 50px;
    display: inline-block;
  text-align: right;
    font-weight: bold;
}

.check_30{
    width: 30px;
    height: 30px;
}
.clear{
    clear: both;
}
.detalhe_esq{
    width: 400px;
}


#loading{
    position: absolute;
    z-index: 999;
    width: 460px;
    height: 460px;
}
#loading_msg{
    position: relative; 
    width: 256px; 
    height: 256px; 
    
    background-image: url('../images/loading-orange.gif');
    background-repeat: no-repeat;
    background-position: center;
    background-size: 256px;
    margin: auto;
    padding-top: 100px;
}

.painel_principal{
    position:fixed;
    margin-top: 10px;
    height: -webkit-calc(100vh - 20px);
    height:    -moz-calc(100vh - 20px);
    height:         calc(100vh - 20px);
    
    width: 100%;
    max-width: 460px;
    z-index: 100;
    overflow-y: hidden;
    overflow-x:hidden;
}

div.lista_consumos{
    width: 100%;
    height: 100%;
}
div.consumos, div.menu{
    margin-left: 10px;
}

.transformacoes_produto{
    margin-top: 20px;
    height:100px;
    margin-left: 5px;
}
.transf_produto_quantidade, .transf_produto_armazem, .transf_produto_desperdicio {
    float: left;
    width: 33%;
}

.transformacoes_produto label{
    width: 100%;
display: inline-block;
}
.transformacoes_produto div{

    height:65px;
}

#produto_transf_destino{
    width: 440px;
}

#produto_transf_destino option{
    word-wrap: break-word;
}



.bold{
    font-weight: bold;
}
#armazem_origem, #armazem_destino{
    width:70px;
}

.actualizar {
    cursor: pointer;

    background-image: url('../images/search.png');
    background-repeat: no-repeat;
    background-position: right;
    background-color: transparent;
    width: 30px;
    height: 30px;
}

.botoes{
    text-align: center;
    cursor: pointer;
    background-image: linear-gradient(#006EFF, #0047A5);
    background-repeat: no-repeat;
    background-position: center;
    font-weight: bold;
    height: 40px;
    line-height: 40px;
    border-radius: 10px;
    color: white;
    border: 0px solid black;
}

.botao_login{
    width: 100%;
    margin-top: 10px;
}

div.gravar{
    width: 180px;  
    clear: none;
    float: right;
    margin-top: 30px;
    margin-bottom: 20px;
    margin-right: 20px;
}

.botoes label{
    width: 100%;
    cursor: pointer;
}

div.voltar{
    width: 180px;   
    clear: both;
    float: left;
    margin-top: 30px;
    margin-bottom: 20px;
    margin-left: 10px;
}

div.gravar_consulta{
    width: 180px;
    margin:10px auto 10px auto;
    position: absolute;
    bottom: 10px;
    right: 10px;
}

div.voltar_consulta{
    width: 180px;
    margin:10px auto 10px auto;
    position: absolute;
    bottom: 10px;
    left: 10px;
}

.docterceiro{
    margin-top: 20px;
    height:40px;
    margin-left: 5px;
}

.docterceiro label{
    width: 100%;
display: inline-block;
}
.docterceiro div{

    height:45px;
    float: left;
}
.docterceiro_info{
    width: 260px;
}
#docterceiro_val, #expedicao_val{
    width:250px;
}
.docterceiro_data{
    width: 140px;
    text-align: right;
}

.bold{
    font-weight: bold;
}
.font_larger{
    font-size: larger;
}

.centrado{
    text-align: center;
}


div.wrapper_consumos{
    overscroll-behavior: contain;
    width: 100%;
    height: -webkit-calc(100vh - 130px);
    height:    -moz-calc(100vh - 130px);
    height:         calc(100vh - 130px);
    z-index: 1000;
    overflow-y: scroll;
    overflow-x:hidden;
    position: fixed;
    top: 76px;
    max-width: 460px;
}

div.footer{
    width: 100%;
    position: fixed;
    bottom: 10px;
    max-width: 460px;
    height: 40px;
}
.fundo{
    position: absolute;
    bottom: 0;
}

.btn-gravar
{
    background-color: #31b0d5;
    border-color: #269abc;
    color: white;
    width: 150px;
    
    background-image: linear-gradient(#006EFF, #0047A5);
    background-repeat: no-repeat;
    background-position: center;
    font-weight: bold;
    border-radius: 10px;
    border: 0px solid black;
}

.btn-info-cancel
{

    color: white;
    width: 150px;
    
    background-image: linear-gradient( #ec7063 , #d50000);
    background-repeat: no-repeat;
    background-position: center;
    font-weight: bold;
    border-radius: 10px;
    border: 0px solid #aa0000;
}

.btn-intro
{
    background-color: #31b0d5;
    border-color: #269abc;
    color: white;
    width: 150px;
    
    background-image: linear-gradient(#006EFF, #0047A5);
    background-repeat: no-repeat;
    background-position: center;
    font-weight: bold;
    border-radius: 10px;
    border: 0px solid black;
    margin-right: 10px;
}

.btn-intro-cancel
{

    color: white;
    width: 150px;
    
    background-image: linear-gradient( #ec7063 , #d50000);
    background-repeat: no-repeat;
    background-position: center;
    font-weight: bold;
    border-radius: 10px;
    border: 0px solid #aa0000;
    margin-left: 10px;
}

.btn-elimina-linha{
    color: white;
    width: 150px;
    
    background-image: linear-gradient( #ec7063 , #d50000);
    background-repeat: no-repeat;
    background-position: center;
    font-weight: bold;
    border-radius: 10px;
    border: 0px solid #aa0000;
}

.btn-nif
{
    background-color: orange;
    border-color: orangered;
    color: white;
    width: 100%;
}

.impressao{
    font-family: "Courier New", Arial;
}

.loading_small
{
    margin-top: 25px;
}

.lbl_cliente{
    display: block;
}

.box {
  color: #444;
  border-radius: 5px;
  padding: 5px;
  text-align: center;
  margin-top: 1px;
}


.negative {
    color: #B71B00;
}

.positive {
    color: #2E8227;
}

.boxheader {
  background-color: #EEE;
  color: #000;
  border-radius: 5px;
  padding: 5px;
  text-align: center;
  cursor: pointer;
}


.hide{
    display: none !important;
}

.show{
    display: block !important;
}

#btn_submit
{
    margin-top: 10px;
    margin-bottom: 10px;
}

.login-form {
    width: 340px;
    margin: 50px auto;
    }
.login-form form {
    margin-bottom: 15px;
    background: #f7f7f7;
    box-shadow: 0px 2px 2px rgba(0, 0, 0, 0.3);
    padding: 30px;
}
.login-form h2 {
    margin: 0 0 15px;
}
.form-control {
    min-height: 22px;
    margin-bottom: 4px;
}
.btn {
    min-height: 40px;
    margin-bottom: 4px;
}
.form-control{

        border-radius: 2px;
}
.btn {        
    font-size: 15px;
    font-weight: bold;
    width: 100%;
}

.form-control_label {
    display: block;
    width: 100%;
    height: 28px;
    padding: 2px 6px;
    font-size: 14px;
    line-height: 1.42857143;
    color: #555;
    background-image: none;
    border: 1px solid #ccc;
    border-radius: 4px;
    -webkit-box-shadow: inset 0 1px 1px rgba(0,0,0,.075);
    -webkit-transition: border-color ease-in-out .15s,-webkit-box-shadow ease-in-out .15s;
    -o-transition: border-color ease-in-out .15s,box-shadow ease-in-out .15s;
    transition: border-color ease-in-out .15s,box-shadow ease-in-out .15s;
}

/* Modern visual refresh */
:root {
    --bg: #f4f6fb;
    --panel: #ffffff;
    --panel-alt: #f8faff;
    --text: #172033;
    --muted: #5d6980;
    --primary: #2f6bff;
    --primary-dark: #1f54d9;
    --danger: #d93f5a;
    --danger-dark: #b62d4a;
    --border: #dbe3f1;
    --shadow: 0 10px 28px rgba(21, 36, 66, 0.14);
}

html,
body {
    min-height: 100vh;
    min-height: 100dvh;
}

body {
    background: linear-gradient(180deg, #eef3ff 0%, var(--bg) 100%);
    color: var(--text);
    font-family: "Segoe UI", Arial, Helvetica, sans-serif;
    -webkit-font-smoothing: antialiased;
}

.painel_principal {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 18px;
    box-shadow: var(--shadow);
    width: calc(100% - 20px);
    max-width: 460px;
    left: 50%;
    transform: translateX(-50%);
    margin-top: 10px;
    height: calc(100vh - 20px);
    height: calc(100dvh - 20px);
}

div.consumos,
div.menu {
    margin-left: 0;
}

div.lista_opcoes {
    padding: 14px;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

div.opcoes {
    width: auto;
    margin: 0;
}

div.opcao {
    width: 100%;
    height: 66px;
    margin: 0;
    line-height: 66px;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    background-image: linear-gradient(180deg, var(--primary) 0%, var(--primary-dark) 100%);
    transition: transform 0.12s ease, box-shadow 0.12s ease;
}

div.opcao:active {
    transform: translateY(1px);
}

label.opcao_lbl {
    font-weight: 600;
    letter-spacing: 0.2px;
}

.codigo_barras,
.form-control,
input.lista_clientes,
input.lista_obras,
input.lista_fornecedores,
.lista_viaturas select {
    border-radius: 12px;
    border: 1px solid var(--border);
    background: var(--panel-alt);
    color: var(--text);
    box-shadow: none;
    min-height: 42px;
    padding: 8px 12px;
}

.codigo_barras:focus,
.form-control:focus,
input.lista_clientes:focus,
input.lista_obras:focus,
input.lista_fornecedores:focus,
.lista_viaturas select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(47, 107, 255, 0.15);
}

div.insere_consumos {
    top: 4px;
    left: 10px;
    width: calc(100% - 20px);
    max-width: 440px;
    height: 34px;
    padding-top: 0;
}

.produto_header {
    height: 40px;
    margin-top: 10px;
}

div.header_produto {
    top: 50px;
    left: 10px;
    width: calc(100% - 20px);
    max-width: 440px;
    border-bottom: 1px solid var(--border);
    color: var(--muted);
    height: 18px;
}

div.wrapper_consumos {
    top: 70px;
    left: 10px;
    width: calc(100% - 20px);
    max-width: 440px;
    bottom: 58px;
    height: auto;
    padding-right: 4px;
    padding-bottom: 6px;
}

div.footer {
    left: 10px;
    width: calc(100% - 20px);
    max-width: 440px;
    bottom: 8px;
    height: 46px;
}

.produto,
.resumo_doc_linha,
.detalhe_doc_linha,
.docs_linha {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(25, 40, 74, 0.08);
    padding-top: 1px;
    padding-bottom: 1px;
}

div.linha_escolhida {
    background-color: #e8f0ff;
    border-color: #a7c0ff;
}

.quant_produto {
    width: 74px;
    text-align: right;
    border-radius: 8px;
    border: 1px solid var(--border);
    min-height: 32px;
    padding: 2px 6px;
}

.btn-gravar,
.btn-intro,
.btn-info-gravar-validacao {
    width: 156px;
    min-height: 40px;
    border-radius: 12px;
    border: 0;
    background-image: linear-gradient(180deg, var(--primary) 0%, var(--primary-dark) 100%);
    box-shadow: 0 8px 16px rgba(47, 107, 255, 0.3);
}

.btn-info-cancel,
.btn-intro-cancel,
.btn-elimina-linha {
    width: 156px;
    min-height: 40px;
    border-radius: 12px;
    border: 0;
    background-image: linear-gradient(180deg, var(--danger) 0%, var(--danger-dark) 100%);
    box-shadow: 0 8px 16px rgba(217, 63, 90, 0.28);
}

.btn-gravar:active,
.btn-info-cancel:active,
.btn-intro:active,
.btn-intro-cancel:active,
.btn-elimina-linha:active {
    transform: translateY(1px);
}

.consulta_procura,
.consulta_produto {
    width: 100%;
    padding: 8px 10px 0 10px;
}

.codigo_documento,
.referencia_produto {
    width: 100%;
    max-width: 300px;
}

div.consulta_lista {
    width: calc(100% - 20px);
    max-width: 440px;
    margin-left: 10px;
    margin-top: 4px;
    height: calc(100vh - 122px);
    height: calc(100dvh - 122px);
}

.resumo_doc_linha,
.docs_linha,
.docs_linha_header,
.detalhe_doc_linha,
.doc_superior,
.doc_inferior {
    width: 100%;
}

.resumo_doc_designacao {
    width: 100%;
}

.detalhe_esq {
    width: 100%;
}

.introducao {
    width: 100%;
    max-width: 460px;
    min-height: 100vh;
    min-height: 100dvh;
    border-radius: 18px;
    left: 50%;
    transform: translateX(-50%);
    right: auto;
}

.dados_doc {
    width: calc(100% - 20px);
    max-width: 440px;
    left: 10px;
    border-radius: 16px;
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
}

.teclado {
    padding-top: 12px;
    padding-bottom: 8px;
}

div.tecla,
div.tecla_intro {
    border-radius: 12px;
    background-image: linear-gradient(180deg, #53668a 0%, #344360 100%);
    box-shadow: 0 6px 12px rgba(25, 38, 66, 0.25);
    font-weight: 700;
}

.login {
    height: auto !important;
    width: calc(100% - 24px) !important;
    max-width: 210px;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    border-radius: 18px;
    border: 1px solid var(--border);
    box-shadow: var(--shadow) !important;
    background: var(--panel);
    padding: 20px;
}

@media (max-width: 420px) {
    div.lista_opcoes {
        grid-template-columns: 1fr;
    }

    .btn-gravar,
    .btn-info-cancel,
    .btn-intro,
    .btn-intro-cancel,
    .btn-elimina-linha {
        width: 156px;
    }
}

/* Micro-polish: readability + scanner workflow */
body,
label,
input,
button {
    font-size: 14px;
}

.opcao_lbl,
.botoes label,
.btn {
    font-weight: 700;
}

#codigo_barras,
#codigo_barras_transf,
#codigo_documento,
#referencia_produto {
    min-height: 34px;
    font-size: 15px;
    font-weight: 500;
    letter-spacing: 0.2px;
    border-width: 2px;
    border-color: #9eb3de;
    background: #fdfefe;
    padding-top: 2px;
    padding-bottom: 2px;
    box-sizing: border-box;
    margin-bottom: 4px;
}

#codigo_barras:focus,
#codigo_barras_transf:focus,
#codigo_documento:focus,
#referencia_produto:focus {
    border-color: #1f54d9;
    box-shadow: 0 0 0 4px rgba(31, 84, 217, 0.2);
}

.btn-gravar,
.btn-info-cancel,
.btn-intro,
.btn-intro-cancel,
.btn-elimina-linha,
.botoes {
    min-height: 40px;
    line-height: 40px;
}

/* Keep all action buttons at the same height */
.btn-gravar,
.btn-info-cancel,
.btn-intro,
.btn-intro-cancel,
.btn-elimina-linha,
.btn-cancel-inline,
.btn-dialog-ok,
.btn-dialog-cancel,
.app_dialog_actions .btn,
.elimina_linha .btn {
    height: 40px;
    min-height: 40px;
    line-height: 40px;
    box-sizing: border-box;
}

.check_30 {
    width: 36px;
    height: 36px;
}

.resumo_doc_quant_val,
.resumo_doc_quant_val_conf {
    font-size: 16px;
}

.desc_produto,
.resumo_doc_designacao {
    color: #0f1a30;
    font-weight: 600;
}

.header_designacao_produto label,
.header_unidade_produto label,
.header_quantidade_produto label,
.resumo_doc_quant_lbl {
    color: #3b4d6e;
    font-weight: 700;
}

div.wrapper_consumos,
div.consulta_lista {
    scrollbar-width: thin;
}

div.footer {
    padding-bottom: env(safe-area-inset-bottom);
}

.loading,
#loading_msg {
    filter: saturate(0.95) contrast(1.05);
}

.elimina_linha {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.elimina_linha .btn {
    width: 156px;
    margin: 0;
}

.btn-dialog-cancel {
    color: white;
    border: 0;
    border-radius: 12px;
    background-image: linear-gradient(180deg, var(--danger) 0%, var(--danger-dark) 100%);
    box-shadow: 0 8px 16px rgba(217, 63, 90, 0.28);
}

.btn-cancel-inline {
    color: white;
    border: 0;
    border-radius: 12px;
    background-image: linear-gradient(180deg, #6d7d98 0%, #4f5e78 100%);
    box-shadow: 0 8px 16px rgba(56, 72, 102, 0.24);
}

.btn-dialog-ok {
    color: white;
    border: 0;
    border-radius: 12px;
    background-image: linear-gradient(180deg, var(--primary) 0%, var(--primary-dark) 100%);
    box-shadow: 0 8px 16px rgba(47, 107, 255, 0.3);
}

.app_dialog {
    position: fixed;
    inset: 0;
    z-index: 12000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.app_dialog.hidden {
    display: none !important;
}

.app_dialog_backdrop {
    position: absolute;
    inset: 0;
    background: rgba(12, 21, 38, 0.45);
    backdrop-filter: blur(1px);
}

.app_dialog_panel {
    position: relative;
    width: calc(100% - 48px);
    max-width: 420px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 14px;
    box-shadow: var(--shadow);
    padding: 14px;
    max-height: 80vh;
    max-height: 80dvh;
    display: flex;
    flex-direction: column;
}

.app_dialog_title {
    font-size: 16px;
    font-weight: 700;
    color: #11203e;
    margin-bottom: 8px;
}

.app_dialog_message {
    font-size: 15px;
    color: #2b3c5f;
    white-space: pre-wrap;
    margin-bottom: 12px;
    line-height: 1.3;
    overflow-y: auto;
    flex: 1 1 auto;
    min-height: 0;
}

.app_dialog_actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

.app_dialog_actions .btn {
    width: 132px;
    min-height: 40px;
}

/* Rework introducao info area to keep quantity input above keypad */
.introducao_info {
    margin: 10px 10px 4px 10px;
    height: auto;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px 8px;
}

.introducao_info div {
    height: auto;
    float: none;
}

.introducao_produto_designacao {
    grid-column: 1 / -1;
}

.introducao_produto_unidade,
.introducao_produto_lote,
.introducao_produto_stock {
    width: auto;
}

.introducao_quantidade {
    grid-column: 1 / -1;
    width: 100%;
    clear: none;
    margin: 0;
}

.quant_introducao {
    width: min(190px, 100%);
    height: 40px;
    font-size: 20px;
    padding: 4px 10px;
    border-radius: 12px;
    border: 1px solid #b8c8e6;
    background: linear-gradient(180deg, #ffffff 0%, #f4f8ff 100%);
    color: #1a2a47;
    font-weight: 600;
    letter-spacing: 0.2px;
    box-shadow: inset 0 1px 2px rgba(17, 35, 71, 0.08), 0 2px 6px rgba(27, 52, 102, 0.08);
    outline: none;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}

.quant_introducao:focus {
    border-color: #2f6bff;
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(47, 107, 255, 0.18), inset 0 1px 2px rgba(17, 35, 71, 0.05);
}

/* Introducao keypad sizing and spacing */
.introducao .teclado {
    grid-template-columns: repeat(4, 58px);
    column-gap: 14px;
    row-gap: 12px;
    width: max-content;
    margin: 8px auto 0 auto;
    margin-bottom: 70px;
    padding-top: 8px;
    padding-bottom: 6px;
}

.introducao div.tecla_intro {
    width: 58px;
    height: 58px;
    line-height: 58px;
    margin: 0;
    background-size: 58px 58px;
    font-size: 22px;
}

/* More spacing between Cancelar/OK and width adjusted to fit */
.introducao .row {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 14px;
    margin-top: 12px;
}

.introducao .row > div {
    float: none !important;
    width: 148px !important;
    margin: 0 !important;
}

.introducao .btn-intro,
.introducao .btn-intro-cancel {
    width: 148px;
}

@media (prefers-contrast: more) {
    :root {
        --text: #0b1220;
        --muted: #24344f;
        --border: #9ab0d7;
    }

    .painel_principal,
    .produto,
    .resumo_doc_linha,
    .detalhe_doc_linha,
    .docs_linha {
        box-shadow: none;
        border-width: 2px;
    }
}

@media only screen 
  and (-webkit-min-device-pixel-ratio: 2)
  {

    div.wrapper_consumos {

        bottom: 58px;
        height: auto;
    }
   
}

