/* Modal genérico e formulários da venda / comprovante. */

.modal-fundo {
  position: fixed; inset: 0; z-index: 70;
  display: grid; place-items: center; padding: 16px;
  background: rgb(0 0 0 / .35);
  animation: modal-fundo .12s ease-out;
}
@keyframes modal-fundo { from { opacity: 0; } }
.modal {
  width: 100%; max-height: calc(100vh - 32px); overflow-y: auto;
  background: var(--surface); border: 1px solid var(--line); border-radius: 14px;
  box-shadow: 0 20px 60px rgb(0 0 0 / .25);
}
.modal-cabeca {
  position: sticky; top: 0; z-index: 1;
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 16px 12px 20px; background: var(--surface); border-bottom: 1px solid var(--line);
}
.modal-cabeca h2 { margin: 0; font-size: 17px; letter-spacing: -.01em; }
.modal-corpo { padding: 16px 20px 20px; }

.venda-form { display: flex; flex-direction: column; gap: 12px; }
.vf-grade { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 10px; }
.vf-campo { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.vf-campo > span { color: var(--muted); font-size: 12px; font-weight: 600; }
.vf-campo small { color: var(--faint); font-size: 11.5px; }
.vf-campo input[readonly] { background: var(--bg); color: var(--muted); }
.vf-rotulo { margin: 6px 0 -4px; font-size: 13px; font-weight: 700; }
.vf-formas { align-self: flex-start; margin-left: 0; }
.vf-previa { display: flex; flex-direction: column; gap: 2px; font-size: 12.5px; color: var(--muted); }
.vf-previa b { color: var(--text); font-size: 13.5px; }
.vf-arquivo { padding: 7px 10px; height: auto; }
.vf-resumo { margin: 0; }
.vf-erro { margin: 0; color: var(--bad); font-size: 13px; }
.vf-acoes { display: flex; justify-content: flex-end; gap: 8px; margin-top: 4px; }

/* editor da foto de perfil */
.fe { display: flex; flex-direction: column; gap: 12px; align-items: center; }
.fe-area { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.fe-quadro {
  width: 280px; height: 280px; border-radius: 12px; touch-action: none; cursor: grab;
  background: repeating-conic-gradient(var(--line) 0 25%, var(--surface) 0 50%) 0 0 / 20px 20px;
}
.fe-quadro:active { cursor: grabbing; }
.fe-dica { margin: 0; color: var(--faint); font-size: 11.5px; text-align: center; }
.fe-zoom-linha { display: flex; align-items: center; gap: 10px; width: 280px; color: var(--muted); font-size: 12px; font-weight: 600; }
.fe-zoom { flex: 1; accent-color: var(--accent); }
.fe-acoes { width: 100%; flex-wrap: wrap; }
.fe-espaco { flex: 1; }

@media (max-width: 560px) {
  .modal-fundo { padding: 0; place-items: end stretch; }
  .modal { max-height: 92vh; border-radius: 14px 14px 0 0; }
  .modal-corpo { padding: 14px 16px 18px; }
}
