#quoteFab {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 9998;
  border: 0;
  border-radius: 999px;
  padding: 14px 18px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 8px 24px #0002;
  background: var(--bordeaux, #7b1e2b);
  color: #fff;
}
#quoteFab:hover {
  background: var(--bordeaux-dark, #5d1520);
}
/* O botão Orçamento só aparece na aba Produtos (tab() em js/app.js) */
#quoteFab.fora-produtos {
  display: none;
}
@media (max-width: 640px) {
  .filters {
    display: flex !important;
    flex-direction: column !important;
    gap: 10px !important;
  }
  .filters input,
  .filters select {
    width: 100% !important;
    min-height: 48px !important;
    font-size: 16px !important;
    box-sizing: border-box;
  }
  #q {
    min-height: 48px !important;
    font-size: 16px !important;
  }
  #supplier {
    min-height: 48px !important;
    font-size: 16px !important;
    width: 100% !important;
  }
}
#quoteFab .badge {
  display: inline-flex;
  min-width: 22px;
  height: 22px;
  align-items: center;
  justify-content: center;
  border-radius: 99px;
  background: #fff;
  color: var(--bordeaux, #7b1e2b);
  margin-left: 6px;
}
#quotePanel {
  display: none;
  position: fixed;
  inset: 0;
  background: #0008;
  z-index: 9999;
  align-items: flex-end;
  justify-content: center;
}
#quotePanel.open {
  display: flex;
}
#quoteBox {
  width: min(980px, 100%);
  max-height: 92vh;
  overflow: auto;
  background: #fff;
  border-radius: 18px 18px 0 0;
  padding: 20px;
  box-sizing: border-box;
}
#quoteBox h2 {
  margin: 0 0 14px;
  font-weight: 800;
  color: var(--bordeaux, #7b1e2b);
}
/* Textos do orçamento em bordô: nº, nomes dos campos, valores e total */
.quote-number {
  font-weight: 800;
  margin: 4px 0 8px;
  color: var(--bordeaux, #7b1e2b);
}
.quote-money {
  color: var(--bordeaux, #7b1e2b);
  font-weight: 700;
}
.quote-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.quote-grid label {
  font-weight: 700;
  font-size: 13px;
  color: var(--bordeaux, #7b1e2b);
  text-align: center; /* caixas centralizadas */
}
.quote-grid input,
.quote-grid select,
.quote-grid textarea {
  display: block;
  margin-left: auto;
  margin-right: auto;
  color: #172033;
  width: calc(100% - 2cm); /* caixinhas 2 cm mais estreitas */
  box-sizing: border-box;
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: 9px;
  margin-top: 5px;
}
.quote-full {
  grid-column: 1/-1;
}
.quote-table {
  width: 100%;
  border-collapse: collapse;
  margin: 16px 0;
}
.quote-table th,
.quote-table td {
  padding: 9px;
  border-bottom: 1px solid #eee;
  text-align: left;
  font-size: 13px;
}
.quote-actions {
  display: flex;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 14px;
}
.quote-actions button:disabled {
  opacity: 0.6;
  cursor: wait;
}
.quote-actions button {
  padding: 11px 15px;
  border: 0;
  border-radius: 9px;
  cursor: pointer;
  font-weight: 700;
}
/* Fechar e Gerar pedido na cor bordô do sistema */
.quote-primary,
#quoteBox button.quote-primary {
  background: var(--bordeaux, #7b1e2b);
  color: #fff;
  border: 0;
  border-radius: 9px;
  padding: 11px 15px;
  font-weight: 700;
  cursor: pointer;
}
.quote-primary:hover {
  background: var(--bordeaux-dark, #5d1520);
}
/* Caixa de aviso do sistema (erro, confirmação e "produto adicionado"): bordô e no centro da tela */
.aviso-dialog {
  margin: auto;
  width: min(380px, calc(100vw - 32px));
  border: 0;
  border-top: 6px solid var(--bordeaux, #7b1e2b);
  border-radius: 14px;
  padding: 22px 22px 18px;
  text-align: center;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.25);
}
.aviso-dialog::backdrop {
  background: rgba(17, 24, 39, 0.45);
}
.aviso-ico {
  width: 44px;
  height: 44px;
  margin: 0 auto 8px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 24px;
  font-weight: 800;
  color: #fff;
  background: var(--bordeaux, #7b1e2b);
}
.aviso-titulo {
  margin: 0 0 6px;
  font-size: 18px;
  color: var(--bordeaux, #7b1e2b);
}
.aviso-texto {
  margin: 0 0 16px;
  color: #172033;
  font-size: 15px;
  line-height: 1.4;
}
.aviso-ok {
  min-width: 110px;
}
.aviso-botoes {
  display: flex;
  justify-content: center;
  gap: 10px;
}
.aviso-botoes button {
  min-width: 110px;
}
.aviso-texto[hidden] + .aviso-botoes {
  margin-top: 16px;
}
.quote-muted {
  background: #eee;
  color: #111;
}
.quote-total {
  text-align: center;
  font-size: 18px;
  font-weight: 800;
  color: var(--bordeaux, #7b1e2b);
}
@media (max-width: 640px) {
  #quoteFab {
    display: flex;
    align-items: center;
    justify-content: center;
    left: 12px;
    right: 12px;
    bottom: 12px;
    width: calc(100% - 24px);
    padding: 15px 18px;
    font-size: 16px;
  }
  #quoteBox {
    padding: 14px;
    max-height: 94vh;
    border-radius: 16px 16px 0 0;
  }
  #quoteBox h2 {
    font-size: 20px;
  }
  .quote-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .quote-full {
    grid-column: auto;
  }
  .quote-grid input,
  .quote-grid select,
  .quote-grid textarea {
    min-height: 48px;
    font-size: 16px;
    width: 100%;
  }
  .quote-table {
    display: block;
    overflow-x: auto;
    white-space: nowrap;
    font-size: 12px;
  }
  .quote-table th,
  .quote-table td {
    padding: 8px 6px;
  }
  .quote-product-img {
    width: 42px;
    height: 42px;
  }
  .quote-actions {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
  }
  .quote-actions button {
    min-height: 50px;
    font-size: 15px;
    width: 100%;
  }
  .quote-total {
    text-align: center;
    font-size: 17px;
    line-height: 1.5;
    margin-top: 10px;
  }
}
.quote-product-img {
  width: 48px;
  height: 48px;
  object-fit: contain;
  border-radius: 7px;
  background: #f5f6f8;
  vertical-align: middle;
}
.quote-color {
  font-weight: 700;
}
@media (max-width: 640px) {
  body {
    overflow-x: hidden;
  }
  .panel:first-of-type {
    padding: 12px !important;
  }
  .panel:first-of-type input,
  .panel:first-of-type select {
    min-height: 48px !important;
    font-size: 16px !important;
    box-sizing: border-box;
  }
}
