/* ── SELLER APP — COMPONENTS CSS ── */

/* ── VENDA STATUS ── */
.venda-status-0 { color: #0ea575; font-weight: 700; }
.venda-status-1 { color: #6b7280; }
.venda-status-2 { color: #ff5a1f; font-weight: 700; }

/* ── SWITCH TOGGLE ── */
.switch-wrap { display: flex; align-items: center; gap: 10px; }
.switch { position: relative; display: inline-block; width: 44px; height: 24px; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch-slider { position: absolute; inset: 0; background: var(--border); border-radius: 24px; cursor: pointer; transition: .2s; }
.switch-slider::before { content: ''; position: absolute; width: 18px; height: 18px; background: white; border-radius: 50%; bottom: 3px; left: 3px; transition: .2s; box-shadow: 0 1px 3px rgba(0,0,0,.2); }
input:checked + .switch-slider { background: var(--primary); }
input:checked + .switch-slider::before { transform: translateX(20px); }

/* ── ITEM VENDA NA LISTA ── */
.venda-item { display: flex; align-items: center; gap: 8px; padding: 10px 0; border-bottom: 1px solid var(--border); }
.venda-item:last-child { border: none; }
.venda-item-img { width: 40px; height: 40px; border-radius: 6px; background: var(--bg); flex-shrink: 0; display: flex; align-items: center; justify-content: center; font-size: 1rem; color: var(--text-light); overflow: hidden; }
.venda-item-img img { width: 100%; height: 100%; object-fit: cover; }
.venda-item-body { flex: 1; min-width: 0; }
.venda-item-nome { font-weight: 600; font-size: .88rem; }
.venda-item-detalhe { font-size: .75rem; color: var(--text-light); }
.venda-item-total { font-weight: 700; color: var(--primary); white-space: nowrap; }
.venda-item-actions { display: flex; gap: 4px; }

/* ── FECHAMENTO VENDA ── */
.fechamento-secao { border: 1.5px solid var(--border); border-radius: 10px; padding: 14px; margin-bottom: 12px; }
.fechamento-secao h4 { font-size: .85rem; text-transform: uppercase; color: var(--text-light); margin-bottom: 12px; font-weight: 700; }
.resumo-linha { display: flex; justify-content: space-between; padding: 5px 0; font-size: .9rem; }
.resumo-linha.total { font-weight: 800; font-size: 1.05rem; border-top: 2px solid var(--border); padding-top: 8px; margin-top: 4px; color: var(--primary); }
.resumo-linha.desconto { color: var(--success); }

/* ── CUPOM DE DESCONTO — BLOCO VISUAL ── */
.cupom-desconto-bloco {
  margin: 6px 0 2px;
  border: 1.5px dashed #059669;
  border-radius: 10px;
  background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
  overflow: hidden;
}
.cupom-desconto-topo {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
}
.cupom-desconto-icone {
  font-size: 1.5rem;
  flex-shrink: 0;
}
.cupom-desconto-titulo {
  font-size: .78rem;
  font-weight: 600;
  color: #065f46;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.cupom-desconto-codigo {
  font-family: monospace;
  font-size: .85rem;
  font-weight: 700;
  color: #047857;
  letter-spacing: 2px;
}
.cupom-desconto-right {
  margin-left: auto;
  text-align: right;
}
.cupom-desconto-pct {
  font-size: 1.15rem;
  font-weight: 900;
  color: #065f46;
  line-height: 1;
}
.cupom-desconto-val {
  font-size: .82rem;
  font-weight: 700;
  color: #059669;
  margin-top: 2px;
}
.cupom-desconto-barra {
  height: 4px;
  background: rgba(5,150,105,.15);
}
.cupom-desconto-prog {
  height: 100%;
  background: linear-gradient(90deg, #059669, #10b981);
  border-radius: 0 2px 2px 0;
  transition: width .4s ease;
}

/* ── CUPOM INPUT ── */
.cupom-wrap { display: flex; gap: 8px; }
.cupom-wrap input { flex: 1; text-transform: uppercase; font-family: monospace; letter-spacing: 2px; font-weight: 700; }

/* ── PDV / RECIBO ── */
.pdv-wrap { background: #f9fafb; border: 1px dashed var(--border); border-radius: 8px; padding: 14px; font-family: monospace; font-size: .82rem; white-space: pre-wrap; overflow-x: auto; }

/* ── PRODUTO FORM ── */
.preco-grupo { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

/* ── RELATÓRIO ── */
.rel-header { display: flex; gap: 8px; flex-wrap: wrap; align-items: flex-end; margin-bottom: 14px; }
.rel-header .campo { flex: 1; min-width: 120px; margin-bottom: 0; }

/* ── DASHBOARD ── */
.dash-section { margin-bottom: 18px; }
.dash-section h3 { font-size: .88rem; font-weight: 700; color: var(--text-light); text-transform: uppercase; letter-spacing: .5px; margin-bottom: 10px; }

/* ── ÚLTIMAS VENDAS TABLE ── */
.vendas-lista { font-size: .82rem; }
.vendas-lista tr td:last-child { text-align: right; font-weight: 700; color: var(--primary); }

/* ── CLIENTE PICKER ── */
.cliente-selecionado { display:flex; align-items:center; justify-content:space-between;
  background:var(--surface); border:1.5px solid var(--primary); border-radius:8px;
  padding:10px 12px; cursor:pointer; }

/* ── DEVOLUÇÃO ── */
.devol-item { background: var(--bg); border-radius: 8px; padding: 12px; margin-bottom: 8px; }
.devol-item h4 { font-size: .88rem; font-weight: 700; margin-bottom: 8px; }
.devol-item .quant-wrap { display: flex; align-items: center; gap: 10px; }
.devol-quant { width: 80px; text-align: center; }

/* ── CUPOM RESULTADO ── */
.cupom-resultado { background: #d1fae5; border-radius: 10px; padding: 14px; text-align: center; margin-bottom: 10px; }
.cupom-resultado .cupom-code { font-family: monospace; font-size: 1.5rem; font-weight: 900; letter-spacing: 4px; color: #065f46; }
.cupom-resultado small { display: block; color: var(--text-light); margin-top: 4px; font-size: .78rem; }

/* ── PARCELAMENTO ── */
.parcelas-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 8px; }
.parcela-btn { padding: 8px; border: 1.5px solid var(--border); border-radius: 8px; background: white; cursor: pointer; text-align: center; font-size: .82rem; font-weight: 600; transition: all .15s; }
.parcela-btn.selected { border-color: var(--primary); background: var(--primary); color: white; }

/* ── EMPTY STATE ── */
.empty-state { text-align: center; padding: 40px 20px; color: var(--text-light); }
.empty-state .empty-icon { font-size: 2.5rem; margin-bottom: 10px; }
.empty-state p { font-size: .9rem; }

/* ── PARAMETRO ── */
.regra-parcela { display: flex; gap: 8px; align-items: center; background: var(--bg); border-radius: 8px; padding: 8px 12px; margin-bottom: 8px; }
.regra-parcela span { flex: 1; font-size: .85rem; }
.regra-parcela .btn-icon { color: var(--danger); }
