/* style.css
   Padrão visual aplicado em index.html, login.html, register.html, import_xml.html e futuros templates
*/

/* Reset e base */
body {
    font-family: 'Segoe UI', Arial, sans-serif;
    background: #f8fafc;
    margin: 0;
    padding: 0;
    min-height: 100vh;
}
/* Container larguinho em desktop, fluido em tablet/mobile */
.container {
  width: 95%;
  max-width: 920px; /* Aumentada para tabelas grandes */
  margin: 20px auto;
  background: #fff;
  padding: 20px;
  border-radius: 10px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
  box-sizing: border-box;
  text-align: center;      /* Alinha todo o conteúdo ao centro! */
}
/* Centraliza elementos internos que tenham display: block */
.container input[type="text"],
.container button,
.container label {
  display: block;
  margin-left: auto;
  margin-right: auto;
}

/* Novo wrapper para scroll horizontal em mobile, sem afetar centralização desktop */
.table-scroll-x {
  width: 100%;
  overflow-x: auto;
}

h2, h3 {
    text-align: center;
    color: #30436e;
}
form {
    display: flex;
    flex-direction: column;
}
label {
    margin: 10px 0 3px;
    font-weight: 500;
    color: #2a3142;
}
input[type="text"], input[type="password"], input[type="file"], input[type="email"], select {
    padding: 9px 12px;
    border: 1px solid #dbe2ea;
    border-radius: 4px;
    margin-bottom: 18px;
    font-size: 1rem;
    outline: none;
    transition: border-color .2s;
}
input[type="text"]:focus, input[type="password"]:focus, select:focus, input[type="file"]:focus {
    border-color: #30436e;
}
input[type="submit"] {
    padding: 12px;
    background: linear-gradient(90deg,#4666ff 0,#12c2e9 100%);
    color: #fff;
    border: none;
    border-radius: 4px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: background .2s;
}
input[type="submit"]:hover {
    background: linear-gradient(90deg,#30436e 0,#4666ff 100%);
}
a {
    color: #4a64d4;
    text-decoration: none;
    margin-top: 16px;
    display: inline-block;
    text-align: center;
}
a:hover { text-decoration: underline; }

p, li {
    font-size: 1rem;
    color: #3e495e;
}

ul {
    padding-left: 0;
    list-style: none;
    margin-bottom: 16px;
}

table {
    width: 100%;
    border-collapse: collapse;
    background: #f9fbfd;
    margin-top: 20px;
}
table th, table td {
    border: 1px solid #e3e8f0;
    padding: 8px 10px;
    text-align: left;
}
table th {
    background: #ecf1fa;
    color: #405083;
    font-size: 0.96rem;
}

/* Botão azul com gradiente leve, hover/focus mais escuro e texto branco */
.btn-azul {
    background: linear-gradient(90deg,#4666ff 0,#12c2e9 100%);
    color: #fff;
    font-weight: 600;
    border: none;
    border-radius: 4px;
    padding: 12px;
    width: 100%;
    font-size: 1rem;
    box-shadow: 0 2px 10px #0001;
    cursor: pointer;
    transition: background .2s;
}

.btn-azul {
  display: block;              /* Botão ocupa apenas o espaço do conteúdo */
  margin: 18px auto 0 auto;    /* Centraliza HORIZONTALMENTE onde quer que esteja */
  padding: 12px 28px;
  background: linear-gradient(90deg, #4666ff 0, #12c2e9 100%);
  color: #fff;
  border: none;
  border-radius: 4px;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: background .2s;
  min-width: 120px;
  max-width: 220px;             /* Nunca expande total mesmo se em containers extensos */
  text-align: center;
  box-shadow: 0 1px 5px rgba(48,91,169,0.07);
  width: auto !important;      /* Força override caso o botão herde width:100% */
}

/* Resposta visual no hover/focus */
.btn-azul:hover,
.btn-azul:focus {
  background: linear-gradient(90deg,#30436e 0,#4666ff 100%);
  color: #fff;
  outline: none;
}



.painel-totalizadores {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-around;
  align-items: center;
  background: #f2f4fa;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(48,91,169,0.07);
  padding: 16px 8px;
  margin: 18px 0 22px 0;
  max-width: 530px;
  margin-left: auto;
  margin-right: auto;
}

.painel-bloco {
  min-width: 120px;
  margin: 6px 0;
  display: flex;
  justify-content: center;
  align-items: center;
}
.label-total {
  font-weight: 500;
  font-size: 1.04em;
  margin-right: 5px;
}

/* Mobile: empilha blocos */
@media (max-width: 600px) {
  .painel-totalizadores {
    flex-direction: column;
    max-width: 90vw;
    padding: 14px 2vw;
  }
  .painel-bloco {
    min-width: unset;
    width: 100%;
    margin: 5px 0;
  }
}

/* Tabela bipagem responsiva: rola na horizontal se precisar */
.bipagem-tabela {
  width: 95%;
  max-width: 880px;
  margin: 20px auto 18px auto; /* Centraliza perfeitamente na .container */
  border-collapse: collapse;
  font-size: 1rem;
  background: #fff;
  min-width: 600px;
}

.bipagem-tabela th, .bipagem-tabela td {
  border: 1px solid #dee2e6;
  padding: 8px 14px;
  text-align: center;
  white-space: nowrap;
}

.bipagem-tabela th {
  background: #f5f7fa;
  font-weight: 600;
}

/* Responsividade mobile: scroll horizontal só quando necessário */
@media (max-width: 800px) {
  .container {
    max-width: 99vw;
    padding: 8vw 2vw 8vw 2vw;
  }
  .bipagem-tabela {
    min-width: 490px;
    width: 98vw;
  }
}


/* Bloco de resumo/cabeçalho, alinhado esquerda */
.resumo-nfe {
  text-align: left;
  margin-bottom: 28px;
  width: 100%;
}

.tabela-resumo-nfe {
  width: 100%;
  border-collapse: collapse;
  margin-top: 8px;
}

.tabela-resumo-nfe th {
  text-align: center;
  background: #f5f7fa;
  font-weight: 600;
}

.tabela-resumo-nfe td {
  text-align: left;
  padding: 6px 12px;
}

/* Bloco dos itens, centralizado/fluido */
.itens-nfe {
  text-align: center;
  width: 100%;
}

.tabela-itens-nfe {
  width: 100%;
  border-collapse: collapse;
  margin-top: 8px;
}

.tabela-itens-nfe th,
.tabela-itens-nfe td {
  text-align: center;
  padding: 8px 13px;
}
.tabela-itens-nfe th {
  background: #eaeefd;
  font-weight: 600;
}

/* Botão de Resetar Bipagem - destaque amarelo com aviso visual */
.btn-warning {
    background-color: #ffc107;
    color: #333;
    border: 2px solid #e0a800;
    font-weight: 600;
    transition: all 0.3s;
}

.btn-warning:hover {
    background-color: #e0a800;
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}
