:root {
  --primary: #2563eb;
  --primary-dark: #1e40af;
  --text: #0f172a;
  --muted: #475569;
  --bg: #f8fafc;
  --card: #ffffff;
  --border: #e2e8f0;
  --success: #16a34a;
  --cor-principal: #3c8ebd;
  --brand-yellow: #f5b600;
  --roteiro-bg: #f0f7ff;
  --roteiro-border: #bfdeff;
  --roteiro-icon: #3b82f6;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body { margin: 0; font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, 'Helvetica Neue', Arial, 'Noto Sans', sans-serif; color: var(--text); background: radial-gradient(1200px 600px at 50% -20%, #e2e8f0, #cbd5e1) fixed; }

/* Centraliza o app e cria um "frame" de celular */
.viewport {
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.device {
  width: 380px;           /* largura comum (iPhone 12/13/14) */
  max-width: 100%;
  height: min(844px, 90vh); /* altura comum, limita em telas baixas */
  background: var(--bg);
  border: 6px solid #0b1220; /* borda como moldura do aparelho */
  border-radius: 25px;
  box-shadow: 0 30px 80px rgba(2, 6, 23, 0.35), 0 10px 20px rgba(2, 6, 23, 0.25);
  overflow: hidden;
  position: relative; /* garante que overlays absolutos fiquem dentro do device */
  display: flex;
  flex-direction: column;
}

/* Faz as telas preencherem a altura do "aparelho" */
#root { height: 100%; }

.screen {
  display: flex;
  flex-direction: column;
  min-height: 100%;
  padding: 24px;
}

/* Estilos para a tela de sincronização */
.container-sincronizacao {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 16px;
}

.card-sincronizacao {
  background-color: var(--card);
  border-radius: 8px;
  padding: 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.info-sincronizacao h2 {
  margin: 0 0 8px 0;
  font-size: 14px;
  font-weight: 600;
}

.info-sincronizacao p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.botao-sincronizar {
  background-color: var(--card);
  color: var(--cor-principal);
  border: 1px solid var(--cor-principal);
  border-radius: 4px;
  padding: 8px 16px;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
}

.botao-sincronizar:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

.botao-sincronizar-tudo {
  background-color: var(--cor-principal);
  color: white;
  border: none;
  border-radius: 4px;
  padding: 14px;
  font-weight: 500;
  cursor: pointer;
}

.botao-sincronizar-tudo:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

.texto-sincronizando {
  display: flex;
  align-items: center;
  gap: 8px;
}

.icone-girando {
  animation: girar 1s linear infinite;
}

@keyframes girar {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.centered {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.card {
  width: 100%;
  max-width: 420px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 24px;
  box-shadow: 0 10px 20px rgba(2, 6, 23, 0.05);
}

.title { font-size: 22px; font-weight: 700; margin: 0 0 8px 0; }
.subtitle { font-size: 14px; color: var(--muted); margin: 0 0 20px 0; }

.form { display: flex; flex-direction: column; gap: 12px; }
.label { font-size: 13px; color: var(--muted); }
.input {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: 5px;
  background: #fff;
  font-size: 14px;
}
.input:focus { outline: 2px solid rgba(37, 99, 235, 0.2); border-color: var(--primary); }

.button {
  padding: 10px 16px;
  background: var(--cor-principal);
  color: #fff;
  border: none;
  border-radius: 5px;
  font-weight: 600;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.button:active { transform: translateY(1px); }
.button.secondary { background: #0ea5e9; }
.button.success { background: var(--success); }
.button:disabled { opacity: 0.6; cursor: not-allowed; }

.row { display: flex; flex-direction: row; gap: 12px; }
.col { display: flex; flex-direction: column; gap: 12px; }

.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 4px 16px 4px;
}

.avatar {
  width: 36px; height: 36px; border-radius: 18px;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
}

.grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Estilos para a tela de Histórico de Pedidos */
.tela-historico-pedidos {
  padding: 0;
}

.conteudo-historico-pedidos {
  flex: 1;
  overflow-y: auto;
  padding: 10px;
}
.conteudo-historico-pedidos .nome-empresa {
  font-size: 13px;
    margin-bottom: 10px;
    color: #212121;
    font-weight: 600;
}

.conteudo-historico-pedidos .lista-pedidos {
  display: flex;
  flex-direction: column;
  gap: 6px;
  height: 90vh;
}

.conteudo-historico-pedidos .card-pedido {
  background-color: #fff;
  border-radius: 8px;
  padding: 10px;
  box-shadow:  0 2px 4px rgba(2, 6, 23, 0.03);
  display: flex;
  flex-direction: column;
  gap: 5px;
  border: 1px solid var(--border);
}

.conteudo-historico-pedidos .card-pedido .card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: bold;
}

.conteudo-historico-pedidos .card-pedido .numero-pedido {
    font-weight: 700;
    color: #0f172a;
    font-size: 14px;
}

.conteudo-historico-pedidos .card-pedido .status-pedido {
  border-radius: 5px;
  font-size: 0.75em;
  text-transform: uppercase;
}

.conteudo-historico-pedidos .card-pedido .status-aprovado {
  background-color: rgba(22, 163, 74, 0.125);
    color: rgb(22, 163, 74);
}

.conteudo-historico-pedidos .card-pedido .status-cancelado {
      background-color: rgba(220, 38, 38, 0.125);
    color: rgb(220, 38, 38);
}

.conteudo-historico-pedidos .card-pedido .status-entregue {
  background-color: #d1eeff;
  color: #1988cb;
}

.conteudo-historico-pedidos .card-pedido .card-body {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.conteudo-historico-pedidos .card-pedido .valor-total {   
  font-size: 15px;
  font-weight: bold;
  color: #16a34a;
  margin: 0;
}

.conteudo-historico-pedidos .card-pedido .detalhes-adicionais {
  display: flex;
  gap: 5px;
  color: #64748b;
  font-size: 11px;
  font-weight: 500;
}

.conteudo-historico-pedidos .card-pedido .detalhes-adicionais .lucide{
  width: 12px;
  height: 12px;
}

.conteudo-historico-pedidos .card-pedido .detalhes-adicionais span {
  display: flex;
  align-items: center;
  gap: 5px;
}

.conteudo-historico-pedidos .card-pedido .card-footer {
  display: flex;
  justify-content: space-between;
  color: #64748b;
    font-size: 11px;
    display: flex;
    align-items: center;
    gap: 3px;
}

.conteudo-historico-pedidos .card-pedido .card-footer span {    
  display: flex;
  align-items: center;
  gap: 5px;
}
.conteudo-historico-pedidos .card-pedido .card-footer .lucide {
  width: 12px;
  height: 12px;
}

.conteudo-historico-pedidos .motivo-cancelamento {
  font-weight: bold;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid #dfdfdf;
    margin-bottom: 0;
    font-size: 12px;
    color: #e53d40;
}

.tile {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Login visual to match reference */
.login-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin-top: 80px;
  margin-bottom: 24px;
  gap: 10px;
}
.logo-wordmark {
  font-weight: 800;
  letter-spacing: 0.5px;
  display: flex;
  align-items: baseline;
  gap: 8px;
}
.logo-norac { font-size: 42px; color: var(--cor-principal); line-height: 1; }
.logo-foods { font-size: 28px; color: var(--brand-yellow); line-height: 1; font-weight: 700; }
.login-title { font-size: 16px; color: #6b7280; font-weight: 600; margin-top: 20px; }

.logo-img { width: 130px; height: auto; display: block; }

.login-form { margin-top: 16px; display: flex; flex-direction: column; gap: 16px; }
.input-group { position: relative; }
.icon-button {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  padding: 6px;
  cursor: pointer;
  color: #64748b;
}
.version-footer {
  position: absolute;
  bottom: 12px;
  left: 0;
  right: 0;
  text-align: center;
  font-size: 12px;
  color: var(--muted);
  opacity: 0.55;
}
.tile-title { font-weight: 600; }
.tile-value { font-weight: 700; color: var(--primary-dark); }

/* Ícones Lucide */
.lucide { width: 22px; height: 22px; stroke: currentColor; }

/* Barra superior / Listagem de pedidos */
.barra-superior {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 56px;
  padding: 16px;
  background: var(--cor-principal);
  border-bottom: 1px solid var(--border);
}
.barra-esquerda, .barra-direita {
  display: flex; align-items: center; gap: 16px;
}
.titulo-barra { font-size: 18px; font-weight: 700; color: #fff; }
.botao-icone { background: transparent; border: none; color: #fff; cursor: pointer; padding: 4px; line-height: 0; }

.tela-pedidos { padding: 0; background: #f6f8fb; }
.conteudo-pedidos { padding: 12px 12px 80px 12px; height: 82vh; overflow: auto; }
.cartao-pedido {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px;
  margin: 6px 0;
  box-shadow: 0 2px 4px rgba(2,6,23,0.03);
}
.cartao-pedido .nome-cliente-acoes{
  display: flex;
  align-items: center; justify-content: space-between;     padding-bottom: 5px;
}
.cartao-pedido .nome-cliente-acoes .lucide{
  width: 19px;
  height: 19px
}
.cliente-total-pedidos {
  font-size: 12px;
  color: #64748b;
  font-weight: 500;
}
.pedido-topo { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.pedido-codigo { font-weight: 700; color: #0f172a; font-size: 14px; }
.pedido-acoes { display: flex; align-items: center; gap: 10px; }
.etiqueta-status { display: inline-flex; align-items: center; gap: 6px; padding: 3px 6px; border-radius: 999px; background: #e6f7eb; color: #0a7a2a; font-weight: 600; font-size: 11px; text-transform: uppercase; }
.etiqueta-status .lucide { width: 16px; height: 16px; }
.botao-kebab { background: transparent; border: none; color: #64748b; cursor: pointer; padding: 4px; line-height: 0; }
.pedido-cliente { color: #475569; font-size: 13px; }
.pedido-valor { margin-top: 4px; color: var(--cor-principal); font-weight: 700; font-size: 16px; }
.pedido-codigo-tipo {     font-size: 10px;
  color: #8b7d00;
  font-weight: 700;
  background: #edeba4;
  padding: 2px 7px;
  border-radius: 50px; }
  .pedido-codigo-tipo.tipo-venda { background: #f9cbcb;
    color: #c80205; }
  

/* Informações do pedido reorganizadas */
.pedido-info-principal {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 4px;
}

.pedido-valor { 
  color: var(--cor-principal); 
  font-weight: 700; 
  font-size: 16px; 
}

.pedido-quantidades {
  display: flex;
  gap: 8px;
}

.quantidade-item,
.quantidade-caixa {
  display: flex;
  align-items: center;
  gap: 3px;
  color: #64748b;
  font-size: 11px;
  font-weight: 500;
}

.quantidade-item .lucide,
.quantidade-caixa .lucide {
  width: 10px;
  height: 10px;
}

.pedido-info-secundaria {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 6px;
  gap: 8px;
}

.pedido-tipo {
  display: flex;
  align-items: center;
  gap: 4px;
  color: #475569;
  font-size: 11px;
}

.pedido-tipo .lucide {
  width: 12px;
  height: 12px;
}

.pedido-origem {
  color: #64748b;
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
}

.icone-sync {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
}

.icone-sync .lucide {
  width: 16px;
  height: 16px;
}

.pedido-data { 
  color: #64748b; 
  font-size: 11px; 
  display: flex; 
  align-items: center; 
  gap: 3px; 
}
.pedido-data .lucide { 
  width: 10px; 
  height: 10px; 
}
.botao-flutuante { position: absolute; right: 20px; bottom: 24px; width: 64px; height: 64px; border-radius: 32px; background: var(--cor-principal); color: #fff; border: none; display: flex; align-items: center; justify-content: center; box-shadow: 0 10px 20px rgb(115 115 115 / 35%); cursor: pointer; }

/* Dashboard melhorado */
.tela-dashboard { padding: 0; background: #f6f8fb; }
.conteudo-dashboard { padding: 16px;
    overflow-x: overlay;
    height: 80vh; }
.saudacao { margin-bottom: 20px; }
.saudacao-titulo { font-size: 14px; color: var(--muted); margin-bottom: 4px; }
.saudacao-nome { font-size: 20px; font-weight: 700; color: var(--text); }

/* Tela de Clientes */
.tela-clientes { padding: 0; background: #f6f8fb; }
.conteudo-clientes { padding: 12px 12px 80px 12px; }

.campo-busca {
  position: relative;
  display: flex;
  align-items: center;
}

.tela-dashboard .btn-roteiro{
  background-color: #fff;
  border: 1px solid var(--cor-principal);
  color: var(--cor-principal);  
}

.icone-busca {
  position: absolute;
  left: 12px;
  color: #64748b;
  width: 17px;
  height: 17px;
  z-index: 1;
}

.input-busca {
  width: 100%;
  padding: 12px 12px 12px 44px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  font-size: 13px;
  box-shadow: 0 2px 4px rgba(2,6,23,0.03);
}

.input-busca:focus {
  outline: none;
  border-color: var(--cor-principal);
  box-shadow: 0 0 0 3px rgba(200, 2, 5, 0.1);
}

.input-busca::placeholder {
  color: #94a3b8;
}

/* Lista de clientes */
.lista-clientes {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.cartao-cliente {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px;
  box-shadow: 0 2px 4px rgba(2,6,23,0.03);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.cliente-nome-acoes{
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.cliente-info {
  flex: 1;
  min-width: 0;
}

.cliente-nome {
  font-weight: 700;
  color: #0f172a;
  font-size: 13px;
  margin-bottom: 5px;
  line-height: 1.3;
}

.cliente-cnpj {
  color: #475569;
  font-size: 12px;
  margin-bottom: 4px;
  line-height: 1.4;
}

.cliente-endereco {
  color: #64748b;
  font-size: 12px;
  line-height: 1.4;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 6px;
}

.cliente-status-pagamento,
.cliente-status-aprovacao {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  padding: 3px 0;
  margin-top: 3px;
}

.cliente-status-pagamento i,
.cliente-status-aprovacao i {
  width: 14px;
  height: 14px;
}

.status-atraso {
  color: #e11d48;
}
.cliente-status-aprovacao .lucide, .cliente-status-pagamento .lucide{
  width: 13px;
  height: 13px;
}
.status-em-dia {
  color: #16a34a;
}

.status-aprovado {
  color: #16a34a;
}

.status-pendente {
  color: #f59e0b;
}

.cliente-acoes {
  flex-shrink: 0;
}

.botao-menu-cliente {
  background: transparent;
  border: none;
  color: #64748b;
  cursor: pointer;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.2s ease;
}

.botao-menu-cliente .lucide {
  width: 19px;
  height: 19px;
}

/* Estado sem resultados */
.sem-resultados {
  text-align: center;
  padding: 40px 20px;
  color: #64748b;
}

.icone-sem-resultados {
  width: 48px;
  height: 48px;
  margin: 0 auto 16px;
  color: #cbd5e1;
}

.texto-sem-resultados {
  font-size: 16px;
  color: #94a3b8;
}

/* Seletor de data */
.seletor-data {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-bottom: 12px;
  padding: 12px;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(2,6,23,0.03);
}
.botao-data {
  background: transparent;
  border: none;
  color: var(--cor-principal);
  cursor: pointer;
  padding: 8px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.botao-data:hover { background: #fef2f2; }
.data-atual {
  font-weight: 600;
  color: var(--text);
  font-size: 16px;
  min-width: 120px;
  text-align: center;
}

/* Cards melhorados */
.cards-container {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  margin-bottom: 20px;
  justify-content: space-between;
}
.card-metrica {
  background-color: #fff;
  padding: 14px;
  border-radius: 8px;
  text-align: center;
  border: 1px solid #eee;
}

/* Cards lado a lado com largura de 50% cada (menos o gap) */
.card-metrica:not(.full-width) {
  flex: 0 0 calc(50% - 10px);
}

/* Card de largura total */
.card-metrica.full-width {
  flex: 1 1 100%;
}

/* Responsividade para telas menores */
@media (max-width: 768px) {
  .card-metrica:not(.full-width) {
    flex: 1 1 100%;
  }
}
.card-icon {
  width: 48px;
  height: 48px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
  font-size: 24px;
}
.card-icon.liberados { background: #dcfce7; color: #16a34a; }
.card-icon.bloqueados { background: #fef2f2; color: var(--cor-principal); }

.card-valor {
  font-size: 22px;
  font-weight: 800;
  margin-bottom: 4px;
}
.card-valor.liberados { color: var(--cor-principal) }
.card-valor.bloqueados { color: #e11d48; }
.card-valor.sem-atendimento { color: #363636; }
.card-valor.fora-media { color: #f59e0b; }
.card-titulo {
  font-size: 13px;
  color: var(--muted);
  font-weight: 500;
}
.card-metrica.clicavel { cursor: pointer; transition: transform 120ms ease, box-shadow 120ms ease; }

/* Tabela de produtos */
.tabela-container {
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 3px rgba(2,6,23,0.2);
  margin-bottom: 20px;
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.tabela-container.clicavel {
  cursor: pointer;
}

.tabela-header {
  background: #f8fafc;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
}
.tabela-titulo {
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
}
.tabela {
  width: 100%;
  border-collapse: collapse;
}
.tabela th {
  background: #edf0f3;
  padding: 12px 8px;
  text-align: left;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  border-bottom: 1px solid var(--border);
}
.tabela td {
  padding: 12px 8px;
  font-size: 11px;
  border-bottom: 1px solid #f1f5f9;
}
.tabela tr:last-child td {
  border-bottom: none;
}
.tabela-total {
  background: #e7f8ee;
  font-weight: 600;
  color: #509a7d;
}
.col-produto { width: 25%; }
.col-qtd { width: 20%; text-align: center !important; }
.col-valor { width: 20%; text-align: center; }

/* Menu lateral */
.menu-sobreposicao {
  position: absolute; left: 0; right: 0; top: 0; bottom: 0; /* cobre somente o device */
  background: rgba(2, 6, 23, 0.45);
  display: flex;
  z-index: 30;
}
.menu-drawer {
  width: 280px; height: 100%; background: #fff; border-right: 1px solid var(--border);
  box-shadow: 0 14px 30px rgba(2,6,23,0.2);
  transform: translateX(-100%);
  transition: transform 200ms ease;
  z-index: 31;
  display: flex;
  flex-direction: column;
}
.menu-drawer.aberto { transform: translateX(0); }

.menu-header {
  padding: 24px 20px;
  border-bottom: 1px solid #f1f5f9;
  background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
}

.menu-logo {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 20px;
}

.menu-logo .logo-norac {
  font-size: 32px;
  font-weight: 800;
  color: var(--cor-principal);
  line-height: 1;
  letter-spacing: -0.5px;
}

.menu-logo .logo-foods {
  font-size: 20px;
  font-weight: 700;
  color: var(--brand-yellow);
  line-height: 1;
  margin-top: -2px;
}

.menu-user-info {
  text-align: center;
}

.user-name {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 4px;
}

.user-email {
  font-size: 14px;
  color: #64748b;
  font-weight: 500;
}

.menu-lista { 
  flex: 1;
  padding: 16px 12px; 
  display: flex; 
  flex-direction: column; 
  gap: 2px; 
}

.menu-item { 
  display: flex; 
  align-items: center; 
  gap: 16px; 
  width: 100%; 
  padding: 16px 20px; 
  border-radius: 8px; 
  background: transparent; 
  border: none; 
  text-align: left; 
  cursor: pointer; 
  color: #64748b; 
  font-weight: 500;
  font-size: 14px;
  transition: all 0.2s ease;
  position: relative;
}

.menu-item.ativo {
  background: var(--cor-principal);
  color: #fff;
  font-weight: 600;
}

.menu-item.ativo::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 4px;
  height: 24px;
  background: var(--cor-principal);
  border-radius: 0 2px 2px 0;
}

.menu-item .lucide {
  width: 19px;
  height: 19px;
  flex-shrink: 0;
}

.menu-footer {
  padding: 20px;
  border-top: 1px solid #f1f5f9;
  background: #f8fafc;
}

.menu-version {
  text-align: center;
  font-size: 12px;
  color: #94a3b8;
  font-weight: 500;
}

@media (min-width: 768px) {
  .grid { flex-direction: row; flex-wrap: wrap; }
  .tile { width: calc(50% - 6px); }
}

/* Estilos para a tela de detalhes dos produtos */
.tela-detalhes-produtos {
  padding: 0;
  overflow-y: auto;
  height: 100%;
}

.conteudo-detalhes-produtos {
  flex: 1;
  padding: 16px;
  overflow-y: auto;
  padding-bottom: 32px; /* Espaço extra para o resumo geral */
}

/* Seletor de data para a tela de detalhes */
.seletor-data {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-bottom: 16px;
  padding: 12px;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(2,6,23,0.03);
}

.empresa-container {
  background: var(--card);
  border-radius: 8px;
  margin-bottom: 16px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.empresa-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.empresa-header.clicavel {
  cursor: pointer;
}

.empresa-nome {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 700;
  font-size: 15px;
  color: #fff;
}

.icone-expandir {
  width: 20px;
  height: 20px;
  color: #fff;
  transition: transform 0.2s ease;
}
.empresa-Ateliê{
  background-color: #8bbd1f;
}
.empresa-Paderri{
  background-color: var(--brand-yellow);
}
.empresa-totais {
  display: flex;
  gap: 16px;
  font-size: 13px;
  color: #fff;
}

.total-caixas,
.total-itens {
  display: flex;
  align-items: center;
  gap: 4px;
  font-weight: 600;
}

.produtos-container {
  padding: 0;
  overflow-x: auto;
  border-radius: 0 0 12px 12px;
}

.tabela-detalhes {
  width: 100%;
  min-width: 680px; /* Largura mínima: 100+100+200+80+80+120 = 680px */
  border-collapse: collapse;
  font-size: 12px;
}

.tabela-detalhes th {
  background: #f8fafc;
  padding: 12px 8px;
  text-align: left;
  font-weight: 600;
  color: var(--text);
  border-bottom: 1px solid var(--border);
  font-size: 13px;
}

.tabela-detalhes td {
  padding: 12px 8px;
  border-bottom: 1px solid #f1f5f9;
  vertical-align: top;
}

.tabela-detalhes .col-grupo {
  font-weight: 600;

  min-width: 100px;
  width: 100px;
}

.tabela-detalhes .col-codigo {
  font-weight: 600;
  min-width: 100px;
  width: 100px;
}

.tabela-detalhes .col-descricao {
  min-width: 200px;
  width: 200px;
}

.tabela-detalhes .col-caixas,
.tabela-detalhes .col-qtd {
  text-align: center;
  min-width: 80px;
  width: 80px;
  font-weight: 600;
}

.tabela-detalhes .col-valor {
  text-align: right;
  min-width: 120px;
  width: 120px;
  font-weight: 600;
  color: var(--success);
}

.tabela-detalhes .tabela-total {
  background: #f8fafc;
  font-weight: 700;
  color: var(--text);
}

.tabela-detalhes .tabela-total td {
  border-top: 2px solid var(--border);
}

/* Estilos para a barra de rolagem horizontal */
.produtos-container::-webkit-scrollbar {
  height: 8px;
}

.produtos-container::-webkit-scrollbar-track {
  background: #f1f5f9;
  border-radius: 4px;
}

.produtos-container::-webkit-scrollbar-thumb {
  background: var(--cor-principal);
  border-radius: 4px;
}

/* Estilos para Firefox */
.produtos-container {
  scrollbar-width: thin;
}

/* Responsividade para telas pequenas */
@media (max-width: 400px) {
  .tabela-detalhes {
    font-size: 12px;
    min-width: 580px; /* Reduzir um pouco para mobile */
  }
  
  .tabela-detalhes th,
  .tabela-detalhes td {
    padding: 8px 4px;
  }
  
  .empresa-header {
    padding: 12px;
  }
  
  .empresa-nome {
    font-size: 16px;
  }
  
  .empresa-totais {
    font-size: 12px;
    gap: 12px;
  }
  
  .produtos-container::-webkit-scrollbar {
    height: 6px; /* Barra mais fina no mobile */
  }
}

/* Estilos para a totalização geral */
.totalizacao-geral {
  overflow: hidden;


  position: relative;
}

.totalizacao-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 15px 20px;
  background: linear-gradient(135deg, var(--cor-principal) 0%, #a50104 100%);
  color: white;
  font-weight: 800;
  font-size: 15px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

@keyframes shimmer {
  0%, 100% { transform: rotate(0deg); }
  50% { transform: rotate(180deg); }
}

.totalizacao-header i {
  width: 28px;
  height: 28px;
  color: white;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

.totalizacao-valores {
  margin-top: 15px;
  padding: 0 5px;

}

.totalizacao-item {
  display: flex;
  justify-content: space-between;
  line-height: 3;
  align-items: center;
}

.totalizacao-label {
  font-size: 13px;
  color: var(--muted);
  font-weight: 600;
  margin-bottom: 5px;
  text-transform: uppercase;
  letter-spacing: 1px;
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.totalizacao-label i {
  color: var(--cor-principal);
  opacity: 0.8;
}

.totalizacao-valor {
  font-size: 17px;
  font-weight: 900;
  color: var(--text);
  line-height: 1;
  margin-bottom: 4px;
  position: relative;
  z-index: 1;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.totalizacao-valor-destaque {
  color: var(--success);
  background: linear-gradient(135deg, var(--success) 0%, #10b981 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Responsividade para a totalização */
@media (max-width: 400px) {
  .totalizacao-geral {
    margin-top: 24px;

  }
  
  .totalizacao-valores {
    grid-template-columns: 1fr;
    gap: 20px;
    padding: 20px;
  }
  
  .totalizacao-header {
    padding: 20px 16px;
    font-size: 18px;
  }
  
  .totalizacao-header i {
    width: 24px;
    height: 24px;
  }
  
  .totalizacao-item {
    padding: 15px;
  }
  
  .totalizacao-valor {
    font-size: 28px;
  }
  
  .totalizacao-valor-destaque {
    font-size: 32px;
  }
  
  .totalizacao-label {
    font-size: 12px;
    letter-spacing: 0.8px;
  }
}

/* Menu de opções do cliente */
.overlay-menu {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 10px;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1000;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.menu-opcoes-cliente {
  background: #fff;
  border-radius: 16px 16px 0 0;
  width: 100%;
  max-width: 367px;
  box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.2);
  animation: slideUp 0.3s ease-out;
}

@keyframes slideUp {
  from {
    transform: translateY(100%);
  }
  to {
    transform: translateY(0);
  }
}

.menu-titulo {
  padding: 16px;
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  text-align: center;
  border-bottom: 1px solid var(--border);
}

.menu-opcoes {
  display: flex;
  flex-direction: column;
}

.opcao-menu {
  background: transparent;
  border: none;
  padding: 12px 20px;
  font-size: 15px;
  color: var(--text);
  text-align: left;
  cursor: pointer;
  transition: background-color 0.2s ease;
  border-bottom: 1px solid var(--border);
}

.opcao-menu:last-child {
  border-bottom: none;
}

.opcao-menu:hover {
  background: #f8fafc;
}

.opcao-menu:active {
  background: #f1f5f9;
}

.opcao-cancelar {
  color: #ef4444;
  font-weight: 500;
}

.opcao-cancelar:hover {
  background: #fef2f2;
}

.opcao-aprovar:hover {
  background: #f0fdf4;
}

/* Modal Component */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  animation: fadeIn 0.3s ease-out;
}

.modal-content {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  width: 90%;
  max-width: 340px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  animation: slideIn 0.3s ease-out;
}

.modal-header {
  padding: 20px;
  text-align: center;
}

.modal-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  margin-top: 5px;
}

.modal-subtitle {
  font-size: 14px;
  color: var(--muted);
}

.modal-body {
  flex-grow: 1;
  overflow-y: auto;
  color: var(--text);
  font-size: 15px;
  line-height: 1.6;
}

.modal-footer {
  display: flex;
  justify-content: center;
  padding: 0 16px 20px;
  gap: 10px;
}

.modal-button {
  padding: 10px 20px;
  border-radius: 4px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.modal-button-cancel {
  background: #e2e8f0;
  color: #475569;
  border: none;
}

.modal-button-confirm {
  background: var(--cor-principal);
  color: #fff;
  border: none;
}
.modal-button-confirm-aprovar{
  background: #1b85ad;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slideIn {
  from { transform: translateY(-20px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

/* Tela de Novo Cliente */
.tela-novo-cliente {
  background: var(--bg);
  padding: 0;
}

.botao-salvar-header {
  background: #fff;
  color: var(--cor-principal);
  border: none;
  border-radius: 6px;
  padding: 8px 16px;
  font-size: 14px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.botao-salvar-header:disabled {
  background: #94a3b8;
  cursor: not-allowed;
}

.botao-salvar-header:disabled:hover {
  background: #94a3b8;
}

/* Estilos para a tela de edição de cliente */
.tela-editar-cliente {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: var(--bg);
  padding: 0;
}

.conteudo-editar-cliente {
  flex: 1;
  padding: 16px;
  overflow-y: auto;
}

.secao-info, .secao-edicao {
  margin-bottom: 24px;
}

.titulo-secao-editar {
  display: flex;
  align-items: center;
  font-size: 18px;
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
  color: var(--cor-principal);
  font-weight: 600;
}

.titulo-secao-editar .icone-secao {
  margin-right: 8px;
}

.info-cliente-readonly {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 12px;
}

.campo-info-readonly {
  display: flex;
  flex-direction: column;
  margin-bottom: 8px;
}

.label-campo-readonly {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 4px;
}

.valor-campo-readonly {
  font-size: 16px;
  font-weight: 500;
  color: var(--text);
}

.botao-editar {
  background-color: var(--cor-principal);
  color: white;
  border: none;
  border-radius: 4px;
  padding: 8px 16px;
  font-size: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: background-color 0.2s;
}

.botao-editar:hover {
  background-color: #b00104;
}

.conteudo-novo-cliente {
  flex: 1;
  overflow-y: auto;
  padding: 0;
}

.conteudo-novo-cliente .card {
  margin: 0;
  border-radius: 0;
  box-shadow: none;
  border: none;
  background: transparent;
  height: 82vh;
  overflow-y: auto;
  padding: 20px;
}

.conteudo-novo-cliente .title {
  color: var(--text);
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 8px;
  text-align: center;
}

.conteudo-novo-cliente .subtitle {
  color: var(--muted);
  font-size: 14px;
  margin-bottom: 12px;
  line-height: 1.5;
}

.form-group {
  margin-bottom: 20px;
}

.form-group .label {
  font-weight: 600;
  color: var(--text);
  margin-bottom: 8px;
  display: block;
  font-size: 13px;
}

.form-group .input {
  border: 1px solid var(--border);
  border-radius: 5px;
  padding: 11px 16px;
  font-size: 13px;
  transition: border-color 0.2s ease;
  background: #fff;
}

.form-group .input:focus {
  border-color: var(--cor-principal);
  outline: none;
}

.form-group .input[readonly] {
  background: #f8fafc;
  color: var(--text);
  border-color: var(--border);
}

.form-group textarea.input {
  resize: vertical;
  min-height: 80px;
  font-family: inherit;
  line-height: 1.5;
}

.secao-busca {
  border-radius: 6px;
}

.titulo-secao {
  color: var(--cor-principal);
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 16px;
  text-align: center;
  padding-bottom: 8px;

}

.input-group {
  display: flex;
  gap: 12px;
  align-items: flex-end;
}

.input-group .input {
  flex: 1;
}

.input-group .button {
  white-space: nowrap;
  min-width: 100px;
  padding: 11px 16px;
  border-radius: 6px;
  font-weight: 600;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: background-color 0.2s ease;
  background: var(--brand-yellow);
  color: var(--text);
  border: none;
}

.input-group .button .lucide {
  width: 17px;
  height: 17px;
}

.input-group .button:hover {
  background: #e6a800;
}

.input-group .button:disabled {
  background: #94a3b8;
  color: #fff;
  cursor: not-allowed;
}

.erro-mensagem {
  color: var(--cor-principal);
  font-size: 13px;
  margin-top: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.erro-mensagem::before {
  font-size: 16px;
}

.dados-cliente {
  padding: 20px;
  border-radius: 6px;
  background: #fff;
  border: 1px solid var(--border);
}

.dados-cliente .subtitle {
  margin-bottom: 20px;
  font-weight: 700;
  color: var(--text);
  font-size: 16px;
  text-align: center;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--cor-principal);
}

.botoes-acoes {
  display: flex;
  justify-content: center;
  margin-top: 24px;
}

.botoes-acoes .button {
  padding: 12px 24px;
  border-radius: 6px;
  font-weight: 600;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: background-color 0.2s ease;
  background: var(--brand-yellow);
  color: var(--text);
  border: none;
  min-width: 140px;
}

.botoes-acoes .button:hover {
  background: #e6a800;
}

.spinner {
  animation: spin 1s linear infinite;
  width: 16px;
  height: 16px;
}

@keyframes spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

/* Responsividade para telas menores */
@media (max-width: 400px) {
  .input-group {
    flex-direction: column;
    align-items: stretch;
  }
  
  .input-group .button {
    min-width: auto;
  }
  
  .botoes-acoes {
    flex-direction: column;
  }
  
  .conteudo-novo-cliente .card {
    padding: 16px;
  }
  
  .dados-cliente {
    padding: 16px;
  }
  
  .botao-salvar-header {
    padding: 6px 12px;
    font-size: 13px;
  }
}

/* Estilos para a tela de edição de pedido */
.tela-editar-pedido {
  background-color: #f8fafc;
  padding: 24px 20px;
  height: 90vh;
  overflow-y: auto;
}

.tela-editar-pedido .barra-superior {
  
  color: var(--cor-principal);
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-radius: 0;
  margin: -24px -24px 0 -24px;
}

.tela-editar-pedido .titulo-barra {
  font-weight: 600;
  font-size: 18px;
  color: #fff
}

/* .tela-editar-pedido .botao-icone {
  color: var(--cor-principal);
  background: transparent;
  border: none;
} */

.tela-editar-pedido .botao-salvar {
  background-color: var(--cor-principal);
  color: white;
  border: 1px solid white;
  border-radius: 6px;
  padding: 8px 16px;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.conteudo-editar-pedido {
  padding: 10px 0;
  flex: 1;
  overflow-y: auto;
  margin-right: -10px;
}

/* Estilos para a tela de roteiros de clientes */
.tela-roteiros-clientes .conteudo-roteiros {
  padding: 16px;
  overflow-y: auto;
  height: calc(100% - 60px);
}

.tela-roteiros-clientes .dias-semana {
  margin-bottom: 20px;
}

.tela-roteiros-clientes .lista-dias {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 10px;
  justify-content: space-around;
}

.tela-roteiros-clientes .botao-dia {
  padding: 5px 10px;
  background-color: #fff;
  border: 1px solid #ededed;
  border-radius: 8px;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s ease;
  color: var(--cor-principal);
}

.tela-roteiros-clientes .botao-dia.selecionado {
  background-color: var(--cor-principal);
  color: white;
  border-color: var(--cor-principal);
  font-weight: 500;
}

.tela-roteiros-clientes .clientes-do-dia {
  margin-top: 20px;
}

.tela-roteiros-clientes .lista-clientes {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 15px;
}

.card-cliente-roteiro {
  margin-bottom: 12px;
  border-left: 4px solid var(--cor-primaria);
}

.tela-roteiros-clientes .carregando,
.tela-roteiros-clientes .sem-clientes {
  padding: 20px;
  text-align: center;
  color: #666;
  background-color: #f9f9f9;
  border-radius: 8px;
  margin-top: 15px;
}

.secao-itens,
.secao-detalhes,
.secao-resumo {
  background-color: white;
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 16px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}
.secao-status-pedido {
  padding: 12px;
  border-radius: 8px;
  background-color: #f8d7da;
}

.secao-status-pedido .status-tag {
  padding: 6px 10px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.secao-itens {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid #e2e8f0;
}
.info-empresa{
  margin-bottom: 10px;
}

.item-pedido {
  border-bottom: 1px solid #e2e8f0;
  padding-bottom: 12px;
  margin-bottom: 12px;
}

.item-pedido:last-child {
  border-bottom: none;
  margin-bottom: 0;
}

.botao-editar-item,
.botao-excluir-item {
  width: 29px;
  height: 29px;
  border: none;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: opacity 0.2s ease;
}

.botao-editar-item {
  background-color: #d5ffbf;
  color: #377f12;
}

.botao-editar-item:hover {
  opacity: 0.8;
}

.botao-excluir-item {
  background-color: #fbdcdc;
  color: #e06868;
}

.botao-excluir-item:hover {
  opacity: 0.8;
}

.botao-adicionar-produtos {
  background-color: #fff;
  color: var(--cor-principal);
  border: none;
  border-radius: 8px;
  padding: 10px 16px;

  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 13px;
  cursor: pointer;
  margin-top: 8px;
  border: 1px solid var(--cor-principal);
}

/* Responsividade para a tela de edição */
@media (max-width: 400px) {
  .conteudo-editar-pedido {
    padding: 12px;
  }
  
  .info-empresa,
  .secao-itens,
  .secao-detalhes,
  .secao-resumo {
    padding: 12px;
    margin-bottom: 12px;
  }
  
  .tela-editar-pedido .barra-superior {
    padding: 10px 12px;
  }
  
  .tela-editar-pedido .titulo-barra {
    font-size: 16px;
  }
}

/* Estilos para a Tela de Seleção de Produtos */
.tela-selecao-produtos {
  background-color: #f1f5f9;
  padding: 0;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.tela-selecao-produtos .informacoes-impostos{
  display: flex;
  justify-content: space-between;
  font-size: 12px;
}

/* Estilos para os controles de seleção em massa */
.controles-selecao-massa {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 15px;
  background-color: #f8f9fa;
  border-bottom: 1px solid #dee2e6;
  margin-bottom: 15px;
}

.selecao-info {
  font-size: 14px;
  color: #6c757d;
  font-weight: 500;
}

.acoes-selecao-massa {
  display: flex;
  gap: 10px;
}

.botao-selecionar-todos {
  padding: 8px 12px;
  background-color: #6c757d;
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  transition: background-color 0.2s;
}

.botao-selecionar-todos:hover {
  background-color: #5a6268;
}

.botao-adicionar-selecionados {
  padding: 6px 9px;
  background-color: #28a745;
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  transition: background-color 0.2s;
}

.botao-adicionar-selecionados:hover:not(:disabled) {
  background-color: #218838;
}

.botao-adicionar-selecionados:disabled {
  background-color: #6c757d;
  cursor: not-allowed;
  opacity: 0.6;
}

/* Estilos para os checkboxes de seleção */
.card-produto {
  position: relative;
}

.selecao-produto {
  position: absolute;
  top: 2px;
  left: 2px;
  z-index: 10;
}

.checkbox-selecao {
  width: 17px;
  height: 17px;
  cursor: pointer;
  accent-color: #007bff;
}

/* Ajuste no layout dos cards para acomodar o checkbox */
.card-produto {
  padding-left: 35px;
}

/* Responsividade */
@media (max-width: 768px) {
  .controles-selecao-massa {
    flex-direction: column;
    gap: 10px;
    align-items: stretch;
  }
  
  .acoes-selecao-massa {
    justify-content: center;
  }
  
  .botao-selecionar-todos,
  .botao-adicionar-selecionados {
    flex: 1;
    min-width: 120px;
  }
}

.status-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 16px;
  background-color: #f8fafc;
  font-size: 12px;
  font-weight: 600;
  color: #1e293b;
}

.status-icons {
  display: flex;
  gap: 4px;
  align-items: center;
}

.header-selecao-produtos {
  display: flex;
  align-items: center;
  padding: 16px;
  background-color: var(--cor-principal);
  border-bottom: 1px solid #e2e8f0;
  height: 56px;
}

.botao-voltar {
  background: none;
  border: none;
  padding: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
}

.titulo-selecao {
  flex: 1;
  text-align: center;
  font-size: 18px;
  font-weight: 700;
  color: #fff;
  margin-left: -40px; /* Compensa o botão voltar */
}

.barra-busca {
  padding: 16px;
}

.input-busca {
  width: 100%;
  padding: 10px 16px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  font-size: 13px;
  background-color: white;
}

.input-busca:focus {
  outline: none;
  border-color: var(--cor-principal);
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1);
}

.lista-produtos {
  flex: 1;
  overflow-y: auto;
  padding: 0 16px 16px 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.card-produto {
  display: flex;
  flex-direction: column;
  background-color: white;
  border-radius: 8px;
  padding: 12px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  gap: 12px;
}

.produto-imagem {
  flex-shrink: 0;
}

.produto-linha-superior {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.produto-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.produto-nome {
  font-size: 12px;
  font-weight: 500;
  color: #1e293b;
  line-height: 1.3;
}

.produto-preco {
  font-size: 13px;
  color: #64748b;
  font-weight: 500;
  margin-bottom: 8px;
}

.produto-linha-inferior {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.produto-campos {
  display: flex;
  gap: 8px;
  flex: 1;
  align-items: end;
  justify-content: space-between;
}

.campo-quantidade,
.campo-desconto {
  display: flex;
  flex-direction: column;
  gap: 2px;
  width: 45%;
}

.campo-quantidade label,
.campo-desconto label {
  font-size: 11px;
  color: #64748b;
  font-weight: 500;
}

.input-quantidade,
.input-desconto {
  width: 100%;
  padding: 4px 6px;
  border: 1px solid #d1d5db;
  border-radius: 4px;
  font-size: 12px;
  background-color: white;
  text-align: center;
}

.input-quantidade:focus,
.input-desconto:focus {
  outline: none;
  border-color: var(--cor-principal);
  box-shadow: 0 0 0 2px rgba(220, 38, 38, 0.1);
}

.botao-adicionar-icone {
  background-color: var(--cor-principal);
  color: white;
  border: 1px solid var(--cor-principal);
  border-radius: 6px;
  padding: 0;
  cursor: pointer;
  transition: background-color 0.2s ease;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
}

.botao-adicionar-icone:hover {
  background-color: #b91c1c;
}

.botao-adicionar-icone:active {
  transform: translateY(1px);
}

.barra-navegacao {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  background-color: white;
  border-top: 1px solid #e2e8f0;
}

.botao-menu,
.botao-home,
.botao-voltar-nav {
  background: none;
  border: none;
  padding: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #64748b;
}

.botao-menu:hover,
.botao-home:hover,
.botao-voltar-nav:hover {
  color: #1e293b;
}

/* Controle de quantidade com botões */
.controle-quantidade {
  display: flex;
  align-items: center;
}

.input-quantidade {
  width: 50%;
  text-align: center;
  margin: 0 5px;
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 4px;
}

.btn-quantidade {
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #91881a;
  color: white;
  border: none;
  border-radius: 4px;
  font-weight: bold;
  cursor: pointer;
  padding: 0;
  font-size: 16px;
}

/* Responsividade para a tela de seleção de produtos */
@media (max-width: 400px) {
  .header-selecao-produtos {
    padding: 12px;
  }
  
  .barra-busca {
    padding: 12px;
  }
  
  .lista-produtos {
    padding: 12px;
  }
  
  .card-produto {
    padding: 8px;
    gap: 8px;
  }
  
  .produto-linha-superior {
    gap: 8px;
  }
  
  .produto-linha-inferior {
    gap: 8px;
  }
  
  .produto-campos {
    gap: 6px;
  }
  
  .input-quantidade,
  .input-desconto {
    width: 50px;
    font-size: 11px;
  }
  
  .barra-navegacao {
    padding: 8px 12px;
  }
}

/* Tela de Seleção de Cliente */
.tela-selecao-cliente { 
  padding: 0; 
  background: #f6f8fb; 
}

.conteudo-selecao-cliente { 
  padding: 12px 12px 80px 12px; 
}

/* Estilos específicos para a tela de seleção de cliente */
.cartao-cliente:hover {
  border-color: var(--cor-principal);
  box-shadow: 0 4px 8px rgba(2,6,23,0.08);
  transition: all 0.2s ease;
}

.cartao-cliente:active {
  transform: translateY(1px);
}

/* Estilos para a tela de detalhes do cliente */
.tela-detalhes-cliente {
  padding: 0;
  height: 90vh;
  background-color: #f5f7fa;
}

.conteudo-detalhes-cliente {
  flex: 1;
  padding: 16px;
  overflow-y: auto;
}



.card-cabecalho {
  background: var(--card);
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 20px;
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 16px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}


.avatar-cliente {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: #f0f4ff;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}



.nome-cliente {
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 4px;
}

.codigo-cliente {
  font-size: 14px;
  color: var(--muted);
}

.secoes-info {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.card-secao {
  background: var(--card);
  border-radius: 8px;
  border: 1px solid var(--border);
  overflow: hidden;
}

.melhor-cabecalho {
  display: flex;
  align-items: center;
  gap: 20px;
  background: #fff;
  padding: 28px 32px;
  border-radius: 16px;
  box-shadow: 0 2px 12px #0002;
  margin-bottom: 32px;
}
.melhor-avatar {
  background: #e0e7ff;
  border-radius: 50%;
  padding: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.melhor-nome {
  font-size: 1.3em;
  font-weight: bold;
  color: #4F46E5;
}
.melhor-codigo {
  font-size: 1em;
  color: #64748b;
  margin-top: 2px;
}
.melhor-secoes {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.melhor-card {
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 1px 8px #0001;
  padding: 22px 24px;
  min-width: 180px;
}
.melhor-titulo {
  display: flex;
  align-items: center;
  font-weight: 600;
  font-size: 1.15em;
  margin-bottom: 14px;
  gap: 10px;
}
.icone-secao {
  font-size: 22px;
}
.cor-azul { color: #2563eb; }
.cor-verde { color: #16a34a; }
.cor-amarela { color: #eab308; }
.cor-roxa { color: #7c3aed; }
.cor-ciano { color: #06b6d4; }
.cor-laranja { color: #f97316; }
.conteudo-secao {
  padding: 0 18px 20px;
}

.campo-info {
  margin-bottom: 14px;
  gap: 10px;
  padding-bottom: 5px;
  border-bottom: 1px dashed rgba(226, 232, 240, 0.7);
}

.campo-info:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}

.label-campo {
  font-size: 12px;
  font-weight: 500;
  color: #6c7581;
  flex-shrink: 0;
  display: block;
}

.valor-campo {
  font-size: 14px;
  color: #64748b;
  text-align: left;
  word-break: break-word;
}

.melhor-valor {
  font-size: 13px;
  font-weight: 500;
  color: #0f172a;
}

.status-ok {
  color: #10B981;
  font-weight: 600;
  background-color: rgba(16, 185, 129, 0.1);
  padding: 4px 8px;
  border-radius: 4px;
}

.status-atraso {
  color: #EF4444;
  font-weight: 600;
  background-color: rgba(239, 68, 68, 0.1);
  padding: 4px 8px;
  border-radius: 4px;
}

.conteudo-centralizado {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px;
  text-align: center;
  color: var(--muted);
}

/* Adicione ao seu arquivo global de estilos */
.cliente-card {
  display: flex;
  align-items: center;
  gap: 18px;
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 1px 8px #0001;
  padding: 18px 22px;
  margin-bottom: 18px;
  min-width: 280px;
}
.cliente-card-avatar {
  display: flex;
  align-items: center;
  justify-content: center;
}
.cliente-card-foto {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  background: #e0e7ff;
}
.cliente-card-foto-placeholder {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: #e0e7ff;
  display: flex;
  align-items: center;
  justify-content: center;
}
.cliente-card-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.cliente-card-nome {
  font-weight: 600;
  font-size: 1.08em;
  color: #334155;
}
.cliente-card-email,
.cliente-card-telefone,
.cliente-card-cnpj,
.cliente-card-endereco {
  color: #64748b;
  font-size: 0.98em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cliente-card-acoes {
  display: flex;
  align-items: center;
}




